ODBC supports a number of APIs that return system catalog information in a standard way. In order to support these APIs, the Open Data Services ODBC driver calls the following catalog stored procedures:
Procedure | Returns |
---|---|
sp_column_privileges | Information about column privileges for the specified table or tables. |
sp_columns | Information about columns for the specified table or tables. |
sp_databases | A list of databases. |
sp_datatype_info | Information about the datatypes (used only by the Open Data Services ODBC driver if the resources DLL does not contain this information). |
sp_fkeys | Information about foreign keys. |
sp_pkeys | Information about primary keys. |
sp_server_info | A list of attribute names and matching values for the server (only attributes 1, 2, and 500 are used by the Open Data Services ODBC driver). |
sp_special_columns | Information for a single table about columns in the table that have special attributes. |
sp_sproc_columns | Column information for a stored procedure. |
sp_statistics | A list of indexes for a single table. |
sp_stored_procedures | A list of stored procedures. |
sp_table_privileges | Information about table privileges for the specified table or tables. |
sp_tables | A list of objects that can be queried. |
The Open Data Services ODBC driver calls these catalog stored procedures as SRV_RPC events if the IDS_FEATURE_RPC_SUPPORT flag is set to Y in the gateway resources DLL; otherwise, it calls them as srv_language events. Note that the sp_server_info and sp_datatype_info procedures are used only in a limited way, because much of this information is stored in the gateway resources DLL file instead. For more information about catalog stored procedures, see the Microsoft SQL Server Transact-SQL Reference.