|
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博客 ” ,链接:https://blog.itpub.net/17013648/viewspace-1199471/ ,如需转载,请注明出处,否则将追究法律责任。