Problem solve Get help with specific problems with your technologies, process and projects.

Error trying to use private database link

I have created a private database link successfully. But when I use it, I get the error "TNS:could not resolve service name." I have written the correct service name in the "using" phrase and the service name is also presented in the TNSNAMES.ORA file. I also have the required 'CREATE DATABASE LINK' privileges. Please let me know where I went wrong.
Have you verified that the TNSNAMES.ORA file is being used? To do this, issue "tnsping service_name" from the command line, where "service_name" is the service name you added to the config file. If that works, then your problem is most likely that the TNSNAMES.ORA file that you are using is not the same as the database is using. Database links require that the TNSNAMES.ORA file be in the ORACLE_HOME/network/admin directory. On my servers, I place this file in a different directory. To get database links to use this file, I have to create a shortcut (Windows) or a symbolic link (Unix) in the ORACLE_HOME/network/admin directory and point it to the other TNSNAMES.ORA file. This shortcut or link should have the name "tnsnames.ora."

Dig Deeper on Oracle database design and architecture

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.