Thursday, July 23, 2009

ORA-00600: [LibraryCacheNotEmptyOnClose]

Recently a database in 9iR2 (9.2.0.8.0) was migrated to 10gR2 (10.2.0.4.0), this database was already having a hard time with memory issues and frequent ORA-04030 errors. At the time the workaround for this issue was to increase the value of the PGA_AGGREGATE_TARGET instance parameter. Since 10g consumes more resources than 9i this error re-appeared and the local operators found easy to rebounce the oracle instance when this problem was more frequently shown. However, after the migration to 10gR2 this procedures throwed the above mentioned ORA-00600 error.

Googling around I found that this errors is due to a bug (Bug 4483084 OERI[LibraryCacheNotEmptyOnClose] on shutdown), and it is harmless, so this can be ignored. There are people who have never seen this error but they started facing it after migration to 64 bit platforms.

According to Shervin Sheidaei, he stated that purging the memory region prior to the shutdown process using a shutdown event trigger the problem can be worked around.

Code taken from his blog:
CREATE or replace TRIGGER flush_shared_pool
BEFORE SHUTDOWN ON DATABASE
BEGIN
execute immediate 'ALTER SYSTEM FLUSH SHARED_POOL';
EXCEPTION
WHEN OTHERS THEN
RAISE_APPLICATION_ERROR (num => -20000, msg => 'Error flushing pool');
END;

2 comments:

Noons said...

Man! I was told by Oracle support this was fixed in 10.2.0.4!
Obviously not. Been getting it since going to 10.2.0.3.

Hector R. Madrid said...

I was also surprised to find out that the blogs that reported this error are dated back to 10.2.0.3.0, so at first glance this error was relatively very old.