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_set_sql_database is invoked, it sets the database in which SQL statements can be executed.
Some data servers and communication drivers do not allow
you to change the current database.
The database name you specify with the pdb_set_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 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.
The default current database is the primary database to which the Mirror Replication Agent instance is connected. The default current database is identified by the pds_database_name configuration parameter.
If the pdb_set_sql_database command has not been invoked to set the current database, the pdb_execute_sql command executes the SQL query against the primary database (the default current database).
The pdb_set_sql_database command is valid when the Mirror Replication Agent instance is in either Admin or Replicating state.