create database link link123 connect to scott identified by tiger using 'connection string'The link is getting created, but when I execute the select query as:
select * from emp@link123;it throws the following errors: "TNS: could not resolve service name" or "TNS: no listener." Can you help me in this regard?
The 'connection string' you specify in your CREATE DATABASE LINK command is a TNS alias that is found in the TNSNAMES.ORA...
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
configuration file. This configuration file must be found in ORACLE_HOME/network/admin for database links. Ensure you have a TNS alias correctly defined in your TNSNAMES.ORA config file and then ensure your database link is defined with this TNS alias.
The TNS alias points to a listener running on a specific port of a remote database server. If the listener on that database server is not running, you will receive the "no listener" error message. If you specify an incorrect server or port, then you will receive this message. Verify your TNSNAMES.ORA config file is set up correctly.
Dig Deeper on Oracle database backup and recovery
Related Q&A from Brian Peasland
Oracle expert Brian Peasland answers one reader's question about common pitfalls when connecting Oracle to outside programs.continue reading
One reader asks expert Brian Peasland a question about datafile sizes with the Oracle RMAN duplicate 10g command.continue reading
Managing parent table-child table relations in Oracle SQL environments is key to efficient programming.continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.