EnumTables Method
This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.
The EnumTables method returns a QueryResults object that enumerates the tables of a linked server.
Constant | Value | Description |
|---|---|---|
SQLDMOLinkedTable_/GlobalTemporary | 2 | Restrict result set membership to global temporary tables. |
SQLDMOLinkedTable_LocalTemporary | 3 | Restrict result set membership to local temporary tables. |
SQLDMOLinkedTable_Alias | 1 | Restrict result set membership to alias tables. |
SQLDMOLinkedTable_Default | 0 | No restriction. |
SQLDMOLinkedTable_SystemTable | 4 | Restrict result set membership to system tables. |
SQLDMOLinkedTable_SystemView | 7 | Restrict result set membership to System views. |
SQLDMOLinkedTable_Table | 5 | Restrict result set membership to user tables. |
SQLDMOLinkedTable_View | 6 | Restrict result set membership to views. |
A QueryResults object that contains one result set defined by these columns.
Column | Data type | Description |
|---|---|---|
TABLE_CAT | nvarchar(129) | Catalog name. May be NULL. |
TABLE_SCHEM | nvarchar(129) | Schema name. May be NULL. |
TABLE_NAME | nvarchar(129) | Table name. |
TABLE_TYPE | nvarchar(129) | Type of table. |
REMARKS | nvarchar(256) | Descriptive text. May be NULL. |
The EnumTables method is implemented using the IDBSchemaRowset interface of the OLE DB provider specified by the linked server. The method returns part of the DBSCHEMA_TABLES rowset.
Some OLE DB providers support wildcard matches in restrictions specified by the TableName, SchemaName, and CatalogName arguments of the EnumTables method. Some OLE DB providers return values in the result set columns TABLE_CAT, TABLE_SCHEM, and REMARKS. For more information about argument specification and result set membership interpretation, see the OLE DB provider documentation.
