Export (0) Print
Expand All

LinkedServer.EnumTables Method (String, String, String, LinkedTableType)

Enumerates a list of tables that are available on the linked server for a specified table name, schema, database, and linked table type.

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

public DataTable EnumTables(
	string tableName,
	string schemaName,
	string databaseName,
	LinkedTableType tableType
)

Parameters

tableName
Type: String
A String value that specifies the name of the table.
schemaName
Type: String
A String value that specifies the name of the schema.
databaseName
Type: String
A String value that specifies the name of the database.
tableType
Type: Microsoft.SqlServer.Management.Smo.LinkedTableType
A LinkedTableType object value that specifies the type of linked table.

Return Value

Type: DataTable
A DataTable object value that contains a list of tables that can be accessed on the linked server. The table describes the different columns of the returned DataTable.

Column

Data type

Description

TABLE_CAT

String

The table qualifier name. Various DBMS products support three-part naming for tables (qualifier.owner.name). In SQL Server, this column represents the database name. In some other products, it represents the server name of the database environment of the table. This field can be NULL.

TABLE_SCHEMA

String

The owner of the table in the linked server. In SQL Server, this column represents the name of the database user who created the table. This field always returns a value.

TABLE_NAME

String

The name of the table in the linked server. This field always returns a value.

TABLE_TYPE

String

The type of table: table, system table, or view.

REMARKS

String

SQL Server does not return a value for this column.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft