Rising Sun

            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
            148 隨筆 :: 0 文章 :: 22 評論 :: 0 Trackbacks

          今天研究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,搞定了!

          posted on 2014-04-30 14:38 brock 閱讀(9094) 評論(0)  編輯  收藏 所屬分類: oracle 數據庫
          主站蜘蛛池模板: 通山县| 甘谷县| 襄城县| 孟州市| 山东| 章丘市| 涿州市| 三都| 永康市| 临桂县| 关岭| 砚山县| 灵武市| 万安县| 苏尼特右旗| 会同县| 雷山县| 聂荣县| 偃师市| 会昌县| 格尔木市| 平顶山市| 嘉鱼县| 迭部县| 江陵县| 静海县| 台山市| 辽中县| 遂宁市| 抚顺市| 昌邑市| 凌云县| 柞水县| 磴口县| 南丹县| 东方市| 遂平县| 射阳县| 朔州市| 东海县| 磐石市|