In this scenario, SharePlex runs as an Amazon Machine Image instance on the EC2 service. Capture connects to the source database through TNS and the Post process connects to the RDS database through TNS.
Obtain a SharePlex instance
To obtain a SharePlex AMI instance, see Configure a SharePlex AMI instance
Log on to the SharePlex AMI instance
Always log on to the SharePlex AMI instance as the ec2-user. This user is the SharePlex Administrator. Use the following command:
ssh -i ~/.ssh/pem_file_name.pem ec2-user@IP_address/hostname
where:
Create a tnsnames.ora file
On the host of the SharePlex AMI instance, create a tnsnames.ora file with entries for the source and target databases.
Important! The tnsnames.ora file must be created in this directory: /usr/lib/oracle/11.2/client64/network/admin. The TNS alias cannot contain any dashes (-). |
The following are examples:
source = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = yoursource.amazonaws.com) (PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME=orcl) ) ) target = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = yourtarget.amazonaws.com) (PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME=orcl) ) )
Run ora_setup
On the SharePlex AMI instance, run ora_setup for the source database. See the directions for running Oracle Setup in Database Setup for Oracle.
On the SharePlex AMI instance, run ora_setup for the target database.
Set up remote capture
Note: Enabling the SP_OCT_OLOG_RDS_MINER parameter is deprecated and no longer supported starting with Oracle 19c.
Set up routing in the configuration file
When you create the SharePlex configuration file, use the name of the EC2 host of the SharePlex AMI instance in the routing map so that Post runs locally. The following is an example:
datasource:o.source | ||
splex.demo_src |
splex.demo_dest |
shareplex_ec2_host.amazonaws.com@o.target |
In this scenario, SharePlex runs as an Amazon Machine Image instance on the EC2 service. Capture connects to the source database through TNS, and the Post process connects to the RDS database through TNS.
Obtain a SharePlex instance
Obtain a SharePlex AMI instance. See Configure a SharePlex AMI instance
Log on to the SharePlex AMI instance
Always log on to the SharePlex AMI instance as the ec2-user. This user is the SharePlex Administrator. Use the following command:
ssh -i ~/.ssh/pem_file_name.pem ec2-user@IP_address/hostname
where:
Create a tnsnames.ora file
On the SharePlex AMI instance, create a tnsnames.ora file with entries for the source and target databases.
Important! The tnsnames.ora file must be created in this directory: /usr/lib/oracle/11.2/client64/network/admin. The TNS alias cannot contain any dashes (-). |
The following are examples:
source = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = yoursource.amazonaws.com) (PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME=orcl) ) ) target = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = yourtarget.amazonaws.com) (PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME=orcl) ) )
Run ora_setup
On the SharePlex AMI instance, run ora_setup for the source database. See the directions for running Oracle Setup in Database Setup for Oracle.
On the SharePlex AMI instance, run ora_setup for the target database.
Configure capture from RDS
On the SharePlex AMI instance, set the SP_OCT_OLOG_RDS_MINER parameter to 1.
sp_ctrl>set param SP_OCT_OLOG_RDS_MINER 1
Note: Enabling the SP_OCT_OLOG_RDS_MINER parameter is deprecated and no longer supported starting with Oracle 19c.
Set up routing in the configuration file
When you create the SharePlex configuration file, use the name of the EC2 host of the SharePlex AMI instance in the routing map so that Post runs locally. The following is an example:
datasource:o.source | ||
splex.demo_src |
splex.demo_dest |
shareplex_ec2_host.amazonaws.com@o.target |
In this scenario, SharePlex runs as an EC2 Amazon Machine Image instance in two different AWS regions: one for the source database in region 1 and the other for the target database in region 2.
Obtain SharePlex instances
Obtain two SharePlex AMI instances, one in region 1 to use as the source and the other in region 2 to use as the target. See Configure a SharePlex AMI instance.
Log on to the SharePlex AMI instances
Always log on to the SharePlex AMI instance as the ec2-user. This user is the SharePlex Administrator. Use the following command:
ssh -i ~/.ssh/pem_file_name.pem ec2-user@IP_address/hostname
where:
Create the tnsnames.ora files
Important!
The tnsnames.ora file must be created in this directory: /usr/lib/oracle/11.2/client64/network/admin.
The TNS alias cannot contain any dashes (-).
On the source SharePlex AMI instance, create a tnsnames.ora file with an entry for the source database.
The following is an example:
source = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = yoursource.amazonaws.com) (PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME=orcl) ) )
On the target SharePlex AMI instance, create a tnsnames.ora file with an entry for the target database. The tnsnames.ora file must be created in this directory: /usr/lib/oracle/11.2/client64/network/admin.
The following is an example:
target = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = yourtarget.amazonaws.com) (PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME=orcl) ) )
Run ora_setup
On the source SharePlex AMI instance, run ora_setup for the source database. See the directions for running Oracle Setup in Database Setup for Oracle.
On the target SharePlex AMI instance, run ora_setup for the target database.
Configure capture from RDS
Set the SP_OCT_OLOG_RDS_MINER parameter to 1 to enable it.
sp_ctrl>set param SP_OCT_OLOG_RDS_MINER 1
Note: Enabling the SP_OCT_OLOG_RDS_MINER parameter is deprecated and no longer supported starting with Oracle 19c.
Set up routing in the configuration file
When you create the SharePlex configuration file, create it on the source SharePlex AMI instance. Use the name of the EC2 host of the target SharePlex AMI instance in the routing map, so that Post runs on that AMI. The following is an example:
datasource:o.source | ||
splex.demo_src |
splex.demo_dest |
shareplex_ec2_host.amazonaws.com@o.target |
Use the Database Setup utility for Oracle (ora_setup) to establish SharePlex as an Oracle user and create the required SharePlex database objects. This setup utility creates the following:
It is recommended that you review all of the content in this topic before running the setup utility.
Oracle source or target on supported platforms
Whether or not to run this utility at the time of SharePlex installation depends on whether the database is a source, intermediary, or target database, and on how you intend to synchronize the data. To view the initial synchronization procedures, see the SharePlex Administration Guide.
System Type | When to run Oracle Setup |
---|---|
Source system |
During installation of SharePlex |
Intermediary system | An intermediary system is used in a cascading configuration, where SharePlex replicates data to a remote system (or systems) and then sends that data from the intermediary system to the final target. If you intend to configure SharePlex to post data to a database on an intermediary system, and you intend to use a hot backup to establish the data on that system and the target, do not run the Database Setup utility on the intermediary or target systems. You will run it when you perform the initial synchronization procedure. |
Target system |
Depends on the method that you will use to synchronize the source and target data when you are ready to activate replication:
|
The setup utility can configure any of the following connections for the SharePlex user to use when connecting to the database.
Database type | Connection |
---|---|
Database with or without ASM | Bequeath |
Database with or without ASM |
TNS alias |
PDB with ASM |
TNS alias for the PDB and either TNS or bequeath for the ASM instance. |
Amazon RDS |
TNS alias |
The user who runs the Database Setup utility must have the following privileges:
Amazon RDS source or target
The user who runs the setup utility must be the master user that was created when the Oracle RDS instance was created. You are prompted for this user during the setup.
Non-multitenant (standard) database
The user who runs the setup utility must have DBA privileges.
Multitenant database
The user who runs the setup utility should have SYSDBA privileges (recommended), but at minimum the user should be a DBA user with privileges for sys.users$ and sys.enc$. The minimum following grants are required for the SharePlex user:
create user c##sp_admin identified by sp_admin;
grant dba to c##sp_admin container=ALL;
grant select on sys.user$ to c##sp_admin with grant option container=ALL;
Privilege granted |
Description |
---|---|
DBA role |
The Database Setup utility grants DBA role and unlimited resource privileges, tablespace privileges, and read privileges to the redo logs. |
Default Oracle profile |
By default this profile has the unlimited resource privileges originally assigned by Oracle. |
Grants |
The following grants are issued to SharePlex:
|
The following is a list of privileges required by SharePlex to perform replication. If you revoke the DBA role for the SharePlex database user, ensure these privileges are granted.
Privilege | Details |
---|---|
CREATE SESSION | |
ALTER SESSION | |
ALTER SYSTEM | |
RESOURCE role |
RESOURCE role privileges required by SharePlex:
|
SELECT ANY DICTIONARY | |
SELECT ANY TABLE | |
INSERT ANY TABLE | |
UPDATE ANY TABLE | |
DELETE ANY TABLE | |
UNLIMITED TABLESPACE | |
CREATE ANY TABLE | |
DROP ANY TABLE | |
LOCK ANY TABLE | |
EXECUTE ON DBMS_FLASHBACK | |
SELECT ANY TRANSACTION | |
CREATE ANY INDEX | |
DROP ANY INDEX | |
ALTER ANY TABLE | |
ALTER ANY INDEX | |
CREATE ANY VIEW | |
ALTER ANY SEQUENCE | |
EXP_FULL_DATABASE role | |
IMP_FULL_DATABASE role | |
SELECT ON SYS.ENC$ | |
SELECT ON SYS.USER$ |
SharePlex supports local BEQUEATH connections or remote connections using a TNS alias. Be prepared to supply Oracle Setup the needed connection values for whichever connection you want to use. If using TNS, the tnsnames.ora file must be configured prior to running setup.
The Database Setup utility for Oracle installs some database objects for use by SharePlex. The storage requirements for these objects should be satisfied before running Oracle Setup. See the following table.
Storage | Description |
---|---|
SharePlex objects tablespace |
The Database Setup utility installs some tables into a tablespace of your choosing. All but the SHAREPLEX_LOBMAP table use the default storage settings of the tablespace. The SHAREPLEX_LOBMAP table contains entries for LOBs stored out-of-row. It is created with a 1 MB INITIAL extent, 1 MB NEXT extent, and PCTINCREASE of 10. The MAXEXTENTS is 120, allowing the table to grow to 120 MB. Preferred action: If you enable supplemental logging for primary and unique keys, you can set the SP_OCT_ENABLE_LOBMAP parameter to 0, and nothing will be stored in the SHAREPLEX_LOBMAP table. In this case, you do not have to consider its size growth. It is recommended that you enable supplemental logging for primary and unique keys to maximize the performance of the Read process. Alternate action: The default storage usually is sufficient for SHAREPLEX_LOBMAP, permitting more than 4 million LOB entries. If the Oracle tables to be replicated have numerous LOB columns that are inserted or updated frequently, consider increasing the size the SharePlex tablespace accordingly. Take into account that this table shares the tablespace with other SharePlex tables. If the database uses the cost-based optimizer (CBO) and the tables that SharePlex processes include numerous LOBs, incorporate the SHAREPLEX_LOBMAP table into the analysis schedule. Note: A new installation of SharePlex does not change storage parameters from a previous installation. |
SharePlex temporary tablespace |
The Database Setup utility prompts for a temporary tablespace for SharePlex to use for sorts and other operations, including sorts performed by the compare commands. The default temporary tablespace is the one where the SharePlex objects are installed. If you plan to use the compare commands to compare large tables, especially those without a primary or unique key, specify a dedicated temporary tablespace for SharePlex. |
SharePlex index tablespace |
The Database Setup utility prompts for a tablespace to store the indexes for the SharePlex tables. The default index tablespace is the one where the SharePlex objects are installed. To minimize I/O contention, specify a different index tablespace from the one where the tables are installed. Note: If indexes from a previous version of SharePlex are installed in the SharePlex objects tablespace, you can move them to a different tablespace and then specify that tablespace when you run the setup utility. |
Important! The Oracle instance must be open before this procedure is performed.
(Unix and Linux only) If you are using multiple variable-data directories, export the environment variable that points to the variable-data directory for the SharePlex instance for which you are running Database Setup.
ksh shell:
export SP_SYS_VARDIR=/full_path_of_variable-data_directory
csh shell:
setenv SP_SYS_VARDIR=/full_path_of_variable-data_directory
Run the Database Setup program from the command prompt of the operating system, using the full path from the SharePlex bin subdirectory.
Important! On Windows, if you installed SharePlex 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>ora_setup -p9400
Specify whether the system is a source system, a target system, or both a source and target system in the SharePlex configuration.
Note: This prompt only appears the first time that you run setup for this database.
Table 1: Setup prompts and response
Prompt | Response |
---|---|
Will SharePlex install be using a BEQUEATH connection? (Entering 'n' implies a SQL*net connection): |
Press Y to use a local BEQUEATH connection, or press N to use a TNS alias connection. Note: Press N to use a TNS alias if:
|
Are you configuring SharePlex for an AWS RDS database? |
Press N if you are not configuring SharePlex for an Oracle database on RDS. Press Y if you are configuring SharePlex for an Amazon AWS RDS database.
|
One of the following prompts is shown:
|
Non-multitenant database: Accept the default or type the correct SID or TNS alias. On RAC, the TNS alias must be a global alias. Multitenant database: Type the TNS alias of the PDB. Amazon RDS: Type the TNS alias of the RDS database.
|
One of the following prompts is shown:
|
Non-multitenant database: Type the name of a database user that has DBA privileges. Multitenant database: Type the name of a common user who has the required privileges to install the account and objects. Amazon RDS database: Type the name of the RDS master user.
|
One of the following prompts is shown:
|
Non-multitenant database: Type the password of the DBA user. Multitenant database: Type the password of the common user. Omit the @ and the rest of the connect string. SharePlex constructs the connect string in the proper format. Amazon RDS database: Type the password of the RDS master user.
|
Current SharePlex user is user. Would you like to create a new SharePlex user? |
Press N to update an existing SharePlex account or Y to create a new SharePlex account. Type the credentials when prompted. You are allowed five attempts to type a valid password for an existing SharePlex user. Passwords are obfuscated. Important!If there is an active configuration and you changed the SharePlex schema, copy the SharePlex objects from the old schema to the new one to preserve the replication environment.
|
Do you want to enable replication of tables with TDE?
|
Press N since TDE is not supported for RDS.
|
Enter the default tablespace for use by SharePlex:
|
Press Enter to accept the default or type the name of a different tablespace.
|
Enter the temporary tablespace for use by SharePlex:
|
Press Enter to accept the default or type the name of a different tablespace.
|
Enter the index tablespace for use by SharePlex:
|
Press Enter to accept the default or type the name of a different tablespace.
|
Will the current setup for sid: SID be used as a source (including cases as source for failover or master-master setups)?
|
Press Y if this is a source system or press N if this is a target system. Important: All systems in a master-master configuration (peer-to-peer) and in a high-availability configuration are considered to be source systems due to the bidirectional nature of the replication.
|
Note:
| |
ASM detected. Do you wish to connect to ASM using BEQUEATH connection?
|
Press Y for SharePlex to use a BEQUEATH connection to connect to the ASM instance, or press N to use a TNS alias. Important! If the database uses ASM and the database TNS alias is configured with a SCAN IP, then you must specify connection through an ASM TNS alias in order for SharePlex to connect to the ASM instance.
|
The following prompt is displayed if you did not select a BEQUEATH connection: Do you wish to keep connecting using the same user/password?
|
Press Y to use the same user and password as the login user, or press N to be prompted for a different user and password. Normally the user running SharePlex must be a member of the OSASM group. This does not apply if SP_OCT_OLOG_USE_OCI is set to the non-default value of 1. Also if you are using a BEQUEATH connection, the user running SharePlex must be a member of the OSDBA group. |
Note: If you selected to use a BEQUEATH connection to connect to ASM, the database setup is complete. Continue to Note about the tnsnames file. If you selected N, you need to supply a TNS alias, and the prompts continue.
| |
Enter the ASM tns alias to be used by SharePlex:
|
Type the name of the TNS alias.
|
Enter an ASM admin (has both sysdba and sysasm privilege) username for alias:
|
Type the name of a user with sysasm and sysdba privileges to the ASM instance.
|
Enter user password for user:
|
Type the password of the user.
|
SharePlex installs internal objects that include a package to support the SDO_GEOMETRY data type of the Oracle Spatial and Graph option. If this option is not installed in the database, the following prompt is shown: The SharePlex object that supports replication of SDO_GEOMETRY cannot be installed because the Oracle Spatial and Graph feature is not installed. Do you want to continue with the setup without support for SDO_GEOMETRY? [n]:
|
Press Y to continue the database setup without support for SDO_GEOMETRY, or press N to terminate ora_setup.
|
When you set up SharePlex for database connection through a TNS alias and ASM connection locally through a BEQUEATH connection (through OS authentication), it is important to set up the tnsnames.ora file correctly on each node. Assuming a SharePlex database account exists on the primary node, SharePlex will always connect to the primary ASM_SID automatically because it was provided when SharePlex was installed. However, upon failover, SharePlex must query the local v$asm_client view to get the correct ASM_SID of the failover instance. Therefore, ensure that the IP address of a given node is always listed first in the local tnsnames.ora file on that node.
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. Conditions d’utilisation Confidentialité Cookie Preference Center