If I have two Oracle Databases on two different Unix Servers,connected via a network, how can I look at the tables in the remote database from the local one. Both have the listener running.....
You will have to create a database link on the local database that connects to the remote db. The easiest way to do this is in the Schema Manager component of Enterprise Manager.
Also there needs to be an entry for the remote db in the tnsnames.ora file on the local server.
Karluk - thanks for your reply. Unfortunatley I have no idea what the Schema Manager component of Enterprise Manager is. Can I do it via commands in sqldba ??
Yes -- you can do this in sqldba or svrmgrl or sqlplus -- any environment that gives you an SQL prompt.
E.G.
[tt]
CREATE PUBLIC DATABASE LINK OTHERDB_LNK
[tab]CONNECT TO mike IDENTIFIED BY mrbigboy
[tab]USING 'otherdb';
[/tt]
You can then issue sql commands like this:
[tt]
Select Count(*) From ALL_TABLES@OTHERDB_LNK;
[/tt]
and sql will:
1) connect to otherdb using the user-name mike and the password mrbigboy
2) run the sql on that table in that database.
You can create private database links by omitting the keyword PRIVATE.
You can make remote tables look local by creating a synonym for the remote table.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.