詳解Oracle中的隱含參數(shù)_disable_logging
注意:Oracle的隱含參數(shù)只應(yīng)該在測試環(huán)境或者在Oracle Support的支持下使用。
從Oracle的系統(tǒng)表中,我們知道Oracle存在一個隱含參數(shù)_disable_logging可以用于禁用日志生成,這個參數(shù)顯然只能用于測試目的(可以極大提高Benchmark測試的性能),禁止日志生成必然導(dǎo)致事務(wù)的不可恢復(fù)性,而且會導(dǎo)致日志文件損壞。
SQL> select ksppinm,ksppdesc from x$ksppi where ksppinm like '%logging'; KSPPINM KSPPDESC -------------------- ------------------------------ _disable_logging Disable logging
因為特殊的需要,對這個參數(shù)進行了一點簡單測試:
1.設(shè)置參數(shù)
[oracle@jumper bdump]$ sqlplus "/ as sysdba" SQL*Plus: Release 9.2.0.4.0 - Production on Wed Oct 19 11:01:19 2005 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production With the Partitioning option JServer Release 9.2.0.4.0 - Production SQL> alter system set "_disable_logging"=true scope=both; System altered.
2.事務(wù)測試
SQL> create table t as select * from dba_users; Table created. SQL> select count(*) from t; COUNT(*) ---------- 12 SQL> shutdown abort; ORACLE instance shut down. SQL> startup ORACLE instance started. Total System Global Area 97588504 bytes Fixed Size 451864 bytes Variable Size 33554432 bytes Database Buffers 62914560 bytes Redo Buffers 667648 bytes Database mounted. Database opened. SQL> select count(*) from t; select count(*) from t * ERROR at line 1: ORA-00942: table or view does not exist
由于未產(chǎn)生相應(yīng)日志,數(shù)據(jù)庫crash或shutdown abort之后,上一次成功完成的檢查點之后變化的數(shù)據(jù)將無法恢復(fù)。
3.觀察alert文件
從日志中我們可以看到在instance recovery中,沒有數(shù)據(jù)被恢復(fù),只有成功完成的上次檢查點之前數(shù)據(jù)可以被獲取,之后數(shù)據(jù)都將丟失。
Wed Oct 19 20:38:38 2005 Beginning crash recovery of 1 threads Wed Oct 19 20:38:38 2005 Started first pass scan Wed Oct 19 20:38:39 2005 Completed first pass scan 0 redo blocks read, 0 data blocks need recovery Wed Oct 19 20:38:39 2005 Started recovery at Thread 1: logseq 2, block 201, scn 0.897632464 Recovery of Online Redo Log: Thread 1 Group 1 Seq 2 Reading mem 0 Mem# 0 errs 0: /opt/oracle/oradata/conner/redo01.log Wed Oct 19 20:38:39 2005 Completed redo application Wed Oct 19 20:38:39 2005 Ended recovery at Thread 1: logseq 2, block 201, scn 0.897652465 0 data blocks read, 0 data blocks written, 0 redo blocks read Crash recovery completed successfully
總結(jié)
以上就是這篇文章的全部內(nèi)容了,希望本文的內(nèi)容對大家的學(xué)習(xí)或者工作能帶來一定的幫助,如果有疑問大家可以留言交流。
相關(guān)文章
Oracle expdp/impdp 及 exp/imp 命令詳解
使用Oracle數(shù)據(jù)庫的過程中會經(jīng)常對數(shù)據(jù)進行導(dǎo)入導(dǎo)出,Oracle 數(shù)據(jù)庫提供 expdp / impdp (Data Pump,數(shù)據(jù)泵)以及 exp / imp 兩種工具進行數(shù)據(jù)的導(dǎo)入導(dǎo)出,可以對數(shù)據(jù)庫進行邏輯備份,這篇文章主要介紹了Oracle expdp/impdp 及 exp/imp 命令詳解,需要的朋友可以參考下2024-07-07ORACLE出現(xiàn)錯誤1033和錯誤ORA-00600的解決方法
這篇文章主要介紹了ORACLE出現(xiàn)錯誤1033和錯誤ORA-00600的解決方法,需要的朋友可以參考下2014-07-07Oracle實現(xiàn)行列轉(zhuǎn)換的方法分析
這篇文章主要介紹了Oracle實現(xiàn)行列轉(zhuǎn)換的方法,結(jié)合實例形式分析了Oracle針對固定列、不定列、列數(shù)不固定等情況下的行列轉(zhuǎn)換操作技巧,需要的朋友可以參考下2016-08-08oracle中to_date詳細(xì)用法示例(oracle日期格式轉(zhuǎn)換)
這篇文章主要介紹了oracle中to_date詳細(xì)用法示例,包括期和字符轉(zhuǎn)換函數(shù)用法、字符串和時間互轉(zhuǎn)、求某天是星期幾、兩個日期間的天數(shù)、月份差等用法2014-01-01