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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oracle DB Link Usage

Status
Not open for further replies.

bandarna

Programmer
Jan 2, 2003
122
US
Can any one write simple select statement showing how to use db link in oracle statement?

for ex. I am in shema B and I wanted to get data from Table T1 from shema A (consider db link name as o20d_link).

Select * from T1@o20d_link is it currect?
 
Hi,
For schemas in the same database instance, no DB link is needed...Just use
Code:
select * from A.T1;
( Assumes user logged ( B, maybe) in has permission to do that granted by the A user.)


If in a different instance, then after defining the DB link ( sort of like this):
Code:
create public database link odata connect to <user> identified by <pass> using 'tnsnames.ora alias';
then
you would use:
Code:
select sysdate from dual@odata;




[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top