Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Mailing Lists -> Oracle-L -> Re: global ORACLE_SID in UNIX and concurrent oracle user sessions

Re: global ORACLE_SID in UNIX and concurrent oracle user sessions

From: Tom Pall <>
Date: Sat, 2 Sep 2000 15:31:31 -0500
Message-Id: <>

ORACLE_SID is local to your process.

Try this. Log into the box.

export $ORACLE_SID

Now log into the box through another terminal. ORACLE_SID=xyz
export $ORACLE_SID

Now go back to the first session,

Furthermore, once you started the import, you connected to the first instance, you established a persistent connection. Connections don't slip from one database to another. There is something called Transparent Failover. Does not apply here.

> Imagine you have a UNIX server with multiple instances on it.
> You have one user called "oracle".
> To work on either instance, you ensure that you set the global variable
> ORACLE_SID=instance; export ORACLE_SID
> Now.
> I open one terminal window.
> I set ORACLE_SID=instance1; export ORACLE_SID, then start an import into one
> database, and let it run.
> I open a second terminal window because I want to work on the second
> instance.
> I set ORACLE_SID=instance2, export ORACLE_SID.
> Does the import in the first session still point to instance1, or is it now
> trying to import data into the second instance because the value of the
> global variable has changed?
> I am asking because while restoring two instances on one server, I ended up
> with one instance's control file pointing to files belonging to the second
> instance. Thankfully the imported tablespaces in the second instance did
> not already exist in the first, so there was no overlap. I just dropped
> them and re-imported them into the right database. I also made sure that
> the import was the ONLY session open on the server during the import.
> It is possible that I did an import into the wrong instance, but now I am
> wondering what happens when you change a global variable like that
> on-the-fly.
> I am not a UNIX guru obviously.
> I asked the sa here but he didn't think changing the global variable would
> affect other UNIX processes that have already started. I am wondering
> though if import might not be reading that variable each time it is to begin
> importing another schema, as a matter of course.
> Thanks.
> Patrice Boivin
> Systems Analyst (Oracle Certified DBA)
> Systems Admin & Operations | Admin. et Exploit. des systèmes
> Technology Services | Services technologiques
> Informatics Branch | Direction de l'informatique
> Maritimes Region, DFO | Région des Maritimes, MPO
> E-Mail: <>
> --
> Author: Boivin, Patrice J
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
Received on Sat Sep 02 2000 - 15:31:31 CDT

Original text of this message