Oracle11g新特性注意事项
在從oracle10g升級到oracle11g后,就需要對oracle11g的新特性進行了解,這些特性可能會對應用及性能產生影響,需要調整。
1. Oracle11g密碼過期策略
oracle11g中默認在default概要文件中設置了PASSWORD_LIFE_TIME=180天后過期,到期后會自動改密碼, 會影響應用的應用。
SQL> alter profile default limit password_life_time unlimited;
?
2. Oracle11g對用戶名密碼大小寫敏感
Oracle11g中默認用戶名和密碼大小寫敏感,oracle10g就是沒有這個問題。
SQL> alter system set sec_case_sensitive_logon=false scope=spfile;
?
3. Oracle11g空表不會立即創建segment,默認是true. 在oracle11.2.0.1這樣就會產生一些問題,最大的問題就是exp導出時,空表不會導出數據。對于使用oracle11.2.0.1 exp客戶端導入11.2.0.2以上版本數據庫時會出現EXP-00001錯誤。
SQL> alter system set deferred_segment_creation = false scope=spfile;
經測試采用11.2.0.4的exp導出空表,現導入是可以導入的。如果采用expdp、impdp導入導出是沒有問題的。
對于已經是空表問題的解決方式如下,找到表空,并立即分配空間:
SQL> select 'alter table '||table_name||' allocate extent;' from user_tables where num_rows=0 ;
'ALTERTABLE'||TABLE_NAME||'ALLOCATEEXTENT;' ?
----------------------------------------------------------- ? ?
alter table C allocate extent; ? ?
alter table B allocate extent; ? ?
alter table A allocate extent; ? ?
alter table ABC allocate extent; ? ?
alter table TEST_LOCK allocate extent;
?
4. Oracle11g默認是開啟審記功能的,開啟審記功能是會對性能產生影響的,可以考慮關閉。
SQL> alter system set audit_trail=none scope=spfile;
該參數默認為DB,即審計數據存在system表空間的AUD$表中。新接手生產庫中造成一例SYSTEM表空間滿的故障。警告日志記錄如下。
ORA-1653: unable to extend table SYS.AUD$ by 128 in???????????????? tablespace SYSTEM
ORA-1653: unable to extend table SYS.AUD$ by 8192 in???????????????? tablespace SYSTEM
Thu Dec 10 08:47:13 2015
ORA-1653: unable to extend table SYS.AUD$ by 128 in???????????????? tablespace SYSTEM
ORA-1653: unable to extend table SYS.AUD$ by 8192 in???????????????? tablespace SYSTEM
Thu Dec 10 08:47:13 2015
ORA-1653: unable to extend table SYS.AUD$ by 128 in???????????????? tablespace SYSTEM
ORA-1653: unable to extend table SYS.AUD$ by 8192 in???????????????? tablespace SYSTEM
ORA-1653: unable to extend table SYS.AUD$ by 128 in???????????????? tablespace SYSTEM
ORA-1653: unable to extend table SYS.AUD$ by 8192 in???????????????? tablespace SYSTEM
最后直接清除掉:
truncate table sys.aud$;
轉載于:https://blog.51cto.com/koumm/1583543
總結
以上是生活随笔為你收集整理的Oracle11g新特性注意事项的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 使用go build 进行条件编译
- 下一篇: BZOJ3775 : 点和直线