10g升級至11g後資料庫無法啟動的問題解決

jeanron100發表於2013-09-23

今天升級資料庫碰到一個很鬱悶的問題,把10g的資料庫升級到11g以後,結果有一個改動,需要重啟資料庫,就敲了shutdown immediate,結果再startup,資料庫竟然起不來了。

$ORACLE_HOME,$ORACLE_SID等等變數都沒有問題。

sqlplus / as sysdba

SQL> startup
ORA-01012: not logged on

反覆試了好幾次,都是這樣。這是準生產環境,汗馬上就下來了。

1.sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Mon Sep 23 19:44:01 2013

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Connected. ---這個登入資訊貌似也少了點什麼,

2.單純敲sqlplus,直接報了ORA-01089的錯誤。

 sqlplus

SQL*Plus: Release 11.2.0.2.0 Production on Mon Sep 23 19:44:30 2013

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Enter user-name: system
Enter password:
ERROR:
ORA-01089: immediate shutdown in progress - no operations are permitted
Process ID: 0
Session ID: 0 Serial number: 0

3.透過nolog方式登入,結果一startup就開始報錯了。。。。


> sqlplus /nolog

SQL*Plus: Release 11.2.0.2.0 Production on Mon Sep 23 19:47:26 2013

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

SQL> conn / as sysdba

Connected to an idle instance.
SQL> startup
ORA-01012: not logged on

4.最後再沒辦法了,只能startup force了。沒想到這庫一下子活過來了。

SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup force
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
ORACLE instance started.

Total System Global Area 4042100736 bytes
Fixed Size                  2232688 bytes
Variable Size            1879051920 bytes
Database Buffers         2147483648 bytes
Redo Buffers               13332480 bytes
Database mounted.
Database opened.
SQL> show parameter insta

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
active_instance_count                integer
cluster_database_instances           integer     1
instance_groups                      string
instance_name                        string      XXXXX
instance_number                      integer     0
instance_type                        string      RDBMS
open_links_per_instance              integer     4
parallel_instance_group              string
parallel_server_instances            integer     1
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

測試登入也正常,萬幸萬幸。

> sqlplus

SQL*Plus: Release 11.2.0.2.0 Production on Mon Sep 23 19:49:27 2013

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> exit



----------------------------問題根源---------------------------

因為後續的操作,需要重啟資料庫,結果停了庫之後,再啟,竟然又出現了上面的情況

mos上說,

CAUSE

An orphaned shared memory segment belonging to the ORACLE_SID still exists from a previous instance startup.

我看沒有其他的程式,只有監聽還起著。
> ps -ef|grep PETAEM
xxxxxx 4688     1  0 Sep23 ?        00:00:00 /opt/app/oracle/dbaemspt1/product/11.2.0/bin/tnslsnr LISTENER_xxxxx  -inherit
oraaems1 28843 20949  0 09:00 pts/1    00:00:00 grep PETAEM

停了監聽之後,啟停就正常了。
> lsnrctl stop LISTENER_PETAEM1
LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 24-SEP-2013 09:01:03
Copyright (c) 1991, 2010, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbaemspt1)(PORT=1583)))
The command completed successfully
> sqlplus / as sysdba
SQL*Plus: Release 11.2.0.2.0 Production on Tue Sep 24 09:01:10 2013
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
Connected to an idle instance.
SQL> startup
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
ORACLE instance started.
Total System Global Area 4042100736 bytes
Fixed Size                  2232688 bytes
Variable Size            1879051920 bytes
Database Buffers         2147483648 bytes
Redo Buffers               13332480 bytes
Database mounted.
Database opened.
SQL> shutdown immediate

其實關於ORA-01012的問題原因有很多,有的可能是Process不足,有的可能是有一些程式沒關掉。


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

相關文章