Schema Rowset Support (OLE DB)

 

System_CAPS_ICON_warning.jpg Warning

SQL Server Native Client (SNAC) is not supported beyond SQL Server 2012. Avoid using SNAC in new development work, and plan to modify applications that currently use it. The Microsoft ODBC Driver for SQL Server provides native connectivity from Windows to Microsoft SQL Server and Microsoft Azure SQL Database.

The SQL Server Native Client OLE DB provider also supports returning schema information from a linked server when processing Transact-SQL distributed queries.

System_CAPS_ICON_note.jpg Note


Although SQL Server supports synonyms, metadata for synonyms is not returned by SQL Server Native Client.

The following tables list schema rowsets and the restriction columns supported by the SQL Server Native Client OLE DB provider.

Schema rowsetRestriction columns
DBSCHEMA_CATALOGSCATALOG_NAME
DBSCHEMA_COLUMN_PRIVILEGESAll the restrictions are supported.

TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME GRANTOR GRANTEE
DBSCHEMA_COLUMNSAll the restrictions are supported.

TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME

The following additional columns are specific to SQL Server:

COLUMN_LCID, which is the locale ID of the collation. COLUMN_LCID is the same value as a Windows LCID.

COLUMN_COMPFLAGS defines which comparisons are supported for the collation. The data format is the same as DBPROB_FINDCOMPAREOPS.

COLUMN_SORTID, which is the SQL Server sorting style for the collation.

COLUMN_TDSCOLLATION, which is the SQL Server collation for the column.

IS_COMPUTED, which is VARIANT_TRUE if the column is a computed column and VARIANT_FALSE otherwise.
DBSCHEMA_FOREIGN_KEYSAll restrictions are supported.

PK_TABLE_CATALOG PK_TABLE_SCHEMA PK_TABLE_NAME FK_TABLE_CATALOG FK_TABLE_SCHEMA FK_TABLE_NAME
DBSCHEMA_INDEXESRestrictions 1, 2, 3, and 5 are supported.

TABLE_CATALOG TABLE_SCHEMA INDEX_NAME TABLE_NAME
DBSCHEMA_PRIMARY_KEYSAll restrictions are supported.

TABLE_CATALOG TABLE_SCHEMA TABLE_NAME
DBSCHEMA_PROCEDURE_PARAMETERSAll restrictions are supported.

PROCEDURE_CATALOG PROCEDURE_SCHEMA PROCEDURE_NAME PARAMETER_NAME
DBSCHEMA_PROCEDURESRestrictions 1, 2, and 3 are supported.

PROCEDURE_CATALOG PROCEDURE_SCHEMA PROCEDURE_NAME

DBSCHEMA_PROCEDURES returns only procedures that can be executed by the current user, or for which the current user has been granted VIEW DEFINITION permission.
DBSCHEMA_PROVIDER_TYPESAll restrictions are supported.

DATA_TYPE BEST_MATCH
DBSCHEMA_SCHEMATAAll restrictions are supported.

CATALOG_NAME SCHEMA_NAME SCHEMA_OWNER
DBSCHEMA_STATISTICSAll restrictions are supported.

TABLE_CATALOG TABLE_SCHEMA TABLE_NAME
DBSCHEMA_TABLE_CONSTRAINTSAll restrictions are supported.

CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE
DBSCHEMA_TABLE_PRIVILEGESAll restrictions are supported.

TABLE_CATALOG TABLE_SCHEMA TABLE_NAME GRANTOR GRANTEE
DBSCHEMA_TABLESAll restrictions are supported.

TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE
DBSCHEMA_TABLES_INFOAll restrictions are supported.

TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE

Distributed Query Support in Schema Rowsets

LINKEDSERVERS Rowset (OLE DB)

SQL Server Native Client (OLE DB)
Using User-Defined Types

Community Additions

ADD
Show: