Returns a list of primary key columns in a specified table in the current database at the primary data server.
pdb_get_primary_keys ownername, tablename
The user name of the owner of the table specified in tablename. This option can be delimited with quote characters to specify character case.
The name of the table in the current database for which primary key column information is returned. This option can be delimited with quote characters to specify character case.
When pdb_get_primary_keys is invoked, it returns a result set that lists all of the columns that are defined as primary keys in the specified table with the specified owner in the current database.
The pdb_get_primary_keys command accepts the % wildcard character in the ownername option, but not in the tablename option.
The default current database is the primary database to which the Mirror Replication Agent instance is connected. The current default 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_get_primary_keys command
returns results from the primary database to which the Mirror Replication Agent instance is
connected.
To set or change the current database, use the pdb_set_sql_database command.
To find the name of the current database, use the pdb_get_sql_database command.
The pdb_get_primary_keys command returns 0 rows if the specified table with the specified owner does not exist in the current database.
The pdb_get_primary_keys command is valid when the Mirror Replication Agent instance is in either Admin or Replicating state.
pdb_get_columns, pdb_get_databases, pdb_get_procedure_parms, pdb_get_procedures, pdb_get_tables