LinkedServer.EnumTables LinkedServer.EnumTables LinkedServer.EnumTables Method

Definition

Enumerates a list of tables that are available on the linked server.

Overloads

EnumTables(String, String, String, LinkedTableType) EnumTables(String, String, String, LinkedTableType) EnumTables(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.

EnumTables(String, String, String) EnumTables(String, String, String) EnumTables(String, String, String)

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

EnumTables(String, String) EnumTables(String, String) EnumTables(String, String)

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

EnumTables(String) EnumTables(String) EnumTables(String)

Enumerates a list of tables that are available on the linked server for a specified table name.

EnumTables() EnumTables() EnumTables()

Enumerates a list of tables that are available on the linked server.

EnumTables(String, String, String, LinkedTableType) EnumTables(String, String, String, LinkedTableType) EnumTables(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.

public:
 System::Data::DataTable ^ EnumTables(System::String ^ tableName, System::String ^ schemaName, System::String ^ databaseName, Microsoft::SqlServer::Management::Smo::LinkedTableType tableType);
public System.Data.DataTable EnumTables (string tableName, string schemaName, string databaseName, Microsoft.SqlServer.Management.Smo.LinkedTableType tableType);
Public Function EnumTables (tableName As String, schemaName As String, databaseName As String, tableType As LinkedTableType) As DataTable
Parameters
tableName
String String String

A String value that specifies the name of the table.

schemaName
String String String

A String value that specifies the name of the schema.

databaseName
String String String

A String value that specifies the name of the database.

tableType
LinkedTableType LinkedTableType LinkedTableType

A LinkedTableType object value that specifies the type of linked table.

Returns

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_CATString 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_SCHEMAString 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_NAMEString The name of the table in the linked server. This field always returns a value.
TABLE_TYPEString The type of table: table, system table, or view.
REMARKSString SQL Server does not return a value for this column.

Examples

Using Linked Servers in SMO

EnumTables(String, String, String) EnumTables(String, String, String) EnumTables(String, String, String)

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

public:
 System::Data::DataTable ^ EnumTables(System::String ^ tableName, System::String ^ schemaName, System::String ^ databaseName);
public System.Data.DataTable EnumTables (string tableName, string schemaName, string databaseName);
Public Function EnumTables (tableName As String, schemaName As String, databaseName As String) As DataTable
Parameters
tableName
String String String

A String value that specifies the name of the table.

schemaName
String String String

A String value that specifies the name of the schema.

databaseName
String String String

A String value that specifies the name of the database.

Returns

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_CATString 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_SCHEMString 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_NAMEString The name of the table in the linked server. This field always returns a value.
TABLE_TYPEString The type of table: table, system table, or view.
REMARKSString SQL Server does not return a value for this column.

Examples

Using Linked Servers in SMO

EnumTables(String, String) EnumTables(String, String) EnumTables(String, String)

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

public:
 System::Data::DataTable ^ EnumTables(System::String ^ tableName, System::String ^ schemaName);
public System.Data.DataTable EnumTables (string tableName, string schemaName);
Public Function EnumTables (tableName As String, schemaName As String) As DataTable
Parameters
tableName
String String String

A String value that specifies the name of the table.

schemaName
String String String

A String value that specifies the name of the schema.

Returns

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_CATString 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_SCHEMString 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_NAMEString The name of the table in the linked server. This field always returns a value.
TABLE_TYPEString The type of table: table, system table, or view.
REMARKSString SQL Server does not return a value for this column.

Examples

Using Linked Servers in SMO

EnumTables(String) EnumTables(String) EnumTables(String)

Enumerates a list of tables that are available on the linked server for a specified table name.

public:
 System::Data::DataTable ^ EnumTables(System::String ^ tableName);
public System.Data.DataTable EnumTables (string tableName);
Public Function EnumTables (tableName As String) As DataTable
Parameters
tableName
String String String

A String value that specifies the name of the table.

Returns

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_CATString 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_SCHEMString 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_NAMEString The name of the table in the linked server. This field always returns a value.
TABLE_TYPEString The type of table; table, system table, or view.
REMARKSString SQL Server does not return a value for this column.

Examples

Using Linked Servers in SMO

EnumTables() EnumTables() EnumTables()

Enumerates a list of tables that are available on the linked server.

public:
 System::Data::DataTable ^ EnumTables();
public System.Data.DataTable EnumTables ();
Public Function EnumTables () As DataTable
Returns

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_CATString 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_SCHEMString 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_NAMEString The name of the table in the linked server. This field always returns a value.
TABLE_TYPEString The type of table: table, system table, or view.
REMARKSString SQL Server does not return a value for this column.

Examples

Using Linked Servers in SMO

Applies to