OCP 1Z0 053 227

来源:互联网 发布:mysql select 锁表 编辑:程序博客网 时间:2024/06/06 04:07
227.You plan to control idle sessions that are blocking other sessions from performing transactions. Your 
requirement is to automatically terminate these blocking sessions when they remain idle for a specified 
amount of time. 
How would you accomplish this task? 
A. Set metric threshold 
B. Implement Database Resource Manager 
C. Enable resumable timeout for user sessions 
D. Add directives to Automatic Database Diagnostic Monitor (ADDM) 
Answer: B 

两种方法
1、使用profile

profile

Specify the name of the profile to be created. The name must satisfy the requirements listed in "Database Object Naming Rules". Use profiles to limit the database resources available to a user for a single call or a single session.

Oracle Database enforces resource limits in the following ways:

  • If a user exceeds the CONNECT_TIME or IDLE_TIME session resource limit, then the database rolls back the current transaction and ends the session. When the user process next issues a call, the database returns an error.

  • If a user attempts to perform an operation that exceeds the limit for other session resources, then the database aborts the operation, rolls back the current statement, and immediately returns an error. The user can then commit or roll back the current transaction, and must then end the session.

  • If a user attempts to perform an operation that exceeds the limit for a single call, then the database aborts the operation, rolls back the current statement, and returns an error, leaving the current transaction intact.



2、 Resource Manager 
http://docs.oracle.com/cd/E11882_01/server.112/e25494/dbrm.htm#ADMIN11859

Idle Time Limit

You can specify an amount of time that a session can be idle, after which it is terminated. You can also specify a more stringent idle time limit that applies to sessions that are idle and blocking other sessions.


0 0