sp_catalogs (Transact-SQL)


Returns the list of catalogs in the specified linked server. This is equivalent to databases in SQL Server.

Applies to: SQL Server (SQL Server 2008 through current version).

Topic link icon Transact-SQL Syntax Conventions

sp_catalogs [ @server_name = ] 'linked_svr'  

[ @server_name =] 'linked_svr'
Is the name of a linked server. linked_svr is sysname, with no default.

Column nameData typeDescription
Catalog_namenvarchar(128)Name of the catalog
Descriptionnvarchar(4000)Description of the catalog

Requires SELECT permission on the schema.

The following example returns catalog information for the linked server named OLE DB ODBC Linked Server #3.

System_CAPS_ICON_note.jpg 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 (Transact-SQL)
sp_columns_ex (Transact-SQL)
sp_column_privileges (Transact-SQL)
sp_foreignkeys (Transact-SQL)
sp_indexes (Transact-SQL)
sp_linkedservers (Transact-SQL)
sp_primarykeys (Transact-SQL)
sp_tables_ex (Transact-SQL)
sp_table_privileges (Transact-SQL)
System Stored Procedures (Transact-SQL)

Community Additions