Modify the cloud database parameters :
AWS : rds.logical_replication 1
Azure : wal_level LOGICAL
Add database connection details in the ODBC files in SharePlex var/odbc directory. See the sample screenshot.
Notes:
|
Run the PG Setup utility for PostgreSQL (pg_setup) to establish a user account, schema, and tables for use by SharePlex.
For PostgreSQL Database as a Service, follow the connection handling best practices recommended by the respective vendor.
You can provide a DSN (data source name). Note the following when deciding on the connection method on Linux:
Connection Type on Linux | What to do |
---|---|
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. |
For an example of the sample odbc.ini and odbcinst.ini files, see the example below:
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 PostgreSQL owner, set the environment variable LD_LIBRARY_PATH to include the path to the lib subdirectory in the Fujitsu Enterprise PostgreSQL installation directory. The LD_LIBRARY_PATH is set in the .bash_profile file of the Fujitsu Enterprise PostgreSQL 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
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;
For Google Cloud database, grant the following privileges if a user wants to change the owner of a table in replication:
alter user splex_user createdb createrole login;
create role role_name;
grant role_name to splex_user;
Follow the below instructions to run the PG setup for PostgreSQL:
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 16: Setup prompts and responses
Prompt | Response |
---|---|
Enter the PostgreSQL DSN name: |
Enter a DSN. |
Is DB hosted over "Azure Single Server"? |
Enter "n" for a database hosted on the platform other than "Azure single server". NOTE: Ensure Admin users have the below mentioned roles before initiating setup- On-Prem DB:superuser AWS hosted DB:rds_superuser Azure hosted DB:azure_pg_admin |
Enter the PostgreSQL Administrator name : |
Enter the name of the PostgreSQL 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 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. NOTE: Enter the user name in lowercase letters only. |
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. |
Will this database be used as a source? [n] : |
Enter Y to use the DB connection for a source. You will see the below prompts only for the DB connection for the source. Enter N to use the DB connection for a target. |
Enter the replication slot name? [test_slot] : |
Enter the replication slot name. NOTE: Replication slot test_slot will be created in database after successful config activation. |
Enter the default tablespace for use by SharePlex [pg_default] : | Enter the default tablespace by SharePlex |
Enter the index tablespace for use by SharePlex [pg_default] : | Enter the index tablespace by SharePlex |
Do you want Logical replication? [n] : |
This prompt is displayed only for on-premise hosted PostgreSQL database. Enter "y" to perform logical replication. Enter "n" to perform physical replication. Setup will now install SharePlex objects. |
A successful setup terminates with a message similar to the following:
Completed SharePlex for PostgreSQL database configuration
SharePlex User name: splexab
Database name: testdb
-- The datasource identifier in the SharePlex configuration is 'r.testdb' --
To install pg_hint_plan:
For On-Prem Databases:
Install the RPM according to the PostgreSQL version support matrix at https://github.com/ossc-db/pg_hint_plan.
Run the query with the user [Shareplex user]: CREATE EXTENSION IF NOT EXISTS pg_hint_plan;
Reboot the instance.
For Cloud PostgreSQL:
Set the static parameter in the parameter group: shared_preload_libraries=pg_hint_plan.
Reboot the instance.
NOTE: The total number of background workers that can exist at any one time is limited by both max_worker_processes and max_parallel_workers:
|
Overview
This chapter reviews some common problems that you could experience when installing or running SharePlex for the first time after installation.
Sometimes there are special installation instructions that supersede or supplement certain instructions in this manual. In addition, there can be known issues for this version that you should be aware of during or after installation. Please read the Release Notes for the version of SharePlex that you are installing before you begin the installation process.
This section helps you diagnose problems that are associated with the SharePlex database account and connection information that was created with the Database Setup utility when SharePlex was installed on the system.
Note: For more information about Database Setup, see Database Setup Utilities in the SharePlex Reference Guide.
If the issue you are experiencing is not listed in this documentation, search the SharePlex Knowledge Base at:
The Knowledge Base provides filtering options and links to other resources that can help you use and troubleshoot SharePlex.
Problem | Description | Solution |
---|---|---|
Insufficient database privileges | If the database setup utility fails, the person who runs it may not have the correct privileges | |
sp_cop is running | The SharePlexsp_cop process cannot be running while you are running the Database Setup utility. | If it is running, shut it down using the shutdown command in sp_ctrl. Run sp_ctrl from the bin sub-directory in the SharePlex product directory. |
ODBC driver configuration problem | Error: [unixODBC][Driver Manager]Data source name not found and no default driver specified. The issue is observed while running pg-setup. | Ensure that the odbc.ini and odbcinst.ini configurations are verified. For more information, see Database Setup for PostgreSQL. |