Jul 11, 2006 #1 bandarna Programmer Joined Jan 2, 2003 Messages 122 Location 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?
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?
Jul 11, 2006 #2 Turkbear Technical User Joined Mar 22, 2002 Messages 8,631 Location US 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; To Paraphrase:"The Help you get is proportional to the Help you give.." Upvote 0 Downvote
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; To Paraphrase:"The Help you get is proportional to the Help you give.."