Description
Use the mss_cleansp utility to remove the current replication state on a SQL Server system.
Caution:
- Running mss_cleansp can be acceptable in a test or demonstration environment, but it rarely is appropriate in a production environment. The effects of the cleanup are not reversible.
- To fully remove the replication environment, run the mss_cleansp utility on the target system. If the source system is Oracle, run the ora_cleansp utility. To verify if and when mss_cleansp or ora_cleansp was run on a system, view the SharePlex event log on that system.
- If the SharePlex instance for which you are running mss_cleansp is configured to post to multiple databases, mss_cleansp will remove the replication configuration and supporting data for all of those databases.
mss_cleansp does the following on the target system:
- Truncates the SHAREPLEX_OPEN_TRANS internal table and any other SharePlex-installed tables as applicable.
- Removes the following from the variable-data directory: the queue files, the process log files, the contents of the statusdb (but not the file), the contents of the dump and state directories, and all but one entry in the event log (the status entry for mss_cleansp)
mss_cleansp preserves the following:
- The SharePlex database, account, and password, and only cleans the data in the SharePlex tables.
- User-created files such as the paramdb and the target configuration settings
Supported databases
Microsoft SQL Server on Windows
Run mss_cleansp
- Stop all SharePlex processes on the system.
- Shut down sp_cop.
-
Run the mss_cleansp utility from the bin sub-directory of the SharePlex product directory with the following syntax:
C:\users\splex\bin>mss_cleansp [port number ] database_name/user_name
where:
- port number is the port number of the SharePlex instance, if other than the default of 2100.
- database_name is the name of the SharePlex database.
- user_name is the name of the SharePlex user account.
-
Enter the password at the prompt.
Enter the password for the SharePlex User :
-
Type Y to confirm that you want to run cleanup for this SharePlex instance.
Are you sure you want to perform the clean for 'C:\splex\vardir\var2200' and port 2200? [N] :Y
Description
Use the mysql_cleansp utility to remove the current replication state on a MySQL system.
Caution: Running mysql_cleansp can be acceptable in a test or demonstration environment, but it rarely is appropriate in a production environment. The effects of the cleanup are not reversible.
Usage guidelines
What this utility does
mysql_cleansp does the following on the target system:
- Truncates the SHAREPLEX_OPEN_TRANS internal table and any other SharePlex-installed tables as applicable.
- Removes the following from the variable-data directory: the queue files, the process log files, the contents of the statusdb (but not the file), the contents of the dump and state directories, and all but one entry in the event log (the status entry for mysql_cleansp)
mysql_cleansp preserves the following:
- The SharePlex database, account, and password, and only cleans the data in the SharePlex tables.
- User-created files such as the paramdb and the target configuration settings
Supported databases
MySQL on supported UNIX platforms
Run mysql_cleansp
- Stop all SharePlex processes on the system.
- Shut down sp_cop.
-
Run the mysql_cleansp utility from the bin sub-directory of the SharePlex product directory with the following syntax:
C:\users\splex\bin>mysql_cleansp [port number ] database_name/user_name
where:
- port number is the port number of the SharePlex instance, if other than the default of 2100.
- database_name is the name of the SharePlex database.
- user_name is the name of the SharePlex user account.
-
Enter the password at the prompt.
Enter the password for the SharePlex User :
-
Type Y to confirm that you want to run cleanup for this SharePlex instance.
Are you sure you want to perform the clean for '/splex/vardir/var2200' and port 2200? [N] : Y
Description
Use the ora_cleansp utility to remove the current replication state on a system, including deactivating configurations.
Caution:
- Running ora_cleansp can be acceptable in a test or demonstration environment, but it rarely is appropriate in a production environment. The effects of the cleanup are not reversible.
- If the SharePlex instance for which you are running ora_cleansp is configured to capture from or post to multiple databases, ora_cleansp will remove the replication configuration and supporting data for all of those databases.
- While running the ora_cleansp utility, enter the TNS alias provided while performing ora_setup.
Supported databases
Oracle on Windows
Other alternatives to ora_cleansp
Before running ora_cleansp, consider the following alternatives:
- To stop activity for a configuration without restoring replication to an initial state, you might be able to use the abort config or purge config command in sp_ctrl.
- To truncate the SharePlex tables without purging files in the variable-data directory, you can run the cleanup.sql script from the util sub-directory of the product directory.
Shell requirement
To use this utility, the Korn (ksh) shell must be installed on the system. The utility calls this shell during processing.
How ora_cleansp works
ora_cleansp works in two stages to restore replication to an initial state, as follows:
truncate internal tables: First ora_cleansp truncates any SharePlex internal tables that can be truncated safely. It does not remove the SharePlex Oracle user, password, or demonstration objects.
clean the variable-data directory: Next, ora_cleansp removes the following components from the SharePlex variable-data directory:
- The queue files in the rim sub-directory.
- The log files in the log sub-directory. The Event log retains one entry reflecting the outcome of the ora_cleansp procedure.
- The contents of the statusdb file in the data sub-directory.
- The contents of the dump and state sub-directories.
- Any transactions in the oos sub-directory, if the SP_OPO_SAVE_OOS_TRANSACTION parameter is enabled.
ora_cleansp preserves user-created files such as configuration files, conflict-resolution files, transformation files, hint files, the paramdb, and the oramsglist file.
ora_cleansp deactivates configurations. To start replication after running ora_cleansp, you must activate a configuration.
Run ora_cleansp
Important! ora_cleansp must be run on all source and target systems to restore replication to an initial state. To verify if and when ora_cleansp was run on a system, view the Event Log on that system.
- Log on as a SharePlex Administrator.
- Run sp_ctrl from the bin sub-directory of the SharePlex product directory.
-
Shut down sp_cop.
sp_ctrl> shutdown
- Verify that all SharePlex processes are stopped by using the Taskmgr from the SpUtil program.
- Kill all orphan SharePlex processes by using the KillSharePlex.bat program.
-
On the command line of the operating system, change directories to the bin sub-directory of the SharePlex product directory (note: this must be the current working directory).
-
Run ora_cleansp as the SharePlex user account in the Oracle instance. Note: If run as a different user, ora_cleansp does not truncate the SharePlex tables.
C:\users\splex\bin>ora_cleansp SharePlex_username[/SharePlex_password]
(For an Oracle PDB): C:\users\splex\bin>ora_cleansp SharePlex_username[/SharePlex_password@tns_alias for pdb]
Important! On Windows, if you installed SharePlex on any port other than the default of 2100, use the -r option to specify the port number. For example, in the following command the port number is 9400:
C:\users\splex\bin>ora_cleansp SharePlex_username[/SharePlex_password] -r9400
-
View the Event Log after you run the utility to confirm its results.
Note: If the utility generates an error message stating that it cannot remove the .../ save_SharePlex_version directory, you can ignore the message and remove this directory.
Description
Use the pg_cleansp utility to remove the current replication state on a system where SharePlex is replicating data from an Oracle source to a PostgreSQL target.
Caution: The effects of pg_cleansp are not reversible. To stop replication without restoring it to an initial state, you might be able to use the abort config or purge config command.
Usage Guidelines
What this Utility does
pg_cleansp does the following on the target system:
- Truncates the SHAREPLEX_OPEN_TRANS internal table in the SharePlex schema and any other SharePlex-installed tables as applicable.
- Removes the following from the variable-data directory: the queue files, the process log files, the contents of the statusdb (but not the file), the contents of the dump and state directories, and all but one entry in the event log (the status entry for pg_cleansp)
pg_cleansp preserves the following:
- The SharePlex database, account, and password, and only cleans the data in the SharePlex tables.
- User-created files such as the paramdb and the target configuration settings
Supported databases
All implementations of the Postgres open-source database on supported platforms
Run pg_cleansp
- Stop all SharePlex processes on the system.
- Shut down sp_cop.
-
Run the pg_cleansp utility from the bin sub-directory of the SharePlex product directory with the following syntax:
C:\users\splex\bin>pg_cleansp [port number ] database_name/user_name
where:
- port number is the port number of the SharePlex instance, if other than the default of 2100.
- database_name is the name of the SharePlex database.
- user_name is the name of the SharePlex user account.
-
Enter the password at the prompt.
Enter the password for the SharePlex User :
-
Type Y to confirm that you want to run cleanup for this SharePlex instance.
Are you sure you want to perform the clean for '/splex/vardir/var2' and port 2200? [N] : Y