52.View the Exhibits and examine lock waits. Users HR and SH complain that their transactions on one
2016-07-23 07:13
627 查看
52.View the Exhibits and examine lock waits.
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
解析:我们先模拟一下图中锁定的情况
--先解锁hr、sh、scott账号
SQL> alter user hr identified by hr account unlock;
User altered.
SQL> alter user sh identified by sh account unlock;
User altered.
SQL> alter user scott identified by tiger account unlock;
User altered.
--然后以sh中sales表为测试表,进行update
--赋予权限
SQL> grant update on sh.sales to scott;
Grant succeeded.
SQL> grant update on sh.sales to hr;
Grant succeeded.
--打开三个crt窗口,分别以scott、sh、hr登陆然后执行如下语句
打开em可以看到如下图,这个时候可以看到每个的会话id,并且可以看到scott中的阻塞会话数为2个,分别是hr和sh
然后通过如下语句可以查看到具体的信息
select * from DBA_LOCK where session_id in (56,52,65)
然后通过下面的语句查出来56对应的serial#进行kill
SQL> select sid,serial# from v$session where sid=56;
SID SERIAL#
---------- ----------
56 619
SQL> alter system kill session '56,619';
System altered.
这个时候sh就会解锁,但是sh也没有提交,所以sh还会继续锁hr,如下图
这里可以继续kill,因此选择D
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
解析:我们先模拟一下图中锁定的情况
--先解锁hr、sh、scott账号
SQL> alter user hr identified by hr account unlock;
User altered.
SQL> alter user sh identified by sh account unlock;
User altered.
SQL> alter user scott identified by tiger account unlock;
User altered.
--然后以sh中sales表为测试表,进行update
--赋予权限
SQL> grant update on sh.sales to scott;
Grant succeeded.
SQL> grant update on sh.sales to hr;
Grant succeeded.
--打开三个crt窗口,分别以scott、sh、hr登陆然后执行如下语句
打开em可以看到如下图,这个时候可以看到每个的会话id,并且可以看到scott中的阻塞会话数为2个,分别是hr和sh
然后通过如下语句可以查看到具体的信息
select * from DBA_LOCK where session_id in (56,52,65)
然后通过下面的语句查出来56对应的serial#进行kill
SQL> select sid,serial# from v$session where sid=56;
SID SERIAL#
---------- ----------
56 619
SQL> alter system kill session '56,619';
System altered.
这个时候sh就会解锁,但是sh也没有提交,所以sh还会继续锁hr,如下图
这里可以继续kill,因此选择D
相关文章推荐
- 2.Which two statements are true about the Automatic Workload Repository (AWR)
- 3.While observing the index statistics, you find that an index is highly fragmented, thereby resulti
- 4.Your test database is running in NOARCHIVELOG mode. Which statement is true regarding the type of
- 5.The database instance is currently using SPFILE. View the Exhibit and examine the error that you
- 6.Note the following points describing various utilities in Oracle Database 11g:
- 7.You have issued a SHUTDOWN ABORT command to bring down your database instance. Considerthe steps t
- 8.Observe the information in the columns:
- 9.View the Exhibit and examine the privileges granted to the SL_REP user.
- 10.Examine the following statement that is used to modify the constraint on the SALES table:
- 11.Identify the memory component from which memory may be allocated for:
- 12.Which is the correct description of a pinned buffer in the database buffer cache?
- 13.You have executed this command to change the size of the database buffer cache:
- 14.These are points that describe the contents of different memory components:
- 15.Which two statements are true about Shared SQL Area and Private SQL Area? (Choose two.)
- 16.Note the following functionalities of various background processes:
- 17.Note the functionalities of various background processes:
- 18.View the Exhibit and identify the component marked with a question mark.
- 19.Which two statements about the background process of the database writer are true? (Choose two.)
- 20.You have set Tablespace Full Metrics Threshold values for the USERS tablespace as follows:
- 21.Which three statements are true about logical structures of the Oracle database? (Choose three.)