audit時的by session和by access選項的區別!
不知道該起一個怎樣的標題,總之寫這個文章的目的是源於一個從我這兒報名考ocp的哥們的問題,他做了一個針對042題庫上第12題的測試然後向我求證答案是否正確,很顯然答案A是不正確的,原因就像下面doc說的在語句審計和許可權審計審計DDL語句時只能使用by access,可語法上oracle並沒有限制,也就是說使用by session時也不會報錯,這樣很容易引起誤導,感覺oracle在很多地方都不夠嚴謹。
Number of Audit Records from Multiple Executions of a Statement
If an audited statement is issued multiple times in a single user session, then your audit trail can have one or more related records. The controlling clause BY ACCESS
causes each execution of an auditable operation within a cursor to generate a separate audit record. If you use the BY SESSION
clause instead, then your audit trail will contain a single audit record for each session, for each user and schema object. Only one audit record results, no matter how often the statement occurs in that session.
However, several audit options can be set only BY
ACCESS
:
All statement audit options that audit DDL statements
All privilege audit options that audit DDL statements
For all other audit options, BY
SESSION
is used by default.
SQL> AUDIT DROP ANY TABLE BY scott BY SESSION WHENEVER SUCCESSFUL;
What is the effect of this command?
A. One audit record is created for the whole session if user SCOTT successfully drops one or more tables
in his session.
B. One audit record is created for every session when any user successfully drops a table owned by
SCOTT.
C. One audit record is created for each successful DROP TABLE command executed by any user to drop
tables owned by SCOTT.
D. One audit record is generated for the session when SCOTT grants the DROP ANY TABLE privilege to
other users in his session.
E. One audit record is created for each successful DROP TABLE command executed in the session of
SCOTT.
Answer: A
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/19602/viewspace-1045216/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- audit物件許可權時的not exists選項!物件
- cookie和session的區別CookieSession
- disconnect session和kill session的區別Session
- disconnect session和kill session的區別 轉Session
- cookie 和session 的區別詳解CookieSession
- Cookie和Session的區別詳解CookieSession
- access_token和refresh_token的區別
- Session 和 Cookie 區別SessionCookie
- cookie和session的區別(全面總結)CookieSession
- cookie和session的詳解與區別CookieSession
- Session和Cookie的聯絡與區別SessionCookie
- PHP中session和cookie的區別薦PHPSessionCookie
- Session和Cookie的區別與聯絡SessionCookie
- 【提示】filter 與access 的區別Filter
- http中session和cookie的區別和關係HTTPSessionCookie
- alter database和alter system和alter session的區別DatabaseSession
- 在Oracle中session和process的區別(轉)OracleSession
- Python和access的區別有哪些?Python教程Python
- Oracle 執行計劃中access 和 filter的區別OracleFilter
- cookie與session的區別CookieSession
- session與transaction的區別Session
- session與cookie的區別SessionCookie
- Redis分散式Session和普通的cookie session有什麼區別?Redis分散式SessionCookie
- Cookie 和 Session 關係和區別CookieSession
- 【轉】Session ID/session token 及和cookie區別SessionCookie
- Hibernate的Session的get()和load()方法區別Session
- oracle taf type型別為session和select的區別Oracle型別Session
- SpringMVC(3)-request域和session域的作用和區別SpringMVCSession
- cookie,session,sessionStorage,localStotage的區別CookieSession
- cookie和session 有什麼區別?CookieSession
- session 和 cookie 有什麼區別?SessionCookie
- COOKIE和SESSION有什麼區別?CookieSession
- 一文搞懂Session和Cookie的用法及區別SessionCookie
- CST和GMT時間的區別
- input和:input選擇器的區別
- create和recreate index時縮短時間的選項Index
- [20180918]disconnect session和kill session的區別.txtSession
- PHPCookie與Session的使用與區別PHPCookieSession