Friday, May 22, 2009

ORA-01102: cannot mount database in exclusive mode

After checking in $ORACLE_HOME/dbs I found that it contains lk file, which is used for locking shared memory.I deleted this file lkdev and tried starting my database again.

But to my surprise it's now giving me following error
ORA-00205:error in identifying control file, check alert log for more info
I checked the Alert Log file which gave me the hint to correct the issue

It means the issue is coming due to one of the following

1. Before I started the database, there were some Oracle processes present in teh system and i need to get rid of them

we can use the following to correct this

$ps -ef| grep ora_

this will give me the list of processes which i can kill using OS command , passing pid as argument

$kill -9 631

or we can use the following command to kill all the oracle processes on the system " but make sure there are no other instances" as it will kill all oracle processes

$ ps -fu oraim | grep ora_ | awk '{print "kill -9 " $2}' | ksh

where oraim is my oracle database owner.

2.Existence od shared Memeory Segments or Semaphores in the Operating System, Although Oracle Instance is already down

we can easily find that out and remove them too usign following comands

$ipcs -b -- This is to find Shared Memory Segments and Semaphores

Remove Shared Memeory Segments

$ipcrm -m

Remove Semaphore

$ipcrm -s
Once this is done , I tried to start the database once again and this time it started without any issues.

Cheers
Aashish

EMCA Fails with ORA-01034: ORACLE not available

Hi ,

When upgrading my Database from Oracle 10.2.0.1.0 to 10.2.0.3.0, after running Database Upgrade Assistant, I received the message that Database Control is not configured.


After searching a lot and trying many things which did not worked. I got the solution to this issue.The main reason for this issue is the database has not been cleaned up, need to do some cleaning activity in the database to get it working.

Solution:
Logon SQLPLUS as user SYS or SYSTEM, and drop the sysman account and management
objects:

SQL> drop user sysman cascade;
SQL> drop role MGMT_USER;
SQL> drop user MGMT_VIEW cascade;
SQL> drop public synonym MGMT_TARGET_BLACKOUTS;
SQL> drop public synonym SETEMVIEWUSERCONTEXT;

Run the following $emca -deconfig dbcontrol db -repos drop
Run the following $emca -config dbcontrol db -repos create

After doing the following tasks it started without any issues.

Reference:
Metalink Note: 560666.1 Dbconsole Creation Fails with an 'ORA-01034: ORACLE not available

Cheers
Aashish