Forum Stats

  • 3,769,240 Users
  • 2,252,937 Discussions
  • 7,874,958 Comments

Discussions

DBLINK ERROR

user600135
user600135 Member Posts: 55
edited Sep 5, 2008 11:39PM in General Database Discussions
Hi all

Thanks for your answer

I have created db link to remote database and i try to run the below query SELECT sysdate FROM [email protected]_link2;

while executing the above query i am getting the following error

ORA-12154: TNS:could not resolve the connect identifier specified

Please anyone help me to resolve the issue

Thanks

Regards

Mahesh boopathi.k.s.

Tagged:
«1

Answers

  • Robert Geier
    Robert Geier Member Posts: 2,989
    Did you add an entry to the database ORACLE_HOME/network/admin/tnsnames.ora ?
    Try to tnsping the database you created the link to.

    Check that the link was created properly.

    select db_link, host from user_db_links.

    ---------------------------------------------
    http://www.ContractOracle.com
    Robert Geier
  • user600135
    user600135 Member Posts: 55
    Hi Robert,

    Thanks for your reply

    I have added alias name in the tns name ora file

    Now i am getting the following error
    ORA-12541: TNS:no listener( i have login that remote db through VPNonly is this the issue)

    Please give the direction

    Regards

    Mahesh
  • 591186
    591186 Member Posts: 3,668 Silver Trophy
    did you try tnsping?
    591186
  • 108476
    108476 Member Posts: 2,184
    Hi,

    Here is how I troublleshoot a DBA Link problem: http://www.dba-oracle.com/t_troubleshooting_sql_net_connectivity_errors.htm

    1 Check with "ping" using the IP address ("ping 198.11.34.43"

    2 Check with "ping" using DNS name (e.g. "tnsping uranus")

    3 Check with "tnsping" using TNS service name

    4 Sign-on to SQL*Plus with a remote user ("connect fred/[email protected]_link"

    5 Within SQL*Plus, try a select from [email protected]_db_link


    Hope this answers your question . . .

    Donald K. Burleson
    Oracle Press author
    Author of "Oracle Tuning: The Definitive Reference":
    http://www.dba-oracle.com/bp/s_oracle_tuning_book.htm
    108476
  • Anand...
    Anand... Member Posts: 3,590
    Hi...

    Is ur target datbase listener started where the db link is connecting the source database.Check the status of the listener lsnrctl status on the target DB, if not started start it (lsnrctl start).

    Also tnsping to the target afer starting the listener on it.


    Regards,
    Anand
  • user600135
    user600135 Member Posts: 55
    Yes i tried but it get fail

    what could be the reason for that?

    please give the direction

    Regards
    Mahesh
  • 429475
    429475 Member Posts: 35
    Can you verify that your firewall allows outbound connections destined for target database server on the port 1521 or
    what ever the port is defined in tnsnames.ora file
  • 449681
    449681 Member Posts: 180
    The tns entry should be there in the tnsnames.ora of the server where source database is running. Many people think that the tns entry for a db link is required to be on the machine from where they are trying to connect which is not true.

    Hope this helps.

    Thanks,
    Ankit.
    449681
  • 658148
    658148 Member Posts: 65
    This may help,

    http://www.errorkey.com/Search/Index.aspx?q=TNS-12154
  • Robert Geier
    Robert Geier Member Posts: 2,989
    Can you please stop spamming the group with links to errorkey.com. We can all find the error message using oerr on the server.

    Giving a link to the error message does not provide any useful information. I guess you earn money from the google adds on the site ?
This discussion has been closed.