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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [20210223]sys與Extended Data Types.txt
- FGA審計及audit_trail引數AI
- Extended Window Manager Hints(1)
- Oracle 21C Extended ClustersOracle
- link/Extended dependency 無法顯示連線
- Linux 格式化擴充套件分割槽(Extended)Linux套件
- Raft論文《 In Search of an Understandable Consensus Algorithm (Extended Version) 》研讀RaftGo
- Kubernetes Extended Resource 擴充套件資源使用簡介套件
- postgresSQL Extended Query執行過程和sharding-proxy的處理SQL
- LightOJ1074 Extended Traffic【SPFA+DFS 標記負環的結點】
- 【Azure Cloud Service】使用RESTAPI更新Cloud Service(Extended Support) 中所配置的證書CloudRESTAPI
- SAP UI5 sap.ui.Device.media.RANGESETS.SAP_STANDARD_EXTENDED 介紹UIdev
- 【Azure Cloud Service】使用RESTAPI更新Cloud Service(Extended Support) 中所配置的證書HqCloudRESTAPI
- 【Azure Cloud Service】使用Key Vault Secret新增.CER證書到Cloud Service Extended Support中Cloud
- LTE-5G學習筆記5---Normal CP和Extended CP的區別筆記ORM
- 使用 TensorFlow Extended (TFX) 在生產環境中部署機器學習 丨 Google 開發者大會 2018機器學習Go
- 【Azure 雲服務】Azure Cloud Service (Extended Support) 雲服務開啟診斷日誌外掛 WAD Extension (Windows Azure Diagnostic) 無法正常工作的原因CloudWindows
- day102:MoFang:後端完成對簡訊驗證碼的校驗&基於celery完成非同步簡訊傳送&flask_jwt_extended&使用者登入的API介面後端非同步FlaskJWTAPI
- undefined與null與?. ??UndefinedNull
- Promise與async/await與GeneratorPromiseAI
- for of 與 for in
- 程式與執行緒、同步與非同步、阻塞與非阻塞、併發與並行執行緒非同步並行
- forms元件補充與ModelForm簡單使用與cookie與sessionORM元件CookieSession
- Python學習筆記 5.0 元組 與 字典 與 集合 與 公共操作 與 推導式Python筆記
- 聊聊執行緒與程式 & 阻塞與非阻塞 & 同步與非同步執行緒非同步
- 進與穩,時代與技術,新基建與華為雲
- jQuery與JavaScript與ajax三者的區別與聯絡jQueryJavaScript
- rpm與yum,at與crontab,sed命令使用
- GRPC與 ProtoBuf 的理解與總結RPC
- Process與Socket,Select與Accept關係
- PHP 與 Swoole 淺析與學習PHP
- Iterator與Iterable(迭代器與可迭代)
- 漏型與源型、PNP與NPN
- PySpark與GraphFrames的安裝與使用Spark
- css(二):高度與文件流,line-box與box,寬度,position與CSS
- js == 與 ===JS
- A與B
- cookie與session的區別與聯絡CookieSession
- Tensor與tensor深入分析與異同