Igor Abreu
Igor Abreu

Reputation: 211

How can I list all tables existent in a Database Link (Oracle)?

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.

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

Thanks in advance

Upvotes: 19

Views: 55149

Answers (3)

CodeMonkey
CodeMonkey

Reputation: 1107

select table_name from all_tables@dblinkname;

This shows all tables your linked user has access to.

Where I got the answer from

Upvotes: 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.

Upvotes: 0

user330315
user330315

Reputation:

You can access the all_tables view through the dblink:

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

Upvotes: 32

Related Questions