pdb_set_sql_database

Sets the current database to be used for SQL statement execution.

Syntax

pdb_set_sql_database database

Parameters

Usage

  • When pdb_set_sql_database is invoked, it sets the “current” database, in which Replication Agent can execute SQL queries.

    Note: The pdb_set_sql_database command has no effect in Oracle, but it is included to provide continuity with other Replication Agents that support database servers with multiple databases.
  • Replication Agent does not validate the database name you specify with pdb_set_sql_database.

    If you specify an invalid database name, no error is returned until one of the following Replication Agent commands is invoked:
    • pdb_execute_sql

    • pdb_get_columns

    • pdb_get_primary_keys

    • pdb_get_procedure_parms

    • pdb_get_procedures

    • pdb_get_tables

  • To find the name of the current database, use pdb_get_sql_database.

    Note: If the pdb_set_sql_database command has not been invoked to set the current database, the pdb_get_sql_database command returns the default current database, which is the primary database specified in the Replication Agent pds_database_name configuration parameter.
  • The pdb_set_sql_database command is valid when the Replication Agent instance is in the Admin, Replicating, or Replication Down state.

Related reference
pdb_execute_sql
pdb_get_sql_database