Sunday, March 13, 2011

ORA-01102: cannot mount database in EXCLUSIVE mode

Problem:

I had used DBCA to create Oracle database and after doing all; had started the database from SQL and got the error message:


SQL> startup
ORACLE instance started.
Total System Global Area 1603411968 bytes
Fixed Size                  2213776 bytes
Variable Size             402655344 bytes
Database Buffers         1191182336 bytes
Redo Buffers                7360512 bytes
ORA-01102: cannot mount database in EXCLUSIVE mode

I checked the Alert Log file which gave me the hint to correct the issue



---------(I looked for the pmon process;)--------

[oracle@geoppdb01 ~]$ ps -ef|grep pmon
oracle   11758     1  0 Jan05 ?        00:00:00 ora_pmon_mydb
oracle   17754     1  0 14:17 ?        00:00:00 ora_pmon_MYDB
oracle   17795 17715  0 14:19 pts/1    00:00:00 grep pmon

Cause:

ORACLE_SID environment variable is case sensitive and in the .bash_profile I had set this as uppercase, despite the fact that  it was lower case.

Solution:

I had first changed the ORACLE_SID variable as lowercase, and then shutt down the two instances and startup solved my problem.
SQL> startup
ORACLE instance started.
Total System Global Area 1603411968 bytes
Fixed Size                  2213776 bytes
Variable Size             402655344 bytes
Database Buffers         1191182336 bytes
Redo Buffers                7360512 bytes
Database mounted.
Database opened.
SQL>

1 comment:

  1. SQL> startup nomount
    ORACLE instance started.

    Total System Global Area 285212672 bytes
    Fixed Size 1218992 bytes
    Variable Size 92276304 bytes
    Database Buffers 188743680 bytes
    Redo Buffers 2973696 bytes
    SQL> alter database mount;
    alter database mount
    *
    ERROR at line 1:
    ORA-01102: cannot mount database in EXCLUSIVE mode


    SQL> show parameter db_name

    NAME TYPE VALUE
    ------------------------------------ ----------- ------------------------------
    db_name string oracle10
    SQL> show parameter control_files

    NAME TYPE VALUE
    ------------------------------------ ----------- ------------------------------
    control_files string /u01/app/oracle/product/10.2.0
    /oradata/oracle10/control01.ct
    l, /u01/app/oracle/product/10.
    2.0/oradata/oracle10/control02
    .ctl, /u01/app/oracle/product/
    10.2.0/oradata/oracle10/contro
    l03.ctl
    SQL> shu immediate
    ORA-01507: database not mounted


    ORACLE instance shut down.
    SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - ProductionWith the Partitioning, OLAP and Data Mining options
    [oracle@localhost ~]$ ls
    oracle10g.env sqlnet.log
    [oracle@localhost ~]$ vi oracle10g.env

    Oracle Global Database name oracle10g And env file "export ORACLE_SID=oracle10g" name should be same

    [oracle@localhost ~]$ ls
    oracle10g.env sqlnet.log
    [oracle@localhost ~]$ . ./oracle10g.env
    [oracle@localhost ~]$ ls
    oracle10g.env sqlnet.log
    [oracle@localhost ~]$ sqlplus / as sysdba

    SQL*Plus: Release 10.2.0.1.0 - Production on Mon Oct 8 16:13:54 2012

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


    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options

    SQL> select name from v$database
    2 ;

    NAME
    ---------
    ORACLE10

    SQL>

    ReplyDelete