oracle啟動案例一則

next_junction發表於2014-04-11

        oracle資料庫有四種狀態:shutdown,nomount,mount,open。讀取引數檔案啟動到nomount,啟動到mount狀態時候會讀取控制檔案,然後根據controlfile內容載入資料庫啟動open狀態。        

        如下是當10.2版本的資料庫升級到11.2時候(升級過程是先升級軟體,後DBUA升級資料庫),用10.2版本的sqlplus去實驗一下是否能開啟資料庫,可以很清楚的看到,sqlplus會以10.2的spfile啟動到nomount狀態,再繼續alter database mount時候,就會去讀controlfile,此時因為資料庫已經升級到了11.2,所以會有如下輸出:

[oracle@orcl6 ~]$ source .bash_profile--選擇環境變數

What is your choose of Oracle version?

Enter only 1 or 2

1) Oracle 10g

2) Oracle 11g

#? 1

Oracle user Environment is:

ORACLE_BASE=/u01/app/oracle

ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_home_1

ORACLE_SID=orcl

[oracle@orcl6 ~]$ which sqlplus--檢視sqlplus版本資訊

/u01/app/oracle/product/10.2.0/db_home_1/bin/sqlplus

[oracle@orcl6 ~]$ sqlplus / as sysdba


SQL*Plus: Release 10.2.0.5.0 - Production on Fri Apr 11 18:34:48 2014


Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.


Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options


SQL> startup nomount;

ORA-01081: cannot start already-running ORACLE - shut it down first

SQL> shu immediate

ORA-01507: database not mounted


ORACLE instance shut down.

SQL> startup nomount;--成功啟動到nomount狀態

ORACLE instance started.


Total System Global Area  243269632 bytes

Fixed Size                  1273032 bytes

Variable Size              92275512 bytes

Database Buffers          146800640 bytes

Redo Buffers                2920448 bytes

SQL> show parameter spfile--檢視使用的引數檔案


NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

spfile                               string      /u01/app/oracle/product/10.2.0

                                                 /db_home_1/dbs/spfileorcl.o

                                                 ra

SQL> alter database mount;--明顯的報錯如下>>

alter database mount

*

ERROR at line 1:

ORA-00201: control file version 11.2.0.3.0 incompatible with ORACLE version

10.2.0.5.0

ORA-00202: control file: '/u01/app/oracle/oradata/orcl/control01.ctl'

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29117696/viewspace-1140394/,如需轉載,請註明出處,否則將追究法律責任。

相關文章