Home » SQL & PL/SQL » SQL & PL/SQL » Using Database Links
Using Database Links [message #185990] Fri, 04 August 2006 12:39 Go to next message
Matthew Waugh
Messages: 71
Registered: October 2004
Member
What am I doing wrong? Thanks for the help...

SQL> CREATE PUBLIC DATABASE LINK R06Q
2 CONNECT TO CURRENT_USER
3 USING 'R06Q';

Database link created.

SQL> SELECT COUNT(*) FROM PS_PERSONAL_DATA@R06Q;
SELECT COUNT(*) FROM PS_PERSONAL_DATA@R06Q
*
ERROR at line 1:
ORA-12154: TNS:could not resolve service name
Re: Using Database Links [message #185991 is a reply to message #185990] Fri, 04 August 2006 12:43 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
Is 'R06Q' listed in your tnsnames.ora file? Can you tnsping or connect to R06Q from the database you created the link in?
Re: Using Database Links [message #185999 is a reply to message #185991] Fri, 04 August 2006 13:12 Go to previous messageGo to next message
Matthew Waugh
Messages: 71
Registered: October 2004
Member
Sorry...don't totally understand your questions.

Is 'R06Q' listed in your tnsnames.ora file?
----How would I check this?
Can you tnsping or connect to R06Q from the database you created the link in?
----How would I do this? Aren't I trying to connect to R06Q by creating the db link?


Re: Using Database Links [message #186002 is a reply to message #185999] Fri, 04 August 2006 13:19 Go to previous message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
Matthew Waugh wrote on Fri, 04 August 2006 13:12

Aren't I trying to connect to R06Q by creating the db link?


Yes, technically you are, but the troubleshooting typically involves several other rudiment tests. You may encounter different error messages.

I don't know your system, but typically the tnsnames.ora file is located in the $ORACLE_HOME/network/admin directory. You need to ensure you have an entry in there for R06Q.
Previous Topic: Oracle equivalent of SQL Server timestamp data type
Next Topic: Unable to insert the data..pls
Goto Forum:
  


Current Time: Sun Dec 04 20:36:35 CST 2016

Total time taken to generate the page: 0.21219 seconds