audit_trail與extended!
受到v$parameter_valid_values顯示結果的誤導,我以為EXTENDED是一個單獨的引數內容,所以
直接修改audit_trail=extended時例項無法啟動,最後修改audit_trail='XML,EXTENDED'重啟例項時依然發生了
錯誤ORA-01078,原因就是加上了單引號:
SQL> select * from v$parameter_valid_values where name='audit_trail';
NUM NAME ORDINAL VALUE ISDEFAULT
---------- --------------- ---------- -------------------- ----------
907 audit_trail 1 DB FALSE
907 audit_trail 2 OS FALSE
907 audit_trail 3 NONE FALSE
907 audit_trail 4 TRUE FALSE
907 audit_trail 5 FALSE FALSE
907 audit_trail 6 DB_EXTENDED FALSE
907 audit_trail 7 XML FALSE
907 audit_trail 8 EXTENDED FALSE
已選擇8行。
SQL>
--================================
doc對引數audit_trail的解釋:
AUDIT_TRAILProperty Description
Parameter type String
Syntax AUDIT_TRAIL = { none | os | db | db,extended | xml | xml,extended }
Default value none
Modifiable No
Basic No
AUDIT_TRAIL enables or disables database auditing.
Values:
none
Disables database auditing.
os
Enables database auditing and directs all audit records to the operating system's audit trail.
db
Enables database auditing and directs all audit records to the database audit trail (the SYS.AUD$ table).
db,extended
Enables database auditing and directs all audit records to the database audit trail (the SYS.AUD$ table). In addition, populates the SQLBIND and SQLTEXT CLOB columns of the SYS.AUD$ table.
xml
Enables database auditing and writes all audit records to XML format OS files.
xml,extended
Enables database auditing and prints all columns of the audit trail, including SqlText and SqlBind values.
You can use the SQL statement AUDIT to set auditing options regardless of the setting of this parameter.
--=================================
SQL> show parameter audit
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
audit_file_dest string G:ORACLEPRODUCT10.2.0ADMIN
TESTADUMP
audit_sys_operations boolean FALSE
audit_trail string NONE
SQL> alter system set audit_trail=xml,extended scope=spfile;
系統已更改。
SQL> shutdown immediate
資料庫已經關閉。
已經解除安裝資料庫。
ORACLE 例程已經關閉。
SQL> startup
ORACLE 例程已經啟動。
Total System Global Area 209715200 bytes
Fixed Size 1248116 bytes
Variable Size 79692940 bytes
Database Buffers 121634816 bytes
Redo Buffers 7139328 bytes
資料庫裝載完畢。
資料庫已經開啟。
SQL> show parameter audit
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
audit_file_dest string G:ORACLEPRODUCT10.2.0ADMIN
TESTADUMP
audit_sys_operations boolean FALSE
audit_trail string XML, EXTENDED
SQL>
--===========================
oracle太噁心了,db_extended是個獨立的引數選項,而xml和extended結合呢又是
xml,extended,真實莫名其妙,另外v$parameter_valid_values的顯示結果又把extended單獨列了出來,
不看文件的話還真不知道extended是對xml的擴充套件。
--===============================
SQL> show parameter audit
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
audit_file_dest string G:ORACLEPRODUCT10.2.0ADMIN
TESTADUMP
audit_sys_operations boolean FALSE
audit_trail string XML, EXTENDED
SQL>
SQL>
SQL>
SQL> alter system set audit_trail=db,extended scope=spfile;
系統已更改。
SQL> shutdown immediate
資料庫已經關閉。
已經解除安裝資料庫。
ORACLE 例程已經關閉。
SQL> startup
ORACLE 例程已經啟動。
Total System Global Area 209715200 bytes
Fixed Size 1248116 bytes
Variable Size 79692940 bytes
Database Buffers 121634816 bytes
Redo Buffers 7139328 bytes
資料庫裝載完畢。
資料庫已經開啟。
SQL>
--=============================
後來的補充:
其實EXTENDED還可以和db組合起來使用,所以oracle把EXTENDED單獨列出來可能也是有道理的,EXTENDED不能和os組合:
SQL> alter system set audit_trail=db,extended scope=spfile;
System altered.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 313860096 bytes
Fixed Size 1374304 bytes
Variable Size 159385504 bytes
Database Buffers 146800640 bytes
Redo Buffers 6299648 bytes
Database mounted.
Database opened.
SQL> show parameter audit
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
audit_file_dest string E:ORACLEADMINTESTADUMP
audit_sys_operations boolean FALSE
audit_trail string DB, EXTENDED
SQL> alter system set audit_trail=os,extended scope=spfile;
alter system set audit_trail=os,extended scope=spfile
*
ERROR at line 1:
ORA-32017: failure in updating SPFILE
ORA-00096: invalid value OS,EXTENDED for parameter audit_trail, must be from
among NONE | OS | DB | DB,EXTENDED | XML | XML,EXTENDED
SQL>
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/19602/viewspace-1051505/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle10g在修改完audit_trail為extended資料庫啟動不了,如何處理OracleAI資料庫
- Oracle 21C Extended ClustersOracle
- FGA審計及audit_trail引數AI
- ORACLE初始化引數:AUDIT_TRAILOracleAI
- [20210223]sys與Extended Data Types.txt
- Explain Extended檢視MySQL的優化AIMySql優化
- MySQL 5.7 EXPLAIN EXTENDED語句說明MySqlAI
- AUDIT_TRAIL設定及審計日誌清理AI
- 0427建立Extended Statistics函式索引問題函式索引
- 0429建立Extended Statistics函式索引問題函式索引
- Oracle中審計引數audit_trail的討論(轉)OracleAI
- link/Extended dependency 無法顯示連線
- You cannot change a partition into an extended one or vice versa Delete it firstdelete
- 10g初始化引數AUDIT_TRAIL變化(二)AI
- 10g初始化引數AUDIT_TRAIL變化(一)AI
- 管理AUDIT_TRAIL初始化引數配置標準審計AI
- Linux 格式化擴充套件分割槽(Extended)Linux套件
- Raft論文《 In Search of an Understandable Consensus Algorithm (Extended Version) 》研讀RaftGo
- oracle 11g 擴充套件統計資訊extended_statsOracle套件
- entity framework extended library , bulk execute,deleting and updating ,opensourceFramework
- [20140529]11g下引數audit_trail的修改.txtAI
- 利用 WebSphere Extended Deployment 實現應用程式的無縫線上更新Web
- SAP UI5 sap.ui.Device.media.RANGESETS.SAP_STANDARD_EXTENDED 介紹UIdev
- postgresSQL Extended Query執行過程和sharding-proxy的處理SQL
- 由v$statname其指標TBS Extension: bytes extended想到一點小事指標
- Oracle Extended Distance Clusters (Oracle 擴充套件距離叢集 - 異地RAC)Oracle套件
- Oracle 12C 新特性之擴充套件資料型別(extended data type)Oracle套件資料型別
- LTE-5G學習筆記5---Normal CP和Extended CP的區別筆記ORM
- 【12c】擴充套件資料型別(Extended Data Types)-- MAX_STRING_SIZE套件資料型別
- [20130916]12c Indexing Extended Data Types and index.txtIndex
- PKCS #6: Extended- Certificate Syntax Standard (PKCS #6: 擴充套件證書語法標準)套件
- 使用 TensorFlow Extended (TFX) 在生產環境中部署機器學習 丨 Google 開發者大會 2018機器學習Go
- 快速掌握及瞭解emc vplex儲存虛擬化軟體用於部署oracle extended rac之一Oracle
- 適用於oracle extended rac之ibm svc and emc vplex儲存虛擬化軟體的差異初識之一OracleIBM
- 【Azure 雲服務】Azure Cloud Service (Extended Support) 雲服務開啟診斷日誌外掛 WAD Extension (Windows Azure Diagnostic) 無法正常工作的原因CloudWindows
- day102:MoFang:後端完成對簡訊驗證碼的校驗&基於celery完成非同步簡訊傳送&flask_jwt_extended&使用者登入的API介面後端非同步FlaskJWTAPI
- undefined與null與?. ??UndefinedNull
- &與&&, |與||區別