Provides information about remote tables with primary keys that correspond to a specified foreign key.
The server must be defined with the CREATE SERVER statement to use this system procedure.
sp_remote_imported_keys @server_name , @sp_name [, @sp_owner ] [, @sp_qualifier ]
None.
Chapter 16, “Accessing Remote Data” and Chapter 17, “Server Classes for Remote Data Access” in the Sybase IQ System Administration Guide.
Foreign keys reference a row in a separate table that contains the corresponding primary key. This procedure allows you to obtain a list of the remote tables with primary keys that correspond to a particular foreign key table. The sp_remote_imported_keys result set includes the database, owner, table, column, and name for both the primary and the foreign key, as well as the foreign key sequence for the foreign key column. The result set might vary because of the underlying ODBC and JDBC calls, but information about the table and column for a primary key is always returned.
To use sp_remote_exported_keys, your database must be created or upgraded using version 12.4.3 or higher of Sybase IQ.
Table 10-58 lists the sp_remote_imported_keys parameters.
Name |
Data type |
Description |
---|---|---|
@server_name |
varchar |
Server on which the foreign-key table is located. Required. |
@sp_name |
varchar(30) |
Table containing the foreign key. Required. |
@sp_owner |
varchar |
Owner of foreign-key table. Optional. |
@sp_qualifier |
varchar |
Database containing the foreign-key table. Optional. |
Gets information about the tables with primary keys that correspond to a foreign key on the sysobjects table, owned by “fred”, in the asetest server:
call sp_remote_imported_keys (@server_name='asetest', @sp_name='sysobjects', @sp_qualifier='production')