Ivan Kartik - Oracle and Linux Blog

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.

Does "P" really mean a Professional in OCP?

Yes I agree, title of this post sounds very provocative and some of the OCP's may be touched. Reason for writing this post is one of the last threads on OTN forums (and there were many such threads) regarding preparation for OCA certification exam. Original poster asked for "good model question papers". One of following replies to this question was: "if it is 9i oca then u can visit my homepage for test dump for all the four exams. these dumps are quite dependable since i cleared all the four exams based on them." I followed link provided in reply and I was really surprised. The page provides (as author says) dumps of questions for all exams for 9i OCA and OCP. But the real surprise comes with sentences at the bottom of the page: "I wud still advise people to prepare all the dump questions as much as they can, because afterall it wud help polishing ur knowledge and then the basic topics tested on the exam and the ideology behind is same so questions are appearing in a bit scrambled form but the concepts ORACLE want to test before certifying an individual are still the SAME!" My question is: What's wrong with documentation? What about of polishing your knowledge using guides provided by documentation? You can get the same information there. There is not reason for cheating. What is professional on memorizing questions and their answers? And It is very sad that OCP is suggesting to cheating as way to gain a certicate. What is professional on putting up people to cheating. Hopefully he didn't get his College or University diploma using the same way. "A piece of gud news is that the old dumps are still yielding in a lot of exact questions on the real test. The catch is that if u take exam in Oracle,India centre, you have higher chances of getting the dumps questions than anywhere else." What can I say on this...? Better I leave this without any comment. It is very sad that many people preffer memorizing, swotting instead of step-by-step getting of knowledge and practical experience to get OCP certificate. But more saddest is that there exist some OCPs which are suggesting people to cheat and providing them real questions from exam (which is AFAIK illegal). These two groups of people don't know or probably forgot the meaning of word "professional" which is hidden in the OCP abbreviation. I really have a great regard for those OCA/OCP which spent cosiderable time to study of documentation or books from well known Oracle scientists and transformed this knowledge to practical experience by doing own testcases on DB (for example) to test what they learnd. This sort of people will get knowledge and experience that will not vaporize few weeks after exam. I have a great regard for OCMs because swotting is not a way to get this certificate. My apologies to these people if they are touched this post or its title. Fortunatelly you can differ real OCP from OC"P" (cheater) just after few minutes of discussion or during work on the same project. Let me finish this post with a little joke. Two former class mates have met some years after University graduation. First tells to other "Man, when I realize how good engineers we are then I'm really scared to visit my medicine doctor."

Newer posts → Home ← Older posts