-
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.
-
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.
-
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.
[email protected]
-
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.