Oracle 11G OCP 1Z0-052 129

LuiseDalian發表於2014-06-30
(129)A database user SMITH tries to query the V$SESSION view and fails to access it as follows:

SQL> connect smith/smith

Connected.

SQL> SELECT * FROM v$session;

SELECT * FROM v$session

*

ERROR at line 1:

ORA-00942: table or view does not exist

Which are the two possible solutions to enable SMITH to query the data in V$SESSION? (Choose two.)

A. granting SELECT privilege to SMITH on V$SESSION

B. granting SELECT privilege to SMITH on V_$SESSION

C. asking the user SMITH to run the catalog.sql script

D. granting SELECT privilege to SMITH on V$FIXED_TABLES

E. setting the O7_DICTIONARY_ACCESSIBILITY parameter to TRUE

F. creating a view based on V$SESSION and granting SELECT privilege to SMITH on the view that was created

答案:(B、F)

解析:

-- 方法一

sys@TESTDB11>grant select on v_$session to usera;

Grant succeeded.

usera@TESTDB11>select count(*) from v$session;

  COUNT(*)

----------

        45

       

sys@TESTDB11>revoke select on v_$session from usera;

Revoke succeeded.

       

--方法二(建立檢視)

sys@TESTDB11>create view mysession as select * from v$session;

View created.

sys@TESTDB11>grant select on mysession to usera;

Grant succeeded.

usera@TESTDB11>select count(*) from v$session;

  COUNT(*)

----------

        45

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/17013648/viewspace-1199471/,如需轉載,請註明出處,否則將追究法律責任。

相關文章