052试题 52 - lock

52. View the Exhibits and examine lock waits.

052试题 52 - lock

Users HR and SH complain that their transactions on one of the application tables, EMP, are waiting for response.
Which action would you take to release the lock and enable users HR and SH to continue with their
transactions?
A.Kill the session of the user SCOTT with session ID118.
B.Issue manual checkpoint using the ALTER SYSTEM command.
C.Modify the profile used by user SCOTT to reduce the CONNECT_TIME limit.
D.Flush the Shared Pool to remove the SQL statement causing "wait" in memory.

参考答案 A

解析:会话持有锁, 所以要将session kill掉。 所以选择A 。 其他选项与锁都没有关系 。

参考文档:

https://docs.oracle.com/cd/E11882_01/server.112/e25494/manproc.htm#ADMIN11192

Terminating Sessions

Sometimes it is necessary to terminate current user sessions. For example, you might want to perform an administrative operation and need to terminate all non-administrative sessions. This section describes the various aspects of terminating sessions, and contains the following topics:

When a session is terminated, any active transactions of the session are rolled back, and resources held by the session (such as locks and memory areas) are immediately released and available to other sessions.

You terminate a current session using the SQL statement ALTER SYSTEM KILL SESSION. The following statement terminates the session whose system identifier is 7 and serial number is 15:

ALTER SYSTEM KILL SESSION '7,15';