Creating a Shard Catalog Standby

You can modify the shard director to add a standby shard catalog database (that has already been created).

This procedure assumes you have already created and configured a database appropriate for a shard catalog Create the Shard Catalog Database.

  1. Modify the shard director to add a standby shard catalog database.

    When the standby shard catalog is not added in the connect string for ADD GSM it can be done using MODIFY GSM.

    Use the following command for each shard director in the distributed database configuration. Include the full connect string to include both the primary and standby catalog databases.

    A service can be created to use that instead of giving the full connect string.

    GDSCTL> MODIFY GSM -gsm shard_director_name
     -catalog '(DESCRIPTION =(CONNECT_TIMEOUT=3)(TRANSPORT_CONNECT_TIMEOUT=3)(RETRY_COUNT=3)(FAILOVER=ON)(ADDRESS_LIST= (address = (protocol = tcp)(host = &primaryCatalog)(port = &dbport))(address = (protocol = tcp)(host = &standbyCatalog)(port = &dbport)))(CONNECT_DATA =(SERVICE_NAME = &serviceName)))'
     -pwd gsmcatuser_password
  2. Restart the shard director to use the updated connection string with the standby catalog database.
    GDSCTL> stop gsm
    GDSCTL> start gsm
  3. Switch over from the shard catalog primary database to its standby.
    $dgmgrl
    DGMGRL> connect sys/password as sysdba
    DGMGRL> show configuration
    DGMGRL> SWITCHOVER TO '&PhysicalStandby'

    In this case, we are switching over to <Catalog1b>

    DGMGRL> show configuration
  4. After the catalog switchover, open the PDBs on the original shard catalog primary (recently switched to catalog standby).
    $ sqlplus / as sysdba
    SQL> show pdbs

    It will show OPEN MODE as "MOUNTED"

    SQL>alter pluggable database all open services=all;
    SQL>show pdbs

    It will show OPEN MODE as "READ ONLY"

    Note:

    The catalog database may need to be restarted if the database is not in the expected mode, even after following the above steps.

  5. Validate the GSM connection.
    $gdsctl validate
  6. Validate logs showing switchover activities.

    Check observer logs at $GSM_HOME/network/admin

    Validate observer logs on each database.

    Verify that none of the observer logs shows errors from any databases or shard directors (GSMs).