Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: alias for database: howto

Re: alias for database: howto

From: TurkBear <john.greco_at_dot.state.mn.us>
Date: Thu, 13 Mar 2003 11:21:36 -0600
Message-ID: <oaf17vcn817kh88oancql1gc10ml8j3s9r@4ax.com>

Ed Stevens <nospam_at_noway.nohow> wrote:

>On Thu, 13 Mar 2003 14:00:31 +0100, "Sönke Petersen"
><sk.petersen_at_gmx.de> wrote:
>
>>Hello,
>>
>>I want to assign an alias to an existing Oracle database.
>>The way I tried is to add an entry to the TNSNAMES.ORA file.
>>Right now access is not possible.
>>
>>I think I have to restart the database so that the TNSNAMES.ORA
>>is evaluated once again?!?
>>
>>Regards,
>>Sönke
>>
>Wrong. The database is totally oblivious to the tnsnames file.
>TNSNAMES is used only by clients to resolve database 'aliases' to
>something the underlying network protocol and the listener can use.
>It is 'evaluated' by the client at every connection request.
>
>"Access is not possible" conveys no useful information. What oracle
>error message (ora-nnnnn) are you getting? What does you
>tnsnames.ora, listener.ora, and sqlnet.ora files look like?
>
>And very basic -- what version of Oracle and what OS?

You can add any alias to access the same database: -tnsnames.ora:

WEBD2550.WORLD =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = irmw2ks550)(PORT = 1521))     )
    (CONNECT_DATA =

      (SID = webd)
      (SERVER = DEDICATED)

    )
  )

WEBD.WORLD =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = irmw2ks550)(PORT = 1521))     )
    (CONNECT_DATA =

      (SID = webd)
      (SERVER = DEDICATED)

    )
  )

WEBDB.WORLD =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = irmw2ks550)(PORT = 1521))     )
    (CONNECT_DATA =

      (SID = webd)
      (SERVER = DEDICATED)

    )
  )

You can connect to this instance by using any of
connect user/pass_at_webd2550
connect user/pass_at_webd
connect user/pass_at_webdb

All the same to Oracle , it only cares about PROTOCOL, HOST, PORT,SID

hth, Received on Thu Mar 13 2003 - 11:21:36 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US