Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing another Database in SQL

Status
Not open for further replies.

amerbaig

IS-IT--Management
Sep 4, 2001
58
CA
Can I access another data base when I am working in another database. LIke

Select * from dbmgt/Pass@sales.purch
 

Of course you can, that is if you have a database link on that DB.

As a DBA create a dblink in your DB...

CREATE PUBLIC DATABASE LINK myotherdb.link
CONNECT TO username IDENTIFIED BY password
USING 'other_db';

Make sure that your DB server can connect to your 'other' DB.

Then from your sqlplus:

select *
from TABLE1@myotherdb.link;


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top