다음을 통해 공유


SQLLinkedCatalogs

SQLLinkedCatalogs returns a list of catalogs available on a linked server.

구문

SQLRETURN SQLLinkedCatalogs(
      SQLHSTMT hstmt,
      SQLTCHAR* ServerName,
   SQLSMALLINTNameLength1)

Arguments

  • hstmt
    Is an ODBC statement handle.
  • ServerName
    Is the name of the linked server. Linked server names are returned in the SRV_NAME column of the result set defined for SQLLinkedServers.
  • NameLength1
    Is the length of ServerName, in characters.

Returns

SUCCEED or FAIL.

Comments

SQL Server linked servers are OLE DB data sources. Some OLE DB data sources expose catalogs. For those that do, SQLLinkedCatalogs returns the list of data source exposed catalogs.

SQLLinkedCatalogs returns a result set defined as follows.

Column name Column number Data type Comments

CATALOG_NAME

1

SQLWCHAR

Name of the catalog.

DESCRIPTION

2

SQLWCHAR

Human-readable description of the catalog.

참고 항목

참조

Schema Functions Supporting Distributed Queries

도움말 및 정보

SQL Server 2005 지원 받기