Sets the current database to be used for SQL statement execution.
pdb_set_sql_database database
The name of the database in the primary data server against which SQL statements can be executed. This parameter can be delimited with quote characters to specify character case.
When pdb_get_sql_database is invoked, it sets the database in which SQL statements can be executed.
Some database servers and communication drivers do not
allow you to change the current database.
The database name you specify with the pdb_get_sql_database command is not validated. If you specify an invalid database name, no error is returned until the pdb_execute_sql command is invoked.
To determine which database is currently specified for SQL statement execution, use the pdb_get_sql_database command. If a database has not been specified for SQL statement execution with the pdb_set_sql_database command, the pdb_get_sql_database command returns the default current database.
The default current database is the primary database to which the Replication Agent instance is connected (as specified by the Replication Agent pds_database_name configuration parameter). If a database has not been specified for SQL statement execution, the pdb_execute_sql command executes the SQL query against the primary database.
The pdb_set_sql_database command is valid when the Replication Agent instance is in either Admin or Replicating state.
pdb_execute_sql, pdb_get_sql_database