Returns a list of the tables on a server.
The server must be defined with the CREATE SERVER statement to use this system procedure.
sp_remote_tables( server_name [, table_name [, table_owner [, table_qualifier [, with_table_type ] ] ] ] )
Column name | Data type | Description |
---|---|---|
database | CHAR(128) | The name of the remote database. |
owner | CHAR(128) | The name of the remote database owner. |
table-name | CHAR(128) | The remote table. |
table-type | CHAR(128) | Specifies the table type. The value depends on the type of remote server. For example, TABLE, VIEW, SYS, and GBL TEMP are possible values. |
It may be helpful when you are configuring your database server to get a list of the remote tables available on a particular server. This procedure returns a list of the tables on a server.
The procedure accepts five parameters. If a table, owner, or database name is given, the list of tables will be limited to only those that match the arguments.
None
None
To get a list of all the Microsoft Excel worksheets available from an ODBC data source referenced by a server named excel:
CALL sp_remote_tables( 'excel' );
To get a list of all the tables owned by fred in the production database in an Adaptive Server Enterprise server named asetest:
CALL sp_remote_tables( 'asetest', null, 'fred', 'production' );