Make Oracle changes that affect replication
This topic helps you make common changes to the Oracle environment while replication is active.
Supported databases
Oracle on Linux and UNIX
Move the location of ORACLE_HOME
If you change the ORACLE_HOME, you need to relink SharePlex to the Oracle libraries.
Perform the following steps to relink SharePlex to the Oracle libraries:
-
Shut down SharePlex.
sp_ctrl> shutdown
- Move the ORACLE_HOME.
- Edit the oratab file to point to the new ORACLE_HOME.
- Edit the connections.yaml file to point to the new ORACLE_HOME. This file is in the data subdirectory of the SharePlex var directory.
- Start SharePlex.
Change the target ORACLE_SID
- On the source system, run sp_ctrl.
-
On the source system, copy the active configuration file to a new name, but do not deactivate it.
sp_ctrl> copy config filename to newname
-
On the source system, open the new configuration file.
sp_ctrl> edit config filename
- Change the ORACLE_SID to the new one in all of the routing maps that include this target database and target system.
- Save and close the configuration file, but do not activate it.
- On the source system, stop user access to the objects involved in replication.
-
On the source system, flush the data in the queues to the target. This stops the Post process and establishes a synchronization point between the source and target databases.
sp_ctrl> flush datasource
where: datasource is the database indicator of the source instance, for example o.oraA.
-
On the source system, activate the new configuration file. This will deactivate the original configuration file.
sp_ctrl> activate config filename
Note: The activation will be brief because SharePlex does not need to analyze the tables.
- On the source system, allow users to access the objects involved in replication.
-
On the target system, verify that Post stopped. If Post is not stopped, continue to issue the command until it shows that Post stopped.
sp_ctrl> status
- On the target system, shut down the database and then rename the ORACLE_SID.
-
On the target system, start Post.
sp_ctrl> start post
Change the SharePlex database account
Change the SharePlex Database Account
You can change the user name (schema or database), the password, or both in the SharePlex database account. The database account was established during the installation of SharePlex. These procedures guide you through the process in the correct order to maintain an active replication configuration.
Supported databases
All SharePlex-supported databases
Procedure
This procedure changes the user account name and/or password of the SharePlex user account in a database. This user account is the one that the SharePlex processes use to connect to the database when performing replication tasks.
Important! If using multiple variable-data directories, you must run this procedure for each one that you want to change.
-
(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 changing the account name or password.
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 sp_ctrl on the system where you are changing the password.
-
Stop the SharePlex processes on the system where you are changing the account information. For example, if you are changing the SharePlex account in the source database, stop Capture and Read. If you are changing the account in the target database, stop Post.
sp_ctrl> stop service
-
Verify that all SharePlex replication processes for this instance of SharePlex are stopped.
sp_ctrl> status
- Log in to the database as a DBA user and change the SharePlex account name and/or password to the new ones. Important! Do not delete the SharePlex objects!
-
If you changed the account name, copy all of the SharePlex database objects from the old account to the new one.
Note: Keep the old account and SharePlex objects as backup until you are certain replication resumes properly.
-
In sp_crtl, issue the following command to change the account name and/or password in the SharePlex internal records.
To change the user account:
sp_ctrl> connection {o.SID | r.database} set user=username
To change the password:
sp_ctrl> connection {o.SID | r.database} set password=password
where:
-
Start the SharePlex processes.
sp_ctrl> start service
Change the name or IP address of a replication host
Use the provision utility to change a host name or IP address in the SharePlex configuration. For more information on changing the name or IP address of a replication host, see the Provision utility section in the SharePlex Reference Guide.
Set the SharePlex port number
Set the SharePlex Port Number
The SharePlex processes use TCP to communicate with each other between different systems and uses UDP to communicate within a system. The default TCP and UDP port numbers for SharePlex are both set to 2100 at the time of installation. For some deployments of SharePlex you may need to change the TCP or UDP port numbers.
Before selecting a port number, review the following points:
- If your replication strategy requires multiple instances of sp_cop on a system, you must set a unique port number for each one. For more information, see Run Multiple Instances of SharePlex.
- When an non-default port is required, the same number must be used for both the TCP and UDP ports, and it must be used for the TCP and UDP ports of all other instances of sp_cop that are involved in the same replication configuration. If the ports are different, sp_cop on one system cannot connect to the sp_cop on another system to send or receive messages and data.
Supported databases
All databases supported by SharePlex on all supported platforms
Set the SharePlex port on Unix and Linux systems
To set the port number on Unix and Linux systems, a SharePlex Administrator must set both the TCP and UDP port parameters in the SharePlex environment. If there is an active configuration, you will be instructed to stop access to the source objects and shut down sp_cop.
To finish setting the port in an active configuration:
-
(If using multiple variable-data directories] Export the SP_SYS_VARDIR environment variable to point to the correct variable-data directory for the port you are setting.
ksh shell:
export SP_SYS_VARDIR=/full_path_of_variable-data_directory
csh shell:
setenv SP_SYS_VARDIR=/full_path_of_variable-data_directory
-
Export the following environment variables.
ksh shell:
export SP_COP_TPORT=port
export SP_COP_UPORT=port
csh shell:
setenv SP_COP_TPORT port
setenv SP_COP_UPORT port
where: port is the new port number
- Change directories to the SharePlex product directory.
-
Start sp_cop and sp_ctrl.
Note:If you are using multiple variable-data directories, start sp_cop with the -uport option, where port is the port number that you have chosen for the variable-data directory that you exported.
./sp_cop [-uport] &
-
Run sp_ctrl.
./sp_ctrl
-
In sp_ctrl, set the following SharePlex parameters.
sp_ctrl> set param SP_COP_TPORT port
sp_ctrl> set param SP_COP_UPORT port
-
Do one of two things:
-
If there is not an active configuration, use the shutdown command in sp_ctrl to stop sp_cop. The next time you start sp_cop, the new port number takes effect.
NOTE: If you do not have an active configuration, you are finished setting the port number.
-
If there is an active configuration, continue to the next step.
-
Stop access to the replicating objects on the source system, then issue the flush command in sp_ctrl on the source system to clear the queues.
sp_ctrl> flush o.database_identifier
where: database_identifier is o. followed by the Oracle SID, TNS alias, or PDB name that SharePlex uses to connect to the source database (depends on whether the database is a regular Oracle instance, RAC, or PDB in a container database).
-
On the source system, issue the qstatus command to verify that all of the messages reached the target system.
sp_ctrl> qstatus
Continue to issue the command until the export queue is empty.
- On the target system, issue the qstatus command to verify that all of the messages were posted to the database. Continue to issue the command until the post queue is empty.
-
On the target system, issue the status command to verify that Post stopped.
sp_ctrl> status
-
Shut down SharePlex on the source and target systems.
sp_ctrl> shutdown
-
Start sp_cop on the source and target systems.
Note:If you are using multiple variable-data directories, start sp_cop with the -uport option, where port is the port number that you have chosen for the variable-data directory that you exported.
./sp_cop [-uport] &
- Run sp_ctrl on the target system.
-
Start the Post process.
sp_ctrl> start post
- Allow users to access the replicating objects.
-
Use the status command on the source and target systems to verify that all SharePlex processes are running.
sp_ctrl> status
Set the SharePlex port on Windows systems
On Windows systems, SharePlex port numbers are stored in the Windows Registry. If it becomes necessary to change a port number, this is the SharePlex entry location:
\HKEY_LOCAL_MACHINE\Software\Wow6432node\Quest Software\SharePlex.
- Log onto Windows as a SharePlex Administrator using your system password and user name. Your user name must be assigned to the SharePlexAdmin group.
- Run the SpUtils utility.
- Select the SharePlex Services tab.
- Under Port, select the port number for the instance of SharePlex whose port you want to change.
- Under SharePlex Service Status, click Stop.
- Click Close.
- From the Start menu, select Run.
- In the Run dialog box, type regedit to open the Registry Editor.
- In the Registry Editor, under \HKEY_LOCAL_MACHINE\Software\Wow6432node\Quest Software\SharePlex, right click the current port number, then select Rename.
- Replace the highlighted port number with the new number.
- Click the new port number to highlight it.
- In the Name column of the right-hand pane, right-click the SP_SYS_VARDIR entry that is associated with the new port number, then select Modify.
- In the Edit String dialog, change the port number (only the port number) in the path to the new port number, then click OK.
- Exit the Registry Editor.
- In the Windows file explorer, navigate to the variable-data directory for which you changed the port number (the one whose name still shows the old port number).
- Right click the name, and then use the Rename command to change only the port number in the name to the new port number.
- Run the SpUtils utility, then select the SharePlex Services tab.
- Under Port, select the new port number.
- Under SharePlex Service Status, click Install to establish the SharePlex service under the new port.
- After Current State shows that the service is installed, click Start to start the service.