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: Karsten Farrell <kfarrell_at_belgariad.com>
Date: Thu, 13 Mar 2003 20:42:54 GMT
Message-ID: <MPG.18da8d2612cf7de39896f3@news.la.sbcglobal.net>


john.greco_at_dot.state.mn.us said...
>
>
> 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,
>

One minor comment. The "SID = <whatever>" has been replaced in Oracle8 and above (maybe 8i) with "SERVICE_NAME = <whatever>". The SID entry still works, however, I believe.

-- 
/Karsten
DBA > retired > DBA
Received on Thu Mar 13 2003 - 14:42:54 CST

Original text of this message

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