Returns the list of catalogs in the specified linked server, which is equivalent to databases in Microsoft® SQL Server™.
sp_catalogs [@server_name =] 'linked_svr'
None
Column name | Data type | Description |
---|---|---|
catalog_name | nvarchar(128) | Name of the catalog |
Description | nvarchar(4000) | Description of the catalog |
Execute permissions default to the public role.
This example returns catalog information for the linked server named OLE DB ODBC Linked Server #3.
Note For sp_catalogs to provide useful information, the OLE DB ODBC Linked Server #3 must already exist.
USE master
EXEC sp_catalogs 'OLE DB ODBC Linked Server #3'
sp_addlinkedserver | sp_linkedservers |
sp_columns_ex | sp_primarykeys |
sp_column_privileges | sp_tables_ex |
sp_foreignkeys | sp_table_privileges |
sp_indexes | System Stored Procedures |