透過alert日誌重建引數檔案
當spfile損壞,而且沒有了pfile檔案和init.ora檔案,則我們不得不重建引數檔案:
下面模擬引數檔案損壞,刪除了所有的引數檔案:
SQL> startup nomount;
ORA-01078: failure in processing system parameters
LRM-00109: ???????????????????????? '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initorcl3939.ora'
processes = 150
memory_target = 404M
control_files = "/u01/app/oracle/oradata/orcl3939/control01.ctl"
control_files = "/u01/app/oracle/flash_recovery_area/orcl3939/control02.ctl"
control_files = "/u01/app/oracle/oradata/orcl3939/control03.ctl"
db_block_size = 8192
compatible = "11.2.0.0.0"
db_recovery_file_dest = "/u01/app/oracle/flash_recovery_area"
db_recovery_file_dest_size= 3852M
undo_tablespace = "UNDOTBS1"
remote_login_passwordfile= "EXCLUSIVE"
db_domain = "localdomain"
instance_name = "ORCL3939"
service_names = "a,b,c,d"
dispatchers = "(PROTOCOL=TCP) (SERVICE=orcl3939XDB)"
local_listener = "(ADDRESS=(PROTOCOL=TCP)(HOST = localhost.localdomain)(PORT = 1521))"
audit_file_dest = "/u01/app/oracle/admin/orcl3939/adump"
audit_trail = "DB"
db_name = "orcl3939"
open_cursors = 300
diagnostic_dest = "/u01/app/oracle"
trace_enabled = TRUE
SQL> startup force nomount;
ORACLE 例程已經啟動。
Total System Global Area 150667264 bytes
Fixed Size 1335080 bytes
Variable Size 92274904 bytes
Database Buffers 50331648 bytes
Redo Buffers 6725632 bytes
......
所以我們由上知,在引數檔案中,需要最少的引數就是db_name,資料庫例項就可以啟動了
雖然啟動了例項,但是缺少一些引數,沒有指定控制檔案位置,所以mount狀態出現了錯誤:
SQL> alter database mount;
alter database mount
*
第 1 行出現錯誤:
ORA-00205: ?????????, ??????, ???????
下面模擬引數檔案損壞,刪除了所有的引數檔案:
SQL> startup nomount;
ORA-01078: failure in processing system parameters
LRM-00109: ???????????????????????? '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initorcl3939.ora'
下面透過alert日誌建立了pfile:
SQL> startup nomount;
ORACLE 例程已經啟動。
Total System Global Area 422670336 bytes
Fixed Size 1336960 bytes
Variable Size 260049280 bytes
Database Buffers 155189248 bytes
Redo Buffers 6094848 bytes
摘自alert:SQL> startup nomount;
ORACLE 例程已經啟動。
Total System Global Area 422670336 bytes
Fixed Size 1336960 bytes
Variable Size 260049280 bytes
Database Buffers 155189248 bytes
Redo Buffers 6094848 bytes
SQL> create spfile from pfile;
檔案已建立。
檔案已建立。
processes = 150
memory_target = 404M
control_files = "/u01/app/oracle/oradata/orcl3939/control01.ctl"
control_files = "/u01/app/oracle/flash_recovery_area/orcl3939/control02.ctl"
control_files = "/u01/app/oracle/oradata/orcl3939/control03.ctl"
db_block_size = 8192
compatible = "11.2.0.0.0"
db_recovery_file_dest = "/u01/app/oracle/flash_recovery_area"
db_recovery_file_dest_size= 3852M
undo_tablespace = "UNDOTBS1"
remote_login_passwordfile= "EXCLUSIVE"
db_domain = "localdomain"
instance_name = "ORCL3939"
service_names = "a,b,c,d"
dispatchers = "(PROTOCOL=TCP) (SERVICE=orcl3939XDB)"
local_listener = "(ADDRESS=(PROTOCOL=TCP)(HOST = localhost.localdomain)(PORT = 1521))"
audit_file_dest = "/u01/app/oracle/admin/orcl3939/adump"
audit_trail = "DB"
db_name = "orcl3939"
open_cursors = 300
diagnostic_dest = "/u01/app/oracle"
trace_enabled = TRUE
所以當引數檔案損壞,或者沒有pfile,init.ora檔案,不用太擔心,alter日誌裡記錄了資料庫啟動建立例項的資訊,可以手工建立spfile,過程很簡單吧!
下面給給大家做個很有意思的實驗,緊緊用db_name建立了例項:SQL> startup force nomount;
ORACLE 例程已經啟動。
Total System Global Area 150667264 bytes
Fixed Size 1335080 bytes
Variable Size 92274904 bytes
Database Buffers 50331648 bytes
Redo Buffers 6725632 bytes
下面摘自alert日誌:
Starting up:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options.
Using parameter settings in server-side pfile /u01/app/oracle/product/11.2.0/dbhome_1/dbs/initorcl3939.ora
System parameters with non-default values:
db_name = "orcl3939"
Thu May 07 22:13:34 2015
PMON started with pid=2, OS id=5411
Thu May 07 22:13:34 2015
VKTM started with pid=3, OS id=5413 at elevated priority
VKTM running at (10)millisec precision with DBRM quantum (100)ms
Thu May 07 22:13:34 2015
GEN0 started with pid=4, OS id=5417
Thu May 07 22:13:34 2015
DIAG started with pid=5, OS id=5419
Thu May 07 22:13:34 2015
DBRM started with pid=6, OS id=5421
Thu May 07 22:13:34 2015
PSP0 started with pid=7, OS id=5423
Thu May 07 22:13:34 2015
DIA0 started with pid=8, OS id=5425
......Starting up:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options.
Using parameter settings in server-side pfile /u01/app/oracle/product/11.2.0/dbhome_1/dbs/initorcl3939.ora
System parameters with non-default values:
db_name = "orcl3939"
Thu May 07 22:13:34 2015
PMON started with pid=2, OS id=5411
Thu May 07 22:13:34 2015
VKTM started with pid=3, OS id=5413 at elevated priority
VKTM running at (10)millisec precision with DBRM quantum (100)ms
Thu May 07 22:13:34 2015
GEN0 started with pid=4, OS id=5417
Thu May 07 22:13:34 2015
DIAG started with pid=5, OS id=5419
Thu May 07 22:13:34 2015
DBRM started with pid=6, OS id=5421
Thu May 07 22:13:34 2015
PSP0 started with pid=7, OS id=5423
Thu May 07 22:13:34 2015
DIA0 started with pid=8, OS id=5425
......
所以我們由上知,在引數檔案中,需要最少的引數就是db_name,資料庫例項就可以啟動了
雖然啟動了例項,但是缺少一些引數,沒有指定控制檔案位置,所以mount狀態出現了錯誤:
SQL> alter database mount;
alter database mount
*
第 1 行出現錯誤:
ORA-00205: ?????????, ??????, ???????
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29876893/viewspace-1628893/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【Oracle日誌】- 日誌檔案重建Oracle
- 引數檔案丟失無法啟動_ 利用alert日誌修復
- 警告日誌檔案alert_.log
- 【alert】每週自動備份alert日誌檔案
- 歸檔oracle alert日誌Oracle
- 透過alert日誌看Oracle Startup的三個階段Oracle
- 日誌檔案過大清理
- oracle alert日誌Oracle
- 11g的alert日誌檔案會自動拆分
- 資料檔案重建,從歸檔日誌中回退資料
- ORACLE 告警日誌alert過大的處理Oracle
- 歸檔日誌命令及引數總結
- ASM有自己的引數、密碼、alert、監聽檔案ASM密碼
- 使用sql查alert日誌SQL
- 資料庫引數檔案控制檔案日誌檔案資料檔案跟蹤檔案等8大檔案的字典資料庫
- 日誌檔案
- oracle清理trace、alert、aud、listener等日誌檔案Oracle
- 檔案-ALERT檔案
- 日誌檔案和歸檔日誌檔案的關係以及如何切換日誌
- 編輯產生的init.ora文字檔案增加歸檔日誌引數段
- oracle alert日誌每天截斷truncate_alert.shOracle
- 刪除日誌檔案組與日誌檔案成員
- 管理日誌檔案
- dump日誌檔案
- APACHE日誌檔案Apache
- 透過 Filebeat 收集 ubuntu 系統日誌Ubuntu
- oracle 中 alert 報警日誌過大的處理方法Oracle
- Linux下日誌檔案過大解決方案Linux
- input檔案選擇框檔案過濾引數accept
- 關於歸檔日誌的幾個引數選項
- window下刪除過舊的日誌檔案指令碼(如jboss的日誌檔案 資料庫的trace檔案)指令碼資料庫
- [20220826]顯示alert日誌檔案全路徑.txt
- 用外部表的方式查詢alert日誌檔案中ora-錯誤資訊
- 控制檔案/歸檔日誌
- 解決Windows上alert日誌和listener日誌不能超過4GB的問題Windows
- Redhat中透過命令工具和配置檔案設定TCP/IP引數的方法RedhatTCP
- 增加日誌檔案,修改當前日誌檔案大小
- 誤刪除$ORACLE_HOME/dbs下的引數檔案、密碼檔案,如何快速重建Oracle密碼