Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
返回服务器上表的列表。
sp_remote_tables( @server_name [, @table_name [, @table_owner [, @table_qualifier [, @with_table_type ] ] ] ] )
@server_name 使用此 CHAR(128) 参数指定远程服务器名。
@table_name 使用此可选 CHAR(128) 参数指定远程表的名称。缺省值为 '%'。
@table_owner 使用此可选的 CHAR(128) 参数指定远程表的所有者。缺省值为 '%'。
@table_qualifier 使用此可选 CHAR(128) 参数指定 table_name 所在的数据库。缺省值为 '%'。
@with_table_type 使用此可选 BIT 参数指定是否包含远程表类型。缺省值为 0。如果希望结果集包含列出表类型的列,则指定 1;如果不希望包含,则指定 0。
要使用此系统过程,必须用 CREATE SERVER 语句对服务器进行定义。
当您配置数据库服务器以获取特定服务器上可用的远程表的列表时,此过程可能会有帮助。此过程返回服务器上表的列表。
此过程接受五个参数。如果给定了表、所有者或数据库名,则表的列表仅包含与这些参数匹配的表。
无
Sybase 受 Open Client/Open Server 支持。
以下示例返回 SQL Anywhere 远程服务器 RemoteSA 中由 DBA 所有的表的相关信息。
CALL sp_remote_tables( 'RemoteSA', null, 'DBA' );
获取 production 数据库(在名为 RemoteASE 的 Adaptive Server Enterprise 服务器中)中由 Fred 所有的所有表的列表:
CALL sp_remote_tables( 'RemoteASE', null, 'Fred', 'production' );
要获取名为 RemoteExcel 的服务器引用的 ODBC 数据源中可用的所有 Microsoft Excel 工作表的列表:
CALL sp_remote_tables( 'RemoteExcel' );