I created a DB link to an instance called SPRODEV.AEL but when I try and use it I get the error message thus:
SQL> select * from table1@sprodev.ael;
select * from table1@sprodev.ael
*
ERROR at line 1:
ORA-12154: TNS:could not resolve service name
The service name I used in the USING clause when I created the DB link works fine when I just issue a CONNECT user/pwd@servicename command, what can be causing it to fail in a DB link?
Both databases (local and remote) have GLOBAL_NAME parameter set to TRUE and SPRODEV.AEL is the global name of the remote DB.
Originally posted by JP_KIRAN May be a silly question,
Do you have the tnsnames in the source machine pointing to the remote machine?
Well, I would be he has it :-)
Now, from your messages I assume that select * from global_name; returns SPRODEV.AEL (people usually use WORLD, but perhaps your choice of AEL is well-motivated).
Tell me, in sqlnet.ora, is NAMES.DEFAULT_DOMAIN set to AEL?
Bounce the instances with GLOBAL_NAME set to false and add NAMES.DEFAULT_DOMAIN = AEL in sqlnet.ora.
Oracle Certified Master
Oracle Certified Professional 6i,8i,9i,10g,11g
email: ocp_9i@yahoo.com
1.connect to sys/pw
2.Grant create database link to scott.
3.grant create materialized view to scott.
4.then i connected to the scott/pw
5.Next i created a database link using the follo syntax
Create database link am.world connect to scott identified by tiger using 'AM.WORLD';
6.DATABASE LINK IS CREATED.
7.When i tried to create a materialized view using the syntax
CREATE MATERIALIZED VIEW emp_mv
BUILD IMMEDIATE
REFRESH FORCE
ON DEMAND
AS
SELECT * FROM emp@am.world;
8.i got the error tns could not resolve the service name.
Pls help me i am working on 8.1.7/win2000.
when i queried the global_name...
sql>select * from global_name;
GLOBAL_NAME
---------------------
ITS.PRAS.COM
As u said i checked the sqlnet.ora
NAMES.DEFAULT_DOMAIN = world
I changed it to
NAMES.DEFAULT_DOMAIN = PRAS.COM
After that i am even unable to make the database link...it give me the follo error
ERROR at line 1:
ORA-02082: a loopback database link must have a connection qualifier.
Pls tell me what will be the prob and where i am going wrong..i will be thankful.
I also have a connect string(created from net8assistant) to the remote database and i am able to connect it at sql plus using scott@am/tiger
the name of the connect string in tnsnames.ora is as
I even tried to create the database link thru DBA Studio..and am able to create it but it is tellink me the the database link is not active..how do i make it active...
Thanks a lot.The database link is created successfully but i am still not able to create the materialized view as mentioned.At the same time i am able to create another table using the database link.
Why am i not able to create the materialized view.
Bookmarks