Thursday, July 14, 2011

ORA-21779: duration not active



SMON generated the following errors in the alert log file :

SMON: following errors trapped and ignored:
ORA-21779: duration not active

ORA-06512: at line 1
Drop transient type:  SYSTPfQMEpjI7QJ7gQ6wVAuBAng==ΓΏ��

As per Oracle : SMON: Following Errors Trapped And Ignored ORA-21779 [ID 988663.1]

Cause of the error:
This error is caused by SMON not able to clean up some transient types and this problem has been reported a few times in Oracle10gR2

Solution

Other then producing large trace files,this error has no impact,SMON is erroring whilst evaluating a SYSTEM trigger whilst executing cleanup of TYPEs which are no longer needed,so currently we have the following options:

Option 1 --Bounce the DB and see if the error is persistent
OR
Option 2--Also Dev in similar bugs suggested to set the following event at system level to delay the cleanup of these types:

alter system set events '22834 trace name context forever, level 1';

This do not affect database functionality and the only problem is the the alert.log is filling up with many error messages (also after restarting the instance the error should not occur again).

The command "alter system flush shared_pool" could also resolve the problem.

As transient types are created when compiling cursors into memory then it looks like a good idea to execute"alter system flush shared_pool" as this cannot create any problems.

Option 3: Drop the transient type

The existence of the Transient type can be verified by query;

SELECT * FROM dba_types
WHERE type_name LIKE 'SYS%==' AND length(type_name) = 29

 

select 'drop type "'||s.username||'"."'||o.name||'" FORCE;'
from obj$ o, type$ t, dba_users s
where o.oid$ = t.tvoid
and bitand(t.properties,8388608) = 8388608
and (sysdate-o.ctime) > 0.0007
and o.owner#=s.user_id


DROP TYPE "TRACS_USER"."SYSTPZd71k+XjoyfgQG8KQW8u9g=="

What is this transient type?

How was it created?

Why can't SMON drop it while I, a DBA user, can?

When selecting from a table function which has return type ANYDATASET oracle creates dynamically a type object which matches the actual return type. and sql will cast it automatically to this actual return type, no ANYDATASET output is returned by the select. this mechanism is introduced with oracle 10 in general the smon should cleanup those types.

No comments: