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

Home -> Community -> Usenet -> c.d.o.server -> Re: which instance will be connect to without specify net service name?

Re: which instance will be connect to without specify net service name?

From: Howard J. Rogers <howardjr2000_at_yahoo.com.au>
Date: Sun, 11 Aug 2002 17:45:49 +1000
Message-ID: <3d5615ff@dnews.tpgi.com.au>

"PanTao" <pantao_fz_at_21cn.com> wrote in message news:aj4tii$1j5b$1_at_mail.cn99.com...
> Hi, all
>
> On a winNT + oracle enviroment, I install two instance. So
> if I use sqlplus to login locally, such as
> splplus /nolog
> connect / as sysdba,
>
> which instance will I connect to? What specify the default
> instance?

Whatever your ORACLE_SID dictates, usually. Although Windows complicates things slightly because there's a registry entry for a 'default home' -which gets set, as best as I can tell, to the last Instance/Database created.

If (as I frequently do) create a database called DB9, followed by another called OEMREP, and do nothing with the environment variables, a plain 'connect / as sysdba' will connect to OEMREP.

>
> For unix enviroment, I think the ORACLE_SID enviroment specify
> the instance. Is it so?
>

Yup. Windows is exactly the same in this respect as Unix. *If* ORACLE_SID is set, then the default home specified in the registry is ignored.

To set the ORACLE_SID, you either type it in as soon as the CMD window is opened. Or, you find the place where system and user environment variables are set (can't help I'm afraid, as I use Windows 2000 and XP, and it's been ages since I looked at NT), and set them there so that every subsequent CMD window gets them set automatically.

Regards
HJR
> Thanks,
> PanTao
>
>
Received on Sun Aug 11 2002 - 02:45:49 CDT

Original text of this message

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