【ARCHIVE】使用startup mount force啟動資料庫後無法修改歸檔模式的模擬
如果您需要調整資料庫的歸檔模式,在啟動資料庫之前,資料庫一定要保證“徹底關閉”,否則歸檔模式是不允許修改的。
簡單模擬一下。
1.檢視資料庫歸檔模式
$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.3.0 - Production on Wed Mar 3 00:10:42 2010
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
sys@ora10g> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 17
Current log sequence 19
2.使用“startup mount force”啟動資料庫到mount狀態(相當於一次異常斷電後的重啟)
sys@ora10g> startup mount force;
ORACLE instance started.
Total System Global Area 104857600 bytes
Fixed Size 1289172 bytes
Variable Size 88081452 bytes
Database Buffers 8388608 bytes
Redo Buffers 7098368 bytes
Database mounted.
3.此時如果修改歸檔模式將會收到“ORA-00265”的報錯
sys@ora10g> alter database archivelog;
alter database archivelog
*
ERROR at line 1:
ORA-00265: instance recovery required, cannot set ARCHIVELOG mode
原因很簡單,資料庫沒有處於一個穩定一致的狀態,因此無法完成歸檔模式的調整。
4.正確的調整方法如下
1)先OPEN資料庫
sys@ora10g> alter database open;
Database altered.
2)使用“shutdown immediate”徹底關閉資料庫
sys@ora10g> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
3)將資料庫啟動到mount狀態
sys@ora10g> startup mount;
ORACLE instance started.
Total System Global Area 104857600 bytes
Fixed Size 1289172 bytes
Variable Size 88081452 bytes
Database Buffers 8388608 bytes
Redo Buffers 7098368 bytes
Database mounted.
4)調整資料庫的歸檔模式
sys@ora10g> alter database archivelog;
Database altered.
成功!
5)OPEN資料庫
sys@ora10g> alter database open;
Database altered.
6)最後確認資料庫已處於歸檔模式
sys@ora10g> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 18
Next log sequence to archive 20
Current log sequence 20
5.小結
技術的每一個細節都值得去嘗試和推敲。做過了,思考了,也就得到了。
Good luck.
secooler
10.03.02
-- The End --
簡單模擬一下。
1.檢視資料庫歸檔模式
$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.3.0 - Production on Wed Mar 3 00:10:42 2010
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
sys@ora10g> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 17
Current log sequence 19
2.使用“startup mount force”啟動資料庫到mount狀態(相當於一次異常斷電後的重啟)
sys@ora10g> startup mount force;
ORACLE instance started.
Total System Global Area 104857600 bytes
Fixed Size 1289172 bytes
Variable Size 88081452 bytes
Database Buffers 8388608 bytes
Redo Buffers 7098368 bytes
Database mounted.
3.此時如果修改歸檔模式將會收到“ORA-00265”的報錯
sys@ora10g> alter database archivelog;
alter database archivelog
*
ERROR at line 1:
ORA-00265: instance recovery required, cannot set ARCHIVELOG mode
原因很簡單,資料庫沒有處於一個穩定一致的狀態,因此無法完成歸檔模式的調整。
4.正確的調整方法如下
1)先OPEN資料庫
sys@ora10g> alter database open;
Database altered.
2)使用“shutdown immediate”徹底關閉資料庫
sys@ora10g> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
3)將資料庫啟動到mount狀態
sys@ora10g> startup mount;
ORACLE instance started.
Total System Global Area 104857600 bytes
Fixed Size 1289172 bytes
Variable Size 88081452 bytes
Database Buffers 8388608 bytes
Redo Buffers 7098368 bytes
Database mounted.
4)調整資料庫的歸檔模式
sys@ora10g> alter database archivelog;
Database altered.
成功!
5)OPEN資料庫
sys@ora10g> alter database open;
Database altered.
6)最後確認資料庫已處於歸檔模式
sys@ora10g> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 18
Next log sequence to archive 20
Current log sequence 20
5.小結
技術的每一個細節都值得去嘗試和推敲。做過了,思考了,也就得到了。
Good luck.
secooler
10.03.02
-- The End --
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/519536/viewspace-628442/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ORA-00600 [kokasgi1]資料庫無法啟動的模擬與恢復資料庫
- Oracle資料庫歸檔模式的開啟和關閉Oracle資料庫模式
- GitLab修改配置後nginx無法啟動GitlabNginx
- Oracle 12.2應用PSU後資料庫無法啟動Oracle資料庫
- 3.1.5.4 啟動例項並mount 資料庫資料庫
- startup,startup mount,startup nomount之間的區別
- RAC開啟資料庫歸檔資料庫
- zblog域名後無法訪問 zblog資料庫地址修改資料庫
- MYSQL資料庫服務無法啟動MySql資料庫
- 對歸檔模式下CLEAR 未歸檔日誌後恢復資料庫的一點看法模式資料庫
- Oracle資料庫歸檔模式的切換ELOracle資料庫模式
- oracle 11g開啟歸檔模式及修改歸檔目錄Oracle模式
- 【儲存資料恢復案例】儲存斷電後無法成功重啟,虛擬機器無法啟動-資料恢復資料恢復虛擬機
- 關於Oath2.0Startup類無法啟動的問題
- 應用使用JNDI,資料庫無法連線,導致的程序無法啟動問題處理資料庫
- Docker容器無法啟動,裡面的配置檔案如何修改Docker
- Linux下修改fstab檔案造成系統無法啟動Linux
- docker容器無法啟動的情況下,如果修改配置檔案Docker
- Oracle日常問題-資料庫無法啟動(案例二)Oracle資料庫
- Oracle日常問題處理-資料庫無法啟動Oracle資料庫
- 達夢資料庫dmap服務無法正常啟動資料庫
- 116測試環境修改8088埠後iis無法啟動
- 【資料庫資料恢復】無法啟動MongoDB服務的資料恢復案例資料庫資料恢復MongoDB
- 如何使用ChatGPT模擬MySQL資料庫ChatGPTMySql資料庫
- 升級Mojave後,Xcode10啟動模擬器後無法執行程式了,怎麼辦?XCode行程
- 【資料庫資料恢復】突然斷電造成Syabse資料庫無法啟動的資料恢復案例資料庫資料恢復
- oracle adg備庫歸檔滿了無法同步Oracle
- 【YashanDB資料庫】Ubuntu系統載入Yashan C驅動後無法使用PHP資料庫UbuntuPHP
- 資料庫資料恢復——Windows無法啟動MongoDB服務的資料恢復案例資料庫資料恢復WindowsMongoDB
- GreatSQL資料庫DROP表後無法重建SQL資料庫
- NetworkEmulator For windows tools 開啟網路模擬後電腦無法上網Windows
- 使用 express 模擬後臺介面返回資料Express
- SQL資料庫怎麼進行資料歸檔和歸檔管理?SQL資料庫
- 求助!使用vagrant啟動時無法掛載檔案
- win10系統安裝模擬器後無法正常啟動執行如何解決Win10
- 無法啟動?教你進入安全模式模式
- derby 資料庫 伺服器模式 無法訪問資料庫伺服器模式
- 異常處理:IDEA Git 修改後的檔案無法CommitIdeaGitMIT
- hosts檔案如何修改 hosts檔案修改後無法儲存怎麼解決