-
Database link problem
Dear Members,
I want to access table from the remote database .For that
I CREATED A DATABASE LINK WITH
create database link testconnect connect to ccis identified by ccis using 'DB1';
Database link created.
when I am accesing the table: It is giving an error
select docid from blobdoc@testconnect;
ERROR at line 1:
ORA-12154: TNS:could not resolve service name
These are the tnsnames.ora and sqlnet.ora files
SQLNET.ORA
NAMES.DEFAULT_DOMAIN=HOSTNAME
SQLNET.AUTHENTICATION-SERVICES=(NTS)
NAMES.DIRECTORY-PATH=(TNSNAMES,ONAMES,HOSTNAME)
TNSNAMES.ORA
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.0.0.1)(PORT=1521))
(CONNECT_DATA=(SERVICE_NAME=LOBIS))
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.0.0.1)(PORT=1521))
(CONNECT_DATA=(SERVICE_NAME=DB1))
can anyone send me where its going wrong.
-
There's something wrong with your tnsnames.ora file on the server. Verify connectivity from your database host to your remote host with sqlplus.
Jeff Hunter
-
Try to do tnsping and see if you can hit your destination if not then there is something wrong with your tnsname.ora file. Remove db service entry from tnsname.ora file and recreate using Net8 assistant GUI tool and also make sure that you don’t have more then one oracle home.
Circumstances do not rise to meet our expectation. Embrace what you actually get. Open your eyes. See things for what they really are Thereby sparing yourself the pain of false attachements.
-
You need to add the
CONNECTION DESCRIPTION AS U have given in your local machine.
db1. = **************
in the tnsnames.ora of your server.
I also initially faced the same problem.
giri@lifestylestores.com
-
Dear Members,
I could connect to the remote server using sqlplus .If I give ccis ccis and db1 as the string . But If I am trying to connect thru query it is showing error .
like select field from table@remote
Whats the prob...
Ramesh.M
-
Instead of Service_Name, try with SID in the connect_data.
Or in the USING clause, give full string..i mean DB1.COMPANY.COM or so...
Same goes in TNS Names for Service_Name..Try giving full string.
Abhay.
funky...
"I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."
"Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|