I received this error message when I was trying to mount the primary database.
SQL> alter database mount;
alter database mount
ERROR at line 1:
ORA-01102: cannot mount database in EXCLUSIVE mode
An instance tried to mount the database in exclusive mode, but some other instance has already mounted the database in exclusive or parallel mode. Shut down all other instances before mounting the database in exclusive mode.
Verify that the database was shutdown cleanly by doing the following:
1. Verify that there is not a “sgadef<sid>.dbf” file in the directory
$ ls $ORACLE_HOME/dbs/sgadef<sid>.dbf
If this file does exist, remove it.
$ rm $ORACLE_HOME/dbs/sgadef<sid>.dbf
2. Verify that there are no background processes owned by “oracle”
$ ps -ef | grep ora_ | grep $ORACLE_SID
If background processes exist, remove them by using the Unix command “kill”. For example:
$ kill -9 <Process_ID_Number>
3. Verify that no shared memory segments and semaphores that are owned
by “oracle” still exist
$ ipcs –a
If there is shared memory segments and semaphores owned by “oracle”, remove the shared memory segments
$ ipcrm -M <Shared_Memory_Key>
And remove the semaphores
$ ipcrm -s <Semaphore_ID_Number>
NOTE: The example shown above assumes that you only have one database on this machine. If you have more than one database, you will need to shut down all other databases before proceeding with Step 4.
4. Verify that the “$ORACLE_HOME/dbs/lk<sid>” file does not exist
5. Startup the instance