Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> global ORACLE_SID in UNIX and concurrent oracle user sessions
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=3Dinstance; export ORACLE_SID
Now.
I open one terminal window.
I set ORACLE_SID=3Dinstance1; 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=3Dinstance2, 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=E8mes Technology Services | Services technologiques Informatics Branch | Direction de l'informatique=20 Maritimes Region, DFO | R=E9gion des Maritimes, MPO
E-Mail: boivinp_at_mar.dfo-mpo.gc.ca <mailto:boivinp_at_mar.dfo-mpo.gc.ca>=20 Received on Sat Sep 02 2000 - 13:28:55 CDT
![]() |
![]() |