今天研究Oracle遇到了這個問題ora-01033:oracle initializationor shutdown in progress
ORA-01033:ORACLEinitialization or shutdown in progress
解決方法
1)開始-運行-cmd
2)命令行中輸入SQLPLUS SYS/SYS AS SYSDBA
3)輸入SHUTDOWN
4)輸入STARTUP.注意這里是最重要的地方,在顯示相關數據后,它還會顯示為什么不能啟動的錯誤所在.
C:\Users\lenovo>SQLPLUSSYS/SYS AS SYSDBA
SQL*Plus: Release 10.2.0.3.0 - Production on星期三 7月 3 11:43:32 2013
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
連接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 -Production
With the Partitioning, OLAPand Data Mining options
SQL> SHUTDOWN
ORA-01109:數據庫未打開
已經卸載數據庫。
ORACLE例程已經關閉。
SQL> STARTUP
ORACLE例程已經啟動。
Total System Global Area 293601280 bytes
Fixed Size 1290208 bytes
Variable Size 234881056 bytes
Database Buffers 50331648 bytes
Redo Buffers 7098368 bytes
數據庫裝載完畢。
ORA-01157:無法標識/鎖定數據文件 6 - 請參閱 DBWR 跟蹤文件
ORA-01110:數據文件 6: 'F:\DC\DB\SDRS\TS_SDRS.DBF'
SQL> alter databasedatafile'F:\DC\DB\SDRS\TS_SDRS.DBF'offline drop;
數據庫已更改。
SQL> alter database open;
數據庫已更改。
SQL> drop tablespaceTS_SDRS including contents;
表空間已刪除。
SQL> create undo tablespace TS_SDRS
2 datafile'CracleoradatasmsdbUNDOTBS01.DBF'size 2048M extent management local;
表空間已創建。
SQL> alter system setundo_tablespace=TS_SDRS;
系統已更改。
SQL> shutdown
數據庫已經關閉。
已經卸載數據庫。
ORACLE例程已經關閉。
SQL> startup
ORACLE例程已經啟動。
Total System Global Area 293601280 bytes
Fixed Size 1290208 bytes
Variable Size 243269664 bytes
Database Buffers 41943040 bytes
Redo Buffers 7098368 bytes
數據庫裝載完畢。
數據庫已經打開。
SQL>
------------------
ORA-01245、ORA-01547錯誤的解決 數據庫rman restore database 之后,執行recover database的時候,報告ORA-01245錯誤,詳細的錯誤信息如下:
SQL> recover database until cancel; ORA-00279: change 575876 generated at 12/01/2009 08:19:49 needed for thread 1 ORA-00289: suggestion : /oracle/flash_recovery_area/ORCL/archivelog/2009_12_01/o1_mf_1_2_%u_.arc ORA-00280: change 575876 for thread 1 is in sequence #2
Specify log: {=suggested | filename | AUTO | CANCEL} auto ORA-00308: cannot open archived log '/oracle/flash_recovery_area/ORCL/archivelog/2009_12_01/o1_mf_1_2_%u_.arc' ORA-27037: unable to obtain file status Linux Error: 2: No such file or directory Additional information: 3
ORA-00308: cannot open archived log '/oracle/flash_recovery_area/ORCL/archivelog/2009_12_01/o1_mf_1_2_%u_.arc' ORA-27037: unable to obtain file status Linux Error: 2: No such file or directory Additional information: 3
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below ORA-01245: offline file 2 will be lost if RESETLOGS is done ORA-01110: data file 2: '/oracle/oradata/orcl/undotbs01.dbf'
SQL> |
[@more@]
檢查ORA-01245那一行,發現是datafile 2狀態為offline,解決的方法就是首先將datafile 2 online,然后再recover database。
SQL> alter database datafile 2 online;
Database altered.
SQL> recover database until cancel; ORA-00279: change 575876 generated at 12/01/2009 08:19:49 needed for thread 1 ORA-00289: suggestion : /oracle/flash_recovery_area/ORCL/archivelog/2009_12_01/o1_mf_1_2_%u_.arc ORA-00280: change 575876 for thread 1 is in sequence #2
Specify log: {=suggested | filename | AUTO | CANCEL} cancel Media recovery cancelled. SQL> alter database open resetlogs;
Database altered.
SQL> |
--------------------
ORA-01589: 要打開數據庫則必須使用 RESETLOGS 或 NOR
ORA-01589: 要打開數據庫則必須使用 RESETLOGS 或 NORESETLOGS
選項
SQL> alter database open
ORA-01589: 要打開數據庫則必須使用 RESETLOGS 或
NORESETLOGS 選項
SQL> alter database open resetlogs;
alter database
open resetlogs
*
ERROR 位于第 1 行:
ORA-01113: 文件 1 需要介質恢復
ORA-01110:
數據文件 1: 'E:\ORACLE\ORADATA\EYGLE\SYSTEM01.DBF'
SQL> recover database
using backup controlfile;
ORA-00279: 更改 1670743 (在 04/17/2008 14:13:16 生成)
對于線程 1 是必需的
ORA-00289: 建議: E:\ORACLE\ORA92\RDBMS\ARC00030.001
ORA-00280:
更改 1670743 對于線程 1 是按序列 # 30 進行的
指定日志: {<RET>=suggested | filename |
AUTO | CANCEL}
E:\oracle\oradata\EYGLE\REDO01.LOG
ORA-00310: 存檔日志包含序列
29;要求序列 30
ORA-00334: 歸檔日志:
'E:\ORACLE\ORADATA\EYGLE\REDO01.LOG'
SQL> recover database using
backup controlfile;
ORA-00279: 更改 1670743 (在 04/17/2008 14:13:16 生成) 對于線程 1
是必需的
ORA-00289: 建議: E:\ORACLE\ORA92\RDBMS\ARC00030.001
ORA-00280: 更改
1670743 對于線程 1 是按序列 # 30 進行的
指定日志: {<RET>=suggested | filename |
AUTO |
CANCEL}
E:\oracle\oradata\EYGLE\REDO02.LOG
已應用的日志。
完成介質恢復。
SQL>
alter database open resetlogs;
數據庫已更改。
OK,搞定了!