如何列出数据库链接(Oracle)中存在的所有表?

时间:2021-07-19 12:56:40

Basically I have a Database link (Oracle) called mylink.domain, in this link we can access foundation information like name of them members and other general information.

基本上我有一个名为mylink.domain的数据库链接(Oracle),在这个链接中我们可以访问基础信息,比如它们的名字和其他一般信息。

I would like to list all table's name in this link but i don't know how to do that.

我想在此链接中列出所有表的名称,但我不知道该怎么做。

Thanks in advance

提前致谢

3 个解决方案

#1


11  

You can access the all_tables view through the dblink:

您可以通过dblink访问all_tables视图:

select owner, table_name
from all_tables@dblink
order by owner, table_name;

#2


0  

Selecting the content of ALL_TABLES dictionary view will list you all tables your user has access to. Generally, it is not always possible to get a list of tables you dont have permissions for - they just do not show up. If your user has the SELECT ANY DICTIONARY priviledge, you can select the content of DBA_TABLES, which will always list all tables existing in the database.

选择ALL_TABLES字典视图的内容将列出您的用户有权访问的所有表。通常,并不总是可以获得您没有权限的表列表 - 它们只是不显示。如果您的用户具有SELECT ANY DICTIONARY特权,则可以选择DBA_TABLES的内容,该内容将始终列出数据库中存在的所有表。

#3


-2  

select table_name from all_tables@dblinkname;

从all_tables @ dblinkname中选择table_name;

This shows all tables your linked user has access to.

这显示了链接用户可以访问的所有表。

Where I got the answer from

我从哪里得到了答案

#1


11  

You can access the all_tables view through the dblink:

您可以通过dblink访问all_tables视图:

select owner, table_name
from all_tables@dblink
order by owner, table_name;

#2


0  

Selecting the content of ALL_TABLES dictionary view will list you all tables your user has access to. Generally, it is not always possible to get a list of tables you dont have permissions for - they just do not show up. If your user has the SELECT ANY DICTIONARY priviledge, you can select the content of DBA_TABLES, which will always list all tables existing in the database.

选择ALL_TABLES字典视图的内容将列出您的用户有权访问的所有表。通常,并不总是可以获得您没有权限的表列表 - 它们只是不显示。如果您的用户具有SELECT ANY DICTIONARY特权,则可以选择DBA_TABLES的内容,该内容将始终列出数据库中存在的所有表。

#3


-2  

select table_name from all_tables@dblinkname;

从all_tables @ dblinkname中选择table_name;

This shows all tables your linked user has access to.

这显示了链接用户可以访问的所有表。

Where I got the answer from

我从哪里得到了答案