Tuesday, May 09, 2006

Oracle Profile Limit Not Working

It can be useful to set a high CPU usage limit to stop runaway queries. "High" is application-specific, so set the limit as appropriate.

When the limit is reached, the session will be killed with the message, "ORA-02393: exceeded call limit on CPU usage".

If the limit does not work, verify the resource_limit parameter is set to true.


prompt -- Set pfile for: resource_limit=true
alter system set resource_limit=true scope=both;

drop profile profile_example
/

CREATE PROFILE profile_example
LIMIT CPU_PER_SESSION UNLIMITED CPU_PER_CALL 120000
CONNECT_TIME UNLIMITED IDLE_TIME UNLIMITED SESSIONS_PER_USER
UNLIMITED LOGICAL_READS_PER_SESSION UNLIMITED
LOGICAL_READS_PER_CALL UNLIMITED PRIVATE_SGA UNLIMITED
COMPOSITE_LIMIT UNLIMITED FAILED_LOGIN_ATTEMPTS UNLIMITED
PASSWORD_LOCK_TIME UNLIMITED PASSWORD_GRACE_TIME UNLIMITED
PASSWORD_LIFE_TIME UNLIMITED PASSWORD_REUSE_MAX UNLIMITED
PASSWORD_REUSE_TIME UNLIMITED PASSWORD_VERIFY_FUNCTION NULL
/

alter user limt_me profile profile_example
/

No comments:

Post a Comment