ENV
專業(yè)領域包括做網站、網站建設、商城網站制作、微信營銷、系統(tǒng)平臺開發(fā), 與其他網站設計及系統(tǒng)開發(fā)公司不同,創(chuàng)新互聯(lián)公司的整合解決方案結合了幫做網絡品牌建設經驗和互聯(lián)網整合營銷的理念,并將策略和執(zhí)行緊密結合,為客戶提供全網互聯(lián)網整合方案。[oracle@daidai ~]$ uname -a Linux daidai.com 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:39 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux [oracle@daidai ~]$ lsb_release -a LSB Version: :core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32:graphics-3.1-noarch Distributor ID: RedHatEnterpriseServer Description: Red Hat Enterprise Linux Server release 5.5 (Tikanga) Release: 5.5 Codename: Tikanga SQL> select * from v$version; BANNER -------------------------------------------------------------------------------- Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production PL/SQL Release 11.2.0.4.0 - Production
Audit by access
SQL> show parameter audit NAME TYPE VALUE ------------------------------------ ------------------------------ ------------------------------ audit_file_dest string /u01/oracle/admin/ocp11g/adump audit_sys_operations boolean TRUE audit_syslog_level string audit_trail string DB, EXTENDED SQL> audit select on daidai.t by access; Audit succeeded. SQL> select * from DBA_OBJ_AUDIT_OPTS; OWNER OBJECT_NAME OBJECT_TYPE ALT AUD COM DEL GRA IND INS LOC REN SEL ------------------------------ ------------------------------ ----------------------- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- UPD REF EXE CRE REA WRI FBK ----- --- ----- ----- ----- ----- ----- DAIDAI T TABLE -/- -/- -/- -/- -/- -/- -/- -/- -/- A/A -/- -/- -/- -/- -/- -/- -/- SQL> select * from t; --conn daidai user,執(zhí)行兩次
select * from dba_common_audit_trail where object_schema='DAIDAI' and object_name='T' and audit_type='Standard Audit' order by extended_timestamp desc;
audit by access產生兩條記錄。
Audit by Session
SQL> audit select on daidai.t by session; Audit succeeded. SQL> select * from DBA_OBJ_AUDIT_OPTS; OWNER OBJECT_NAME OBJECT_TYPE ALT AUD COM DEL GRA IND INS LOC REN SEL ------------------------------ ------------------------------ ----------------------- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- UPD REF EXE CRE REA WRI FBK ----- --- ----- ----- ----- ----- ----- DAIDAI T TABLE -/- -/- -/- -/- -/- -/- -/- -/- -/- S/S -/- -/- -/- -/- -/- -/- -/- SQL> truncate table aud$; --sys user Table truncated.SQL> select * from t; --conn daidai user,執(zhí)行兩次 select * from dba_common_audit_trail where object_schema='DAIDAI' and object_name='T' and audit_type='Standard Audit' order by extended_timestamp desc;同樣audit by session產生兩條記錄。
Audit 缺省情況
SQL> select * from dba_obj_audit_opts; no rows selected SQL> audit select on daidai.t; Audit succeeded. SQL> select * from dba_obj_audit_opts; OWNER OBJECT_NAME OBJECT_TYPE ALT AUD COM DEL GRA IND INS LOC REN SEL ------------------------------ ------------------------------ ----------------------- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- UPD REF EXE CRE REA WRI FBK ----- --- ----- ----- ----- ----- ----- DAIDAI T TABLE -/- -/- -/- -/- -/- -/- -/- -/- -/- S/S -/- -/- -/- -/- -/- -/- -/-Audit 缺省是by session
綜上,針對同一SQL在同一SESSION中,Access & Session都會產生多條記錄,并且audit缺省是by session。
另外有需要云服務器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內外云服務器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務器、裸金屬服務器、高防服務器、香港服務器、美國服務器、虛擬主機、免備案服務器”等云主機租用服務以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務可用性高、性價比高”等特點與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應用場景需求。