Home » SQL & PL/SQL » SQL & PL/SQL » Multiple Database. How to access other Database table?
Multiple Database. How to access other Database table? [message #247841] Wed, 27 June 2007 06:31 Go to next message
Arju
Messages: 1554
Registered: June 2007
Location: Dhaka,Bangladesh. Mobile:...
Senior Member

My tnsnames.ora file is like this. Several database is running.
-bash-3.00$ cat tnsnames.ora
# tnsnames.ora Network Configuration File: /oracle/app/oracle/product/10.2.0/db_2/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

TEST =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = saturn)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = Test.TherapBD.com)
    )
  )

THERAP =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = saturn)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = THERAP.THERAPBD.COM)
    )
  )

DBTEST =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = saturn)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = DBTEST.THERAPBD.COM)
    )
  )

ULTRA =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = saturn)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ULTRA.THERAPBD.COM)
    )
  )

EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    )
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
    )
  )


whenever I invoke command like this,
-bash-3.00$ sqlplus arju/arju@THERAP.THERAPBD.COM

SQL*Plus: Release 10.2.0.2.0 - Production on Wed Jun 27 17:30:36 2007

Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.

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



How I can use this command ?

desc emp@test
While I am in therap database and I want to see the emp table of test database?
Re: Multiple Database. How to access other Database table? [message #247856 is a reply to message #247841] Wed, 27 June 2007 06:53 Go to previous message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
create a database link.

Regards
Michel
Previous Topic: ref_cursor error
Next Topic: Ref cursor
Goto Forum:
  


Current Time: Sat Dec 03 03:43:44 CST 2016

Total time taken to generate the page: 0.15955 seconds