【轉帖】rman連線AUXILIARY報錯ORA-12528

panpong發表於2011-11-24

http://yangtingkun.itpub.net/post/468/426266

yangtingkun 發表於:2007.12.05 22:03

在使用RMAN建立STANDBY資料庫的過程中,連線AUXILIARY的時候報錯。

詳細錯誤資訊如下:

[oracle@yangtk ~]$ rman target / auxiliary sys/test@172.25.4.70/ora11g

Recovery Manager: Release 11.1.0.6.0 - Production on Wed Nov 7 01:45:35 2007

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

connected to target database: ORA11G (DBID=4026820313)
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04006: error from auxiliary database: ORA-12528: TNS:listener: all appropriate instances are blocking new connections

查詢了一下METALINK,發現這個問題從9i到11g,任何一個版本都可能會出現。造成這個問題的原因是,例項雖然啟動,但是沒有註冊到監聽。例項是透過PMON程式註冊到監聽上的,而PMON程式需要在MOUNT狀態下才會啟動。因此造成了上面的錯誤。

Oracle給出了兩種解決方案,一種方法是對AUXILIARY資料庫直接使用/,對TARGET資料庫透過網路訪問。

[oracle@yangtk2 ~]$ rman target sys/test@172.25.4.127/ORA11G_P.ytk-thinkpad auxiliary /

Recovery Manager: Release 11.1.0.6.0 - Production on Thu Nov 29 13:58:38 2007

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

connected to target database: ORA11G (DBID=4026820313)
connected to auxiliary database: ORA11G (not mounted)

RMAN>

第二種方法為AUXILIARY資料庫設定靜態監聽,在$ORACLE_HOME/network/admin目錄下的listener.ora中新增下面的內容:

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = ora11g)
(ORACLE_HOME = /data/oracle/product/11.1)
)
)

重啟監聽:

[oracle@yangtk2 admin]$ lsnrctl stop

LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 29-NOV-2007 14:01:55

Copyright (c) 1991, 2007, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.25.4.70)(PORT=1521)))
The command completed successfully
[oracle@yangtk2 admin]$ lsnrctl start

LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 29-NOV-2007 14:01:59

Copyright (c) 1991, 2007, Oracle. All rights reserved.

Starting /data/oracle/product/11.1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.1.0.6.0 - Production
System parameter file is /data/oracle/product/11.1/network/admin/listener.ora
Log messages written to /data/oracle/diag/tnslsnr/yangtk2/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.25.4.70)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.25.4.70)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.1.0.6.0 - Production
Start Date 29-NOV-2007 14:01:59
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /data/oracle/product/11.1/network/admin/listener.ora
Listener Log File /data/oracle/diag/tnslsnr/yangtk2/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.25.4.70)(PORT=1521)))
Services Summary...
Service "ora11g" has 1 instance(s).
Instance "ora11g", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

TARGET伺服器上再次嘗試登陸:

[oracle@yangtk ~]$ rman target / auxiliary sys/test@172.25.4.70/ora11g

Recovery Manager: Release 11.1.0.6.0 - Production on Wed Nov 7 02:21:55 2007

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

connected to target database: ORA11G (DBID=4026820313)
connected to auxiliary database: ORA11G (not mounted)

關於這個問題的詳細描述,可以參考metalink文件:Note:419440.1

 

Ora-12514 主動載入listener與被動載入listener

轉摘 dxjun (2008-03-11 16:30:21)
先啟動監聽,後啟動資料庫,透過客戶端連線正常。
先啟動資料庫,後啟動監聽,透過客戶端連線出現錯誤Ora-12514
 
主動跟被動的關係
1.是讓listener主動載入服務
原因是 新增
(SID_DESC =
(SID_NAME = orcl)
(ORACLE_HOME = /data/cache1/oracleDB/oracle/product/10.2.0/db_2)
)
後,在使用lsnrctl start監聽程式時會將listener的服務註冊到程式監視器(pmon)中
2.listener被動載入服務
如果沒有該內容,那麼由例項的pmon程式在listener中註冊服務,對listener來講,就是被動了。
這也就是為什麼先啟動監聽後啟動資料庫能夠正常連線的,反之不行的原因了。

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

相關文章