Run the Database Setup utility for Postgres (pg_setup) to establish a user account, schema, and tables for use by SharePlex.
All implementations of the Postgres open-source database on supported platforms
Fujitsu Postgres contains a customized ODBC driver designed to run with the shared libraries supplied by Fujitsu Postgres. In order to ensure the proper configuration, you must create a symbolic link to ensure that the correct libraries are found at runtime.
Issue Description
If you attempt to run the pg_setup program prior to creating the symbolic link, pg_setup will fail with the following error message:
Error: [unixODBC]invalid connection option "target_server"
To create a symbolic link
To ensure that the proper library gets loaded, first locate the path to the directory where the Fujitsu Postgres libraries are installed (for example /opt/fsepv95server64/lib). Then create a symbolic link in the SharePlex OPTDIR/lib/hooks directory pointing to the libpq.so.5 library in the Fujitsu Postgres library directory. For example:
cd /opt/splex/lib/hooks
ln –s /opt/fsepv95server64/lib/libpq.so.5
On Linux, you can provide a connection string or a DSN (data source name). Note the following when deciding on the connection method on Linux:
Connection Type on Linux | What to do |
---|---|
Connection string | You do not need to provide a user, password, or default database in a connection string. The connection string must have the port, server and driver defined. This is an example from EDB Postgres Plus Advanced Server; your connection string will probably be different based on your own database setup: Port=5444;server=localhost;driver=/u01/PostgresPlus/connectors/odbc/lib/edb-odbc.so;database=edb; |
DSN |
If you have a DSN defined, and you want to use it for the SharePlex connection, copy or link the ODBC files in which that DSN is defined (odbc.ini and odbcinst.ini) to the odbc subdirectory of the SharePlex variable-data directory. This prevents connection errors when the SharePlex processes connect to the database. If you do not have a DSN defined but want to use one, you can create it in the template files provided in the odbc subdirectory. |
Review the following requirements to ensure that the setup succeeds.
(Symfoware only) If the person who is running the setup utility is not a Fujitsu Enterprise Postgres owner, set the environment variable LD_LIBRARY_PATH to include the path to the lib subdirectory in the Fujitsu Enterprise Postgres installation directory. The LD_LIBRARY_PATH is set in the .bash_profile file of the Fujitsu Enterprise Postgres owner.
Example:
export LD_LIBRARY_PATH= /opt/symfoserver64/lib:$LD_LIBRARY_PATH
If you do not set this path, the following error occurs:
symbol lookup error: /opt/fsepv95client64/odbc/lib/psqlodbca.so: undefined symbol: PQconnectdbParams
On Amazon RDS, you might need to grant usage/privileges on the target schema and tables to the SharePlex user, as shown in the following example:
Log in as the schema owner, then issue the following commands:
grant usage on schema schema_name to user_name;
grant all privileges on all tables in schema schema_name to user_name;
Run the pg_setup program from the bin subdirectory of the SharePlex product directory.
Important! If you installed the SharePlex instance on any port other than the default of 2100, use the -p option to specify the port number. For example, in the following command the port number is 9400.
$ /users/splex/bin> pg_setup -p9400
Table 6: Setup prompts and responses
Prompt | Response |
---|---|
(Linux) Enter the PostgreSQL DSN name or connection string [] : (Windows) Enter the PostgreSQL DSN name [] : |
Enter a DSN or a connection string if the system is Linux, or enter a DSN if the system is Windows. |
Enter the PostgreSQL Administrator name : |
Enter the name of the Postgres Administrator. This user will perform the work on the SharePlex account. |
Enter the password for the Administrator account : |
Enter the password of the Administrator. |
Enter the replication target database name: |
Enter the name of the database that you want to contain the SharePlex tables and other objects for use by SharePlex. You can enter the name of a new or existing database. |
Database name database does not exist. Would you like to create it? [y] : |
If this prompt is displayed, the specified database does not exist. Press Enter to have the setup utility create it for you. |
Would you like to create a new SharePlex user [y]: |
Press Enter to accept the default to create a new SharePlex database user account and schema of the same name in the specified database, or enter n to use an existing SharePlex account. |
Enter the name of the new SharePlex user: Enter the name of the existing SharePlex user: |
One of these prompts is displayed depending on whether you elected to create a new user or use an existing user. Enter the name of the SharePlex user.
|
Enter the password of the SharePlex user : |
Enter the password of the SharePlex user account. |
Re-enter the password for the SharePlex user : |
This prompt is only shown if you created a new user. Enter the SharePlex password again. |
A successful setup terminates with a message similar to the following:
Completed SharePlex for PostgreSQL database configuration
SharePlex User name: splex
Database name: ndb5
Target specification in SharePlex configuration: r.ndb5
Run the Database Setup utility for SQL Server (mss_setup) on a Microsoft SQL Server system to establish SharePlex as a SQL Server database user. This utility creates the following:
Microsoft SQL Server on Windows
Review the following requirements to ensure that the setup succeeds.
The Database Setup utility must be run as a SQL Server System Administrator in order to grant SharePlex the required privileges to operate on the database and to create the SharePlex database account and objects.
Run the mss_setup program from the bin subdirectory of the SharePlex product directory.
Important! If you installed the SharePlex instance on any port other than the default of 2100, use the -p option to specify the port number. For example, in the following command the port number is 9400.
C:\users\splex\bin> mss_setup -p9400
Table 7: Setup prompts and responses
Prompt | Response |
---|---|
Enter the Microsoft SQL Server DSN name [] : |
Enter the data source name (DSN) that connects to SQL Server. Make certain the DSN is a system DSN, not a user DSN. |
Enter the Microsoft SQL Server Administrator name : |
Enter the name of the SQL Server Administrator. This user will perform the setup work on the SharePlex account and schema. |
Enter the password for the Administrator account : |
Enter the password of the Administrator. |
Enter the database name: |
Enter the name of the database where you want to install the SharePlex objects. |
Database name database does not exist. Would you like to create it? [y] : |
If this prompt is displayed, the specified database does not exist. Press Enter to have the setup utility create it for you. |
Would you like to create a new SharePlex login [y]: |
Press Enter to accept the default to create a new SharePlex database user account, or enter n to use an existing account as the SharePlex database user. |
Enter the name of the existing SharePlex login: Enter the name of the new SharePlex login: |
One of these prompts is displayed depending on whether you elected to create a new user or use an existing user. Enter the name of the SharePlex user.
|
Enter the password for login: |
Enter the password of the SharePlex user account. |
Re-enter the password for login : |
Enter the SharePlex password again. |
Will this database be used as a source? |
Accept the default of n if the database will only be a target. Enter y if this database will be a source database for SharePlex. A response of y prompts the setup to prepare the database for data capture and installs the SharePlex account and objects. |
A successful setup terminates with a message similar to the following:
Completed SharePlex for Microsoft SQL Server database configuration
SharePlex User name: splex
Database name: db1
Target specification in SharePlex configuration: r.db1
Run the Database Setup utility for Teradata (td_setup) on a Teradata system to establish a user account and database for use by SharePlex.
Teradata on supported platforms
The setup utility must be run as a Teradata Administrator in order to grant SharePlex the required privileges to operate on the database and to create the SharePlex database account.
Run the td_setup program from the bin subdirectory of the SharePlex product directory.
Important! If you installed the SharePlex instance on any port other than the default of 2100, use the ‑p option to specify the port number. For example, in the following command the port number is 9400.
$/users/splex/bin> td_setup ‑p9400
Table 8: Setup Prompts and Responses
Prompt | Response |
---|---|
Please enter the full directory path of the Teradata ODBC driver: |
Enter the full path to the Teradata ODBC driver library. This step initializes the driver location within the setup utility so that the rest of the setup can take place. It requires a second running of the setup utility to complete the setup steps. |
Please run td_setup again to create the tables, login and user accounts needed to run SharePlex replication. |
Run the setup utility again, including the port number if you installed SharePlex on any port other than 2100: $/users/splex/bin> td_setup -p9400 |
Enter the Teradata DSN name or connection string[]: |
Enter the Data Source Name that connects to Teradata. |
Enter the Teradata Administrator name: |
Enter the name of the Teradata Administrator. This user will perform the work on the SharePlex account. |
Enter the password for the Administrator account: |
Enter the password of the Administrator. |
Would you like to create a new SharePlex user [y]: |
Press Enter to accept the default to create a new SharePlex database user account or enter n to use an existing SharePlex account. |
Enter the name of the new SharePlex user: (or...) Enter the name of the existing SharePlex user: |
Enter the name of the new or existing SharePlex user, depending on which option you chose in the previous step.
|
Enter the password for new SharePlex user: (or...) Enter the password for existing SharePlex user: |
Enter the password of the new or existing SharePlex user account. |
Re-enter the password for new SharePlex user: |
This prompt is only shown if you created a new user. Enter the SharePlex password again. |
Enter the name of the database: |
Accept the default or enter a different name for the database. |
Database name database does not exist. Would you like to create it? [y]: |
If this prompt is displayed, the specified database does not exist. Press Enter to have the setup utility create it for you. |
A successful setup terminates with a message similar to the following:
Completed SharePlex for Teradata database configuration
SharePlex User name: splex
Database name: splex
Target specification in SharePlex configuration: r.splex
The setup utility creates the following objects:
The setup utility then prompts you to specify any additional Teradata databases that you want to include as replication targets. For each of those databases, the utility issues the following grant to the SharePlex user:
grant all on database to SharePlex_user;
SharePlex uses the following environment variables, which you may need to set in certain situations. Usually you must perform additional steps before or after setting a variable, so refer to the recommended instructions before setting a SharePlex variable.
Environment Variable | Description |
---|---|
EDITOR | Sets the default ASCII text editor for sp_ctrl commands that use one, for example the create config command. |
HOST | Sets a host name for all locally run sessions of sp_ctrl. |
SP_COP_TPORT |
Sets a non-default port number for an instance of SharePlex. The default port number is 2100. You may need to set a different port number if one of the following is true:
|
SP_SYS_HOST_NAME |
Sets the host name that SharePlex binds to during configuration activation. This variable is used for the following:
|
SP_SYS_VARDIR | Sets the full path to the SharePlex variable-data directory so that sp_cop can locate the configuration data, queues, logs and other information. If there is only one instance of sp_cop on the local system, this variable is set by default*. If there are multiple instances of sp_cop on the local system, always set this variable to point to the correct variable-data directory of an instance before setting any other SharePlex variables for that instance. |
SP_SYS_SECURE_MODE |
Suppresses the output of the compare and repair SQL log file for all compare and repair runs while the current instance of SharePlex is running. This variable must be set before starting SharePlex, so if the sp_cop process is running it must be restarted after setting this variable. When sp_cop is run with this environment variable, the compare and repair commands will not put data into SQL files and the Post process will not put data into the SharePlex error log. |
* On Unix and Linux, the variable-data directory is set in the proddir/data/defaults.yaml file. On Windows, it is set in the Windows Registry.
To set an environment variable in Unix or Linux
ksh shell:
export variable_name=value
csh shell:
setenv variable_name value
ksh shell:
export SP_SYS_VARDIR=full_path_of_variable-data_directory
csh shell:
setenv SP_SYS_VARDIR full_path_of_variable-data_directory
To set an environment variable on Windows
Set the environment variable by adding it to the SharePlex node of the Windows Registry.
Important! Incorrect Registry settings can adversely affect the operation of SharePlex. Consult a System Administrator if you need help with this procedure.
\HKEY_LOCAL_MACHINE\Software\Wow6432node\Quest Software\SharePlex
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. Feedback Nutzungsbedingungen Datenschutz Cookie Preference Center