Método LinkedServer.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.
Namespace: Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.Smo (em Microsoft.SqlServer.Smo.dll)
Sintaxe
'Declaração
Public Function EnumTables ( _
tableName As String, _
schemaName As String, _
databaseName As String, _
tableType As LinkedTableType _
) As DataTable
'Uso
Dim instance As LinkedServer
Dim tableName As String
Dim schemaName As String
Dim databaseName As String
Dim tableType As LinkedTableType
Dim returnValue As DataTable
returnValue = instance.EnumTables(tableName, _
schemaName, databaseName, tableType)
public DataTable EnumTables(
string tableName,
string schemaName,
string databaseName,
LinkedTableType tableType
)
public:
DataTable^ EnumTables(
String^ tableName,
String^ schemaName,
String^ databaseName,
LinkedTableType tableType
)
member EnumTables :
tableName:string *
schemaName:string *
databaseName:string *
tableType:LinkedTableType -> DataTable
public function EnumTables(
tableName : String,
schemaName : String,
databaseName : String,
tableType : LinkedTableType
) : DataTable
Parâmetros
- tableName
Tipo: System.String
A String value that specifies the name of the table.
- schemaName
Tipo: System.String
A String value that specifies the name of the schema.
- databaseName
Tipo: System.String
A String value that specifies the name of the database.
- tableType
Tipo: Microsoft.SqlServer.Management.Smo.LinkedTableType
A LinkedTableType object value that specifies the type of linked table.
Valor de retorno
Tipo: System.Data.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 |
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 |
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 |
The name of the table in the linked server. This field always returns a value. |
|
TABLE_TYPE |
The type of table: table, system table, or view. |
|
REMARKS |
SQL Server does not return a value for this column. |
Exemplos
Usando servidores vinculados no SMO
Consulte também
Referência
Namespace Microsoft.SqlServer.Management.Smo
Outros recursos
Servidores vinculados (Mecanismo de Banco de Dados)