Thread: Setting up a database link
05-25-09, 21:46 #1Registered User
- Join Date
- May 2009
- Manila, Philippines
Unanswered: Setting up a database link
Hello guys I just wanna ask since a developer has been bugging me for days. He wants me to set up a database link to another oracle database and I've created it using the statement below:
CREATE DATABASE LINK <db_link name> CONNECT TO <username> IDENTIFIED BY <passwd> USING <'SID'>;
I've created it successfully and tried using the dblink with different sql statements and its working fine. However this developer told me that it is working on SQL statements like the one below:
select count(*) from all_objects@db_link;
But when he runs his application he told me that he must ran the application without the db_link parameter because if he ran it with that parameter it returns an error. Now my question is, since I'm not really a developer, is it possible to link to oracle databases without using the db_link parameter in the statements? Are there ways to directly connect from an oracle database to another oracle database and use the objects for a certain user? Please enlighten me. Thank you very much.
05-25-09, 22:22 #2Registered User
Provided Answers: 1
- Join Date
- Aug 2003
- Where the Surf Meets the Turf @Del Mar, CA
>is it possible to link to oracle databases without using the db_link parameter in the statements?
I do not think it is possible.
>if he ran it with that parameter it returns an error.
Post SQL & results by using CUT & PASTE.
How is the database "decide" which remote database is to be accessed when no @db_alias is actually specified.
Ask this duhveloper provide you the SQL to establish his "requirement"
& provide SQL that would verify desired functionality.
Post his responses back here.You can lead some folks to knowledge, but you can not make them think.
The average person thinks he's above average!
For most folks, they don't know, what they don't know.
Good judgement comes from experience. Experience comes from bad judgement.
05-26-09, 10:00 #3Registered User
- Join Date
- Jun 2004
- Liverpool, NY USA
simply setup a synonym. for example
create synonym emp for emp@db_link;
select * from emp;Bill
You do not need a parachute to skydive. You only need a parachute to skydive twice.