Description
Use the cleanup.sql script to truncate all of the SharePlex internal tables except the SHAREPLEX_PARTITION table (which contains partition schemes that might be needed again).
Note: The cleanup.sql script does not remove the SharePlex Oracle user, password, or demonstration objects from the SharePlex tables.
The cleanup.sql script preserves the replication data in the SharePlex variable-data directory. Other utilities provide related options:
- To clean out the variable-data directory without truncating the SharePlex tables, see clean_vardir.sh.
- To clean out the variable-data directory and truncate the SharePlex tables, see ora_cleansp. This utility completely restore SharePlex to an initial state.
Contact Quest Technical Support before running cleanup.sql for the first time. Unless a procedure in the SharePlex documentation requires running clean_vardir.sh, this utility rarely is appropriate in a production environment. It deactivates the configuration, and using it improperly can result in replication problems and the need to resynchronize the data. Usually, there is another alternative.
Supported databases
Oracle on Unix and Windows
Run cleanup.sql
-
Log into Oracle as the SharePlex database user. The SharePlex tables belong to that user. On Unix and Linux, If you are running multiple instances of sp_cop with multiple variable-data directories, there is a SharePlex Oracle user for each one. Make certain to run this script as the correct one.
-
(Unix and Linux) Set the SP_SYS_VARDIR environment variable to point to the SharePlex variable-data directory.
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 cleanup.sql as a SharePlex Administrator. The script is in the util sub-directory of the SharePlex product directory. Use the following syntax, where Oracle_version is one of the SharePlex-supported Oracle versions.
SQL> @proddir/util/cleanup.sql