Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

dbstart, EXCLUSIVE mode and manual startup..

steelnwoolDec 22 2010 — edited Dec 23 2010
Hi

Having a few different mis-understandings here about how oracle starts up etc.

I'm using 11g on Centos[RHEL]. I'm more or less a beginner.

I have the default database configured and another one I plan upon using for a recovery catalog.

Default db: SID = learning, global database name = learningdb.franklyn.bignose.ca

New db [made with dbca]: SID = recovery, global database name = recovery

My issue is basically this: I don't understand why Oracle starts up differently when I use startup mount; alter database open - vs - dbstart $ORACLE_HOME

Here is what my /etc/oratab looks like:

learning:/u00/app/oracle/product/11.2.0/dbhome_1:Y
recovery:/u00/app/oracle/product/11.2.0/dbhome_1:Y

My Experiments:

1: Starting up my databases manually.

$> export ORACLE_SID=learning
$> sqlplus / as sysdba;
SQL> startup mount;
SQL> alter database open;
SQL> exit;
$> export ORACLE_SID=recovery
$> sqlplus / as sysdba;
SQL> startup mount;
SQL> alter database open;
SQL> exit;

Then everything works just fine.

2: Using DB Start

$> dbstart $ORACLE_HOME
Processing Database instance "learning": log file /u00/app/oracle/product/11.2.0/dbhome_1/startup.log
Processing Database instance "recovery": log file /u00/app/oracle/product/11.2.0/dbhome_1/startup.log

Great, but when I connect to my first db like this

$> export ORACLE_SID=learning
$> sqlplus / as sysdba;

I'm told that I have connected to an idle instance. And when I try startup mount, I get

$> sqlplus / as sysdba
SQL> startup mount
ORACLE instance started.

Total System Global Area 849530880 bytes
Fixed Size 1339824 bytes
Variable Size 536874576 bytes
Database Buffers 306184192 bytes
Redo Buffers 5132288 bytes
ORA-01102: cannot mount database in EXCLUSIVE mode

This also happens if i change my oracle_sid to recovery and do same with recovery database.

3: Finally, and this is weird...

$> sqlplus sys/PASSWORD@recovery as sysdba
SQL> exit
$> sqlplus sys/PASSWORD@learningDB as sysdba

Both work just fine. normal. no probs.

===

So, does that mean when you have multiple databases and you startup using dbstart, you need to explicitly state the database names on the command line versus relying upon the ORACLE_SID environment variable?

Where as if you start them up manually , you do can rely upon the ORACLE_SID alone?

Why is oracle so cranky like this?

Thanks!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 20 2011
Added on Dec 22 2010
16 comments
3,377 views