共用方式為


LinkedServer.EnumTables 方法

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

命名空間:  Microsoft.SqlServer.Management.Smo
組件:  Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)

語法

'宣告
Public Function EnumTables As DataTable
'用途
Dim instance As LinkedServer 
Dim returnValue As DataTable 

returnValue = instance.EnumTables()
public DataTable EnumTables()
public:
DataTable^ EnumTables()
member EnumTables : unit -> DataTable
public function EnumTables() : DataTable

傳回值

型別: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

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_SCHEM

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.

範例

在 SMO 中使用連結的伺服器

請參閱

參考

LinkedServer 類別

EnumTables 多載

Microsoft.SqlServer.Management.Smo 命名空間

其他資源

連結的伺服器 (Database Engine)

sp_addlinkedserver (Transact-SQL)

sp_tables_ex (Transact-SQL)