Note: Before proceeding, make certain the SharePlex demonstration objects are installed.
In this demonstration, you will create and activate a replication configuration, load data to the source table, and then confirm that the data was replicated successfully to the target table. You will also repair a table that is out of synchronization.
Note: In this demonstration, the demonstration objects are assumed to be in the schema named demo. Substitute the actual schema, if different.
Perform these steps on the source system:
Run sp_ctrl .
Issue the following command to create a configuration file named sample_config that replicates the sample_department, sample_salary, sample_timesheet, and sample_employee tables to target tables of the same names on the target system..
sp_ctrl(source)>create config sample_config
In the text editor, build your configuration file based on the following template. Allow no spaces between the characters in a component (source specification, target specification, routing map), and place at least one space between each component.
# sample_config configuration file | ||
datasource:r.source_databasename | ||
"demo"."sample_department" |
"demo"."sample_department" |
target_system@r.target_databasename |
"demo"."sample_salary" | "demo"."sample_salary" |
target_system@r.target_databasename |
"demo"."sample_timesheet" | "demo"."sample_timesheet" | target_system@r.target_databasename |
"demo"."sample_employee" | "demo"."sample_employee" | target_system@r.target_databasename |
where:
In sp_ctrl, verify that the configuration file will activate successfully.
sp_ctrl(source)>verify config sample_config
An example of a config file for PostgreSQL to PostgreSQL replication:
# data2k configuration file | ||
datasource:r.source_databasename | ||
"demo"."data2k" | "demo"."data2k" | target_system@r.target_databasename |
An example of a config file for PostgreSQL to Oracle replication:
# data2k configuration file | ||
datasource:r.source_databasename | ||
"demo"."data2k" | "demo"."data2k" | target_system@o.target_databasename |
Use double quotes ("...") for table name and column names while creating table in the Oracle target database.
create table "data2k"(
"id" number(19) primary key,
"cust_gender" char,
"order_name" varchar2(2000),
"units_sold" NUMBER,
"unit_price" BINARY_DOUBLE not null,
"delivery_id" NUMBER(5),
"order_id" number(10),
"order_price" binary_float not null,
"cust_dob" date,
"created_date" timestamp,
"updated_date" timestamp with time zone,
"delivery_date" timestamp(3),
"order_name2" varchar2(2000) DEFAULT ' ' NOT NULL,
"units_sold2" NUMBER,
"unit_price2" BINARY_DOUBLE not null,
"delivery_id2" NUMBER(5),
"order_id2" number(10),
"order_price2" binary_float not null,
"cust_dob2" date,
"created_date2" timestamp);
Perform these steps on the source system. When you activate a configuration, SharePlex is ready to capture transactional changes that are made to the specified source data.
Activate the configuration.
sp_ctrl(source)>activate config sample_config
Note: Configuration names are case-sensitive.
Confirm that the configuration activated successfully. The name config sample_config should appear under File Name, and the word Active should appear under State.
sp_ctrl(source)>list config
This chapter reviews some common problems that you could experience when installing or running SharePlexfor 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.
If you installed SharePlex on this system before, and you are re-installing it, the installation will return errors if SharePlex is running on this system. Shut down SharePlex using the shutdown command in sp_ctrl. If you are unable to run sp_ctrl, or if any SharePlex processes will not die, locate the process (using ps -ef | grep sp_ on Unix and Linux systems) and kill it. When all SharePlex processes have been killed, run the installation program again.
Check to see that all systems on which you are loading SharePlex are connected to the network. The network node name and IP address of each system must be established sufficiently to allow SharePlex to perform TCP operations, even though the target machines themselves are not yet configured.
If your environment uses a name service such as NIS or NISPLUS, you need to add the SharePlex groups and services to the nameserver before you run the SharePlex installation program, and the SharePlex Administrator must be named in the SharePlex Admin group on the nameserver before you install SharePlex. Instructions are on page 31. If these procedures are not performed, the installation will generate an error at the point in which it attempts to verify that the groups exist.
The database must be open while you are installing SharePlex.
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 |
---|---|---|
Incorrect ORACLE_SID and/or ORACLE_HOME | If SharePlex cannot interact with Oracle, it might be using the wrong ORACLE_SID and/or ORACLE_HOME. |
|
Insufficient database privileges | If the Database Setup utility fails, the person who runs it may not have the correct privileges | |
Asterisk as the ORACLE_SID entry | Sometimes, the oratab file has an * (asterisk) symbol instead of a value for the ORACLE_SID. | Ensure that a valid ORACLE_SID is in the oratab file, and then try running the database setup again. |
More than one oratab file (Sun Solaris) |
On Solaris systems, the oratab file is typically located in the /var/opt/oracle directory, but because other platforms store the oratab file in the /etc directory, there could be a second oratab in the /etc directory. |
Either move, rename or delete the secondary oratab file, and then try running the database setup again. |
Oracle not running |
Oracle must be running and the instance must be open while you run the Database Setup utility. The utility accesses Oracle to establish SharePlex as a user and install its internal tables. |
Start Oracle and open the instance. |
sp_cop is running | The SharePlex sp_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. |
Oracle library location not correct |
On Unix and Linux systems, SharePlex expects the Oracle library to be in the $ORACLE_HOME/lib or $ORACLE_HOME/lib32 directory. In some environments, the Oracle library has a different name than what SharePlex expects it to be, or it is installed in a different location than expected (or both). In that case, you will see an error message when you attempt to run the Database Setup utility. |
Install the appropriate library from Oracle and then re-start SharePlex (if it is stopped). SharePlex will link to the correct library from that point forward. |
ld.so.1: sqlplus: fatal: libsunmath.so.1: can't open file: errno=2” error | On Unix and Linux systems, this error indicates that SharePlex cannot find the libsunmath and libshareplex libraries, even though the link exists in the proper place. |
You can use either of these solutions:
|
Wrong user-id |
To run Database Setup on Unix and Linux systems, the set-user-id for the Oracle software need to be -rwsr-s--x. Those permissions allow non-Oracle users to log into SQL*Plus. |
Set the correct values for set-user-id. |
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. 使用条款 隐私 Cookie Preference Center