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: Two instances with same SID in a same machine

Re: Two instances with same SID in a same machine

From: Mark Bole <makbo_at_pacbell.net>
Date: Fri, 27 Aug 2004 22:04:08 GMT
Message-ID: <sdOXc.13088$he1.4935@newssvr29.news.prodigy.com>


Howard J. Rogers wrote:
> Sybrand Bakker wrote:
>
>

>>On 27 Aug 2004 01:33:43 -0700, ilaletin_at_usa.net (Igor Laletin) wrote:
>>
>>
>>>What if two people (listeners) called two different Marcelo's
>>>(instances with the same SID) in two different rooms (oracle homes)?
>>>
>>>Cheers,
>>>Igor
>>
>>It will be an administration nightmare wouldn't it?

>
>
> It will be an administration impossibility.
>
> You and I are both in agreement, I think: it's not actually *possible*.
> Never mind would it be a good idea.
>
> If someone wants to jump through the necessary hoops to prove me wrong, be
> my guest: in the meantime, it is impossible to create two instances on the
> same machine with the same ORACLE_SID, and I don't care how clever you get
> in distinguishing between different installations.
>
> Regards
> HJR
>

Ok, consider yourself proven wrong. Fabrizio beat me to it, but I tested and received the same result. No RAC, no VMware, no tricks up my sleeve -- just a plain vanilla Solaris 8 box.

I read the OP as an academic exercise, not a "is this a good idea in the real world" question. But then some people in this newsgroup don't even like the idea of running two DIFFERENTLY named instances on the same box, so it's not surprising the level of resistance to even debating the possibility.

It's due to good design decisions made a long time ago in the area of Unix shared memory (System V IPC). (And Howard, I know you're an advocate of good design above all else!) The Unix philosophy is to avoid arbitrary restrictions, and it applies here. Just as two users can each have an identically named file in their home directory, so can two users have identical lock name spaces in their respective shared memory segments.

The ipcs output shows the two independent shm segments:

% ipcs -bm
IPC status from <running system> as of Fri Aug 27 11:02:15 PDT 2004 T ID KEY MODE OWNER GROUP SEGSZ Shared Memory:

m        640   0x99a80894 --rw-r-----  oracle1     dba1  390070272
m        130   0xf1278a80 --rw-r-----   oracle      dba  390070272

And this shows two identically named lock files in different Oracle homes, owned by different users:

-rw-rw---- 1 oracle1 dba1 24 Aug 27 10:30 /data2/oracle1/product/9.2.0/dbs/lkBCEQA3

-rw-rw---- 1 oracle dba 24 Apr 4 12:00 /u01/app/oracle/product/9.2.0/dbs/lkBCEQA3

I'm quite willing to believe that it won't work under Windows, but then fork() won't work under Windows either, last time I checked.

Setting up a separate listeners (or separate service names in the same listener) for each instance is left as an exercise for the reader. ;-)

--Mark Bole Received on Fri Aug 27 2004 - 17:04:08 CDT

Original text of this message

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