Monday, 24 September 2012

Issue running adcfgclone.pl on Database Oracle home.



 While running adcfgclone.pl as oracle user, the session just hangs without giving any error in the log file. The issue was that it wasn’t able to connect to the database as:
sqlplus "/as sysdba"

Deep dive:

Most generally this can occur due to improper shutdown of the database. While in the course of a database shutdown, if any of the oracle process is not completed killed and it holds a large shared memory segment, such issues can occur which would prevent from normal database operation.

So next time when an instance tries to start it is not able to grab a large chunk of memory to get started.

This can be checked as follows:

After the database has been shut down , there shouldn’t be any processes running as oracle on the server level:

ipcs -m | grep <oracle user>

eg:

ipcs -m | grep oracle

key              shmid          owner   perms         bytes        nattch     status
0x185ee230 884763     oracle     640        789785472      0


Here in the above example, a single oracle process holds 789785472 bytes of shared memory, even after shutdown. If the database instance is started, then we would expect abnormal behaviors on the database side, like the login issue that we are discussing now.
This can cleaned as mentioned below:

ipcrm -m < shmid>

eg:

ipcrm -m 884763 

This would free up the memory held.

This resolved the issue.

No comments:

Post a Comment