Tchater maintenant avec le support
Tchattez avec un ingénieur du support

SharePlex 11.4 - Reference Guide

About this guide Conventions used in this guide Revision History SharePlex Commands for Oracle SharePlex parameters SharePlex Commands for PostgreSQL SharePlex Parameters for PostgreSQL General SharePlex utilities Oracle Cloud Infrastructure SharePlex environment variables

mysql_cleansp

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

  • To use this utility, the Korn (ksh) shell must be installed on the system. The utility calls this shell during processing.

  • mysql_cleansp must be run on all MySQL target systems in the replication configuration.
  • To fully remove the replication environment, run the ora_cleansp utility on all Oracle source systems in the replication configuration. To verify if and when mysql_cleansp or ora_cleansp was run on a system, view the SharePlex event log on that system.
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

To run mysql_cleansp:

  1. Stop all SharePlex processes on the system.
  2. Shut down sp_cop.
  3. 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.
  4. Enter the password at the prompt.

    Enter the password for the SharePlex User :

  5. 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

ora_cleansp

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 Unix and Linux

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 bin sub-directory (Unix and Linux systems) of the product directory.
  • On Unix and Linux systems, you can purge the files in the variable-data directory, without truncating the SharePlex tables, by running the cleanup.sql script from the bin sub-directory of the SharePlex 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.

To 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.

  1. Log on as a SharePlex Administrator.
  2. [Unix and Linux ONLY] Set the SP_SYS_VARDIR environment variable to point to the SharePlex variable-data directory. If you are running multiple instances of sp_cop using multiple variable-data directories, set SP_SYS_VARDIR for the variable-data directory that you want to clean up.

    ksh shell:

    $export SP_SYS_VARDIR=/SharePlex_vardir_absolute_path

    csh shell:

    $setenv SP_SYS_VARDIR /SharePlex_vardir_absolute_path
  3. Run sp_ctrl from the bin sub-directory of the SharePlex product directory.
  4. Shut down sp_cop.

    sp_ctrl> shutdown
  5. Verify that all SharePlex processes are stopped by using either the ps -ef | grep sp_ command on Unix and Linux systems.
  6. Kill all orphan SharePlex processes by using either the kill -9 command on Unix and Linux systems.
  7. [Unix and Linux ONLY] If you have not done so already, view the oratab file to determine the values for ORACLE_HOME and ORACLE_SID for the instance.

    $cd /etc
    $ more oratab
  8. [Unix and Linux ONLY] Set the ORACLE_HOME and ORACLE_SID environment variables.

    ksh shell:

    $export ORACLE_HOME=[value from oratab file]
    $export ORACLE_SID=[value from oratab file]

    csh shell:

    $ setenv ORACLE_HOME [value from oratab file]
    $ setenv ORACLE_SID [value from oratab file]
  9. 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.

  10. 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.

    Additionally, on Unix and Linux, include the database/datasource name (Oracle_SID) as defined in the connections.yaml file.

    Unix and Linux:

    $ ./ora_cleansp database_name/SharePlex_username[/SharePlex_password]

    (For an Oracle PDB): $./ora_cleansp tns_alias for pdb/SharePlex_username[/SharePlex_password]

  11. 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.

PG_cleansp

pg_cleansp Utility

Description

Use the pg_cleansp utility to remove the current replication state on a system where SharePlex is replicating data from PostgreSQL Database as a Service to a PostgreSQL target.

Caution: The effects of pg_cleansp are not reversible.

Usage guidelines

  • To use this utility, the Korn (ksh) shell must be installed on the system. The utility calls this shell during processing.

  • pg_cleansp must be run on all PostgreSQL source and target systems in the replication configuration.
  • To fully remove the replication environment, run the pg_cleansp utility on all PostgreSQL source systems in the replication configuration. To verify if and when pg_cleansp was run on a system, view the SharePlex event log on that system.

What this utility does

pg_cleansp does the following on the source system:

  • Truncates all the SharePlex Client internal tables 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 statusdb file, the contents of the dump and state directories, and all but one entry in the event log (the status entry for pg_cleansp)
  • Drops replication slots (physical/logical)

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

To run the pg_cleansp utility on PostgreSQL source and target:

  1. Stop all SharePlex processes on the system.
  2. Shut down sp_cop.
  3. Run the pg_cleansp utility from the bin sub-directory of the SharePlex product directory with the following syntax:

    <installationDirectiory\ProductDirectory>/binpg_cleansp [portnumber ] database_name/user_name

    where:

    • portnumber 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.
  4. Enter the password at the prompt.

    Enter the password for the SharePlex User :

  5. 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

A successful setup terminates with a message similar to the following:

Clean port 3800

sh: /splex/atul/1100B51/opt/.app-modules//clean_vardir.sh: /bin/ksh: bad interpreter: No such file or directory

postgress internal tables are cleaned up.

Note: In SharePlex 11.1, physical or logical slots created at activation will get dropped from the database after cleanup.

Snowflake_Cleansp Utility

Description

Use the snowflake_cleansp utility to remove the current replication state on a system where SharePlex is replicating to a Snowflake target.

Caution: The effects of snowflake_cleansp are not reversible.

Usage guidelines

  • To use this utility, the Korn (ksh) shell must be installed on the system. The utility calls this shell during processing.
  • snowflake_cleansp must be run on all Snowflake target systems in the replication configuration.
  • To fully remove the replication environment, run the snowflake_cleansp utility on all Snowflake target systems in the replication configuration. To verify if and when snowflake_cleansp was run on a system, view the SharePlex event log on that system.

What this utility does

snowflake_cleansp does the following on the target system:

  • Truncates all the SharePlex Client internal tables 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 statusdb file, the contents of the dump and state directories, and all but one entry in the event log (the status entry for snowflake_cleansp)

snowflake_cleansp preserves the following:

  • The SharePlex database, account, and password, and only cleans the data in the SharePlex internal tables.
  • User-created files such as the paramdb and the target configuration settings

To run the snowflake_cleansp utility on Snowflake target:

  1. Stop all SharePlex processes on the system.
  2. Shut down sp_cop.
  3. Run the snowflake_cleansp utility from the bin sub-directory of the SharePlex product directory with the following syntax:

    <installationDirectiory\ProductDirectory>/binsnowflake_cleansp [portnumber ] database_name/ schema name / user_name

    where:

    • portnumber is the port number of the SharePlex instance, if other than the default of 2100.
    • database_name is the name of the SharePlex database.
    • schema_name is the name of the Shareplex schema.

    • user_name is the name of the SharePlex user account.
  4. Enter the password at the prompt.

    Enter the password for the SharePlex User :

    Note: This option will not be displayed for the RSA based user.

  5. 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

A successful setup terminates with a message similar to the following:

Clean port 5626

Cleaning /splex/aparopka/sf_datatypes/var subdirectories

DEMO_SCHEMA_20.SHAREPLEX_OPEN_TRANS table truncated.

Documents connexes

The document was helpful.

Sélectionner une évaluation

I easily found the information I needed.

Sélectionner une évaluation