1. 11g預設audit_trail會開啟,若確認未使用,建議將此參數關閉(須重啟DB生效),目前該DB已有將audit相關table 與index 存放到non system or sysaux tablespace,若確認須使用建議要有定其排程刪除其audit資料。
alter system set audit_trail=NONE scope=spfile;
SQL> show parameter audit
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
audit_file_dest string /opt/oracle/admin/topprod/adump
audit_sys_operations boolean FALSE
audit_syslog_level string
audit_trail string DB
TABLE_NAME TABLESPACE_NAME
------------------------------ ------------------------------
AUD$ AUDTBS
SQL> select index_name,tablespace_name from dba_indexes where table_name='AUD$';
INDEX_NAME TABLESPACE_NAME
------------------------------ ------------------------------
SYS_IL0000000407C00040$$ AUDTBS
SYS_IL0000000407C00041$$ AUDTBS
2. UNDO TABELSPACE datafile SIZE建議調整,目前undo tablespace 之datafile 為1g maxsize 無限制,此設定會造成oracle自行再調整undo_retention時會有錯亂的問題(10g 11g皆如此),建議調整datafile current size與autoextend max szie相當,以避免造成oracle自行tune undo retention時因錯亂而造成expired的空間不被重複使用。(此可online調整)
SQL> select tablespace_name,bytes/1024/1024 "MB" ,maxbytes/1024/1024 "MAX"
2 from dba_data_files
3 where tablespace_name='UNDOTBS1';
TABLESPACE_NAME MB MAX
------------------------------ ---------- ----------
UNDOTBS1 1060 32767.9844
* 建議用固定大小(create-crrent size/max size)10G/10GB or 5G/10G,之後要監控實際用量後再調整!
* 建議至少用兩個 datafile。
reference to undefined name 'syntax' Exception of type 'MindTouch.Deki.Script.Runtime.DekiScriptUndefinedNameException' was thrown. (click for details)Callstack:
at User:Alang/IT_專案工作/Oracle_DBA_筆記/Oracle_Installation/Oracle_11g_Tips/11g~安裝後的調整
MindTouch.Deki.Script.Runtime.DekiScriptUndefinedNameException: reference to undefined name 'syntax' Exception of type 'MindTouch.Deki.Script.Runtime.DekiScriptUndefinedNameException' was thrown.
at MindTouch.Deki.Script.Compiler.DekiScriptExpressionEvaluation.Visit (MindTouch.Deki.Script.Expr.DekiScriptVar expr, DekiScriptExpressionEvaluationState state) [0x00000] in <filename unknown>:0
at MindTouch.Deki.Script.Expr.DekiScriptVar.VisitWith[DekiScriptExpressionEvaluationState,Range] (IDekiScriptExpressionVisitor`2 visitor, DekiScriptExpressionEvaluationState state) [0x00000] in <filename unknown>:0
at MindTouch.Deki.Script.Compiler.DekiScriptExpressionEvaluation.Evaluate (MindTouch.Deki.Script.Expr.DekiScriptAccess expr, DekiScriptExpressionEvaluationState state, Boolean evaluateProperties) [0x00000] in <filename unknown>:0
at MindTouch.Deki.Script.Compiler.DekiScriptExpressionEvaluation.Visit (MindTouch.Deki.Script.Expr.DekiScriptAccess expr, DekiScriptExpressionEvaluationState state) [0x00000] in <filename unknown>:0
at MindTouch.Deki.Script.Expr.DekiScriptAccess.VisitWith[DekiScriptExpressionEvaluationState,Range] (IDekiScriptExpressionVisitor`2 visitor, DekiScriptExpressionEvaluationState state) [0x00000] in <filename unknown>:0
at MindTouch.Deki.Script.Compiler.DekiScriptExpressionEvaluation.Visit (MindTouch.Deki.Script.Expr.DekiScriptCall expr, DekiScriptExpressionEvaluationState state) [0x00000] in <filename unknown>:0
at MindTouch.Deki.Script.Expr.DekiScriptCall.VisitWith[DekiScriptExpressionEvaluationState,Range] (IDekiScriptExpressionVisitor`2 visitor, DekiScriptExpressionEvaluationState state) [0x00000] in <filename unknown>:0
at MindTouch.Deki.Script.Compiler.DekiScriptExpressionEvaluation.Visit (MindTouch.Deki.Script.Expr.DekiScriptSequence expr, DekiScriptExpressionEvaluationState state) [0x00000] in <filename unknown>:0
at MindTouch.Deki.Script.Expr.DekiScriptSequence.VisitWith[DekiScriptExpressionEvaluationState,Range] (IDekiScriptExpressionVisitor`2 visitor, DekiScriptExpressionEvaluationState state) [0x00000] in <filename unknown>:0
at MindTouch.Deki.Script.Compiler.DekiScriptExpressionEvaluation.Visit (MindTouch.Deki.Script.Expr.DekiScriptReturnScope expr, DekiScriptExpressionEvaluationState state) [0x00000] in <filename unknown>:0
3. invisible parameter modify (restart instance) 此為11.2.0.2之後被引進的新的特性,建議關閉此新特性,此新特性會造成log_file_sync的mode一直切換而造成lgwr在將log_buffer寫到redo log file的速度異常的慢,若嚴重時可能造成所有session hang住(修改須重啟instance生效)
alter system set "_use_adaptive_log_file_sync"=false scope=spfile; (修改須重啟instance)
(/opt/oracle/diag/rdbms/topprod/topprod/trace/topprod_lgwr_19156.trc) 可以觀察到
4. (online可修改生效) 關閉11g 新功能 _OPTIMIZER_USE_FEEDBACK,此為11g optimizer新特性,容易造成已固定execution plan又變化而造成效能問題,建議關閉。
alter system set "_OPTIMIZER_USE_FEEDBACK"=FALSE scope=both;
5. (online可修改生效) for Big size (DB) 大型資料庫 尤其有一個table 好幾十G的,建議將此參數關閉,當此參數開啟時預設為2,可能為因table size較大而oracle會自行決定所有程式在執行時不再參考該table統計職而啟用
alter system set optimizer_dynamic_sampling=0 scope=both;
---此為可立即修改
SQL> select ISSYS_MODIFIABLE from v$parameter where name='optimizer_dynamic_sampling';
ISSYS_MOD
---------
IMMEDIATE