sp_catalogs (Transact-SQL)
SQL Server 2008 Books Online (October 2009)
sp_catalogs (Transact-SQL)

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

Topic link icon Transact-SQL Syntax Conventions

Syntax

sp_catalogs [ @server_name = ] 'linked_svr'
Arguments

[ @server_name =] 'linked_svr'

Is the name of a linked server. linked_svr is sysname, with no default.

Result Sets

Column name Data type Description

Catalog_name

nvarchar(128)

Name of the catalog

Description

nvarchar(4000)

Description of the catalog

Permissions

Requires SELECT permission on the schema.

Examples

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

ms189764.note(en-us,SQL.100).gifNote:
For sp_catalogs to provide useful information, the OLE DB ODBC Linked Server #3 must already exist.

USE master
GO
EXEC sp_catalogs 'OLE DB ODBC Linked Server #3'
See Also

Reference

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)

Help and Information

Getting SQL Server 2008 Assistance
© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View