About me

Name: Ivan Kartik
Location: Bratislava, Slovakia
I'm working as Senior Database Administrator in Bratislava, Slovak Republic. My interests are in RDBMS mainly Oracle, Unix (like) operating systems and in free time I am watching or playing ice-hockey, also I like to play golf.

[contact me]


Oracle (favourite) links

Oracle Technology Network
OTN Forums
Oracle Documentation
Ask Tom


Linux (favourite) links

Linux.com Portal
Linux section on OTN
The Linux Documentation Project


Favourite Blogs

Nicolas Gasparotto
Hans Forbrich
Jonathan Lewis
Frits Hoogland
H.Tonguç YIlmaz
Laurent Schneider
Christopher Jones
Jeff Hunter
Oracle WTF


My install articles

9i
Oracle 9i(R2) on Fedora 2,3,4,5,6
Oracle 9i(R2) on Enteprise Linux 4
Oracle 9i(R2) on SuSE 9.x,10.1
10g
Oracle 10g(R2) on EL and RH EL 3,4,5
Oracle 10g(R2) on Fedora 2,3,4
Oracle 10g(R2) on SuSE 9.x
Oracle 10g(R2) on Solaris 10 x86
11g
Oracle 11g(R1) on EL and RH EL 4,5
Oracle 11g(R1) on SLES10 and OpenSuSE
Oracle 11g(R2) on Solaris x86(64)


Downloads

rlwrap for Fedora (x86)
rlwrap for Redhat (x86)
rlwrap for SuSE (x86)
rlwrap for Redhat (x86_64)
rlwrap for Suse (x86_64)
rlwrap for Solaris 10 (x86)
readline for Solaris 10 (x86)
rlwrap for Solaris (SPARC 64)
readline for Solaris (SPARC 64)


Archives

January 2010
December 2009
November 2009
February 2009
January 2009
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
September 2007
August 2007
July 2007
April 2007
March 2007
February 2007
December 2006
November 2006
October 2006
September 2006
July 2006



Fun: How is it possible? - updated (and the winner is...)

Purpose of this post is more for fun than practice.
Consider this output:

$ ps -aef|grep pmon|grep -v grep
oracle 25330 1 0 Apr16 ? 00:00:02 ora_pmon_RMANDELL
oracle 26084 1 0 Apr16 ? 00:00:01 ora_pmon_RMANDELL
oracle 26128 1 0 Apr16 ? 00:00:01 ora_pmon_RMANDELL
oracle 26295 1 0 Apr16 ? 00:00:01 ora_pmon_RMANDELL


Four PMONs for the same ORACLE_SID? How did I do it?
To ask some additional question or to post answer simply add a comment.
Deadline is set on 24.4.2008 23:59 (Thursday).

More info:

$ ls $ORACLE_HOME/dbs
hc_RMANDELL.dat initRMANDELL.ora lkRMANDELL orapwRMANDELL

- ps shows real Oracle PMON processes
- one (S)PFILE
- one Oracle installation
- instances are started under the same user and group
- version of Oracle DB does not matter

Waiting for Your answers...

UPDATE

And the winner is Jakub Wartak who posted correct solution although I was expected little different solution (he had used symlink for it) but the main point is the same - you need to set "different" ORACLE_HOME.

So how i did start more (for instances) with the same ORACLE_SID?
My ORACLE_HOME for 11g is located at /opt/oracle/111.


$ ps -aef|grep pmon|grep -v grep
$ env|grep ORA
ORACLE_SID=RMANDELL
ORACLE_BASE=/opt/oracle
ORACLE_HOME=/opt/oracle/111
$ sqlplus / as sysdba

SQL*Plus: Release 11.1.0.6.0 - Production on Mon Apr 21 08:46:23 2008

Copyright (c) 1982, 2007, Oracle. All rights reserved.

Connected to an idle instance.

SQL> startup nomount
ORACLE instance started.

Total System Global Area 538656768 bytes
Fixed Size 2146112 bytes
Variable Size 150995136 bytes
Database Buffers 381681664 bytes
Redo Buffers 3833856 bytes
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 -
64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining
and Real Application Testing options


Now I change the ORACLE_HOME and add "/" at the end of path which change the
ORACLE_HOME but in fact path reamains valid.
So my new ORACLE_HOME is /opt/oracle/111/.


$ export ORACLE_HOME=/opt/oracle/111/
$ sqlplus / as sysdba

SQL*Plus: Release 11.1.0.6.0 - Production on Mon Apr 21 08:46:46 2008

Copyright (c) 1982, 2007, Oracle. All rights reserved.

Connected to an idle instance.

SQL> startup nomount
ORACLE instance started.

Total System Global Area 538656768 bytes
Fixed Size 2146112 bytes
Variable Size 150995136 bytes
Database Buffers 381681664 bytes
Redo Buffers 3833856 bytes
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 -
64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining
and Real Application Testing options


Again I modify ORACLE_HOME and I put another "/".


$ export ORACLE_HOME=/opt/oracle/111//
$ sqlplus / as sysdba

SQL*Plus: Release 11.1.0.6.0 - Production on Mon Apr 21 08:47:12 2008

Copyright (c) 1982, 2007, Oracle. All rights reserved.

Connected to an idle instance.

SQL> startup nomount
ORACLE instance started.

Total System Global Area 538656768 bytes
Fixed Size 2146112 bytes
Variable Size 150995136 bytes
Database Buffers 381681664 bytes
Redo Buffers 3833856 bytes
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 -
64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining
and Real Application Testing options


I can also add "/" at begin of path and path of course remains valid.


$ export ORACLE_HOME=///opt/oracle/111
$ sqlplus / as sysdba

SQL*Plus: Release 11.1.0.6.0 - Production on Mon Apr 21 08:48:01 2008

Copyright (c) 1982, 2007, Oracle. All rights reserved.

Connected to an idle instance.

SQL> startup nomount
ORACLE instance started.

Total System Global Area 538656768 bytes
Fixed Size 2146112 bytes
Variable Size 150995136 bytes
Database Buffers 381681664 bytes
Redo Buffers 3833856 bytes
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 -
64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining
and Real Application Testing options


Now I have started four RMANDELL instances.


$ !ps
ps -aef|grep pmon|grep -v grep
oracle 26459 1 0 08:46 ? 00:00:00 ora_pmon_RMANDELL
oracle 26501 1 0 08:46 ? 00:00:00 ora_pmon_RMANDELL
oracle 26541 1 0 08:47 ? 00:00:00 ora_pmon_RMANDELL
oracle 26583 1 0 08:48 ? 00:00:00 ora_pmon_RMANDELL


Maybe you are asking what is the meaning of this post.
As I wrote in title in this post it is for fun. Even this post is for fun it brings one lesson.
If you've got following message

ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist

or you've got "Connected to an idle instance.", your instance is up and running and your enviroment seems to be correct.
Then you did (probably) set the enviroment manually (using a "Tab key" in Bash) and that created "/" at the end of the path.
To find out which ORACLE_HOME is used just take a look on any trace file genereated in background_dump_dest directory.

Posted on Thursday, April 17, 2008 Comments [9]