Oracle 11g兩個節點RAC搭建單一實例DG過程問題以及解決方案

來源:互聯網
上載者:User

Oracle 11g兩個節點RAC搭建單一實例DG過程問題以及解決方案

以前搭建過單一實例資料庫的DG,感覺挺簡單的,後來來到公司第一個項目是給RAC搭建DG,信心滿滿的自己,真的是費盡心思啊,各種請教,各種百度,終於艱難的完成了任務,下面細說在下遇見的問題。

一:首先,第一個問題就是,CRT遠端連線伺服器,串連不上,因為我要給異地的rac搭建DG,處在區域網路覆蓋之外,問老大才知道需要藉助VPN,建立Virtual Private Cloud隧道,使用者不再需要處於企業區域網路絡平台覆蓋範圍之內,通過區域網路接入方式來訪問商業網路應用服務。具體VPN使用方法,不做介紹。

二:安裝資料庫軟體的時候,在CRT中運行./runinstall  沒報錯,就是不顯示映像化安裝介面,問領導才知道原來是要藉助一個工具VNC,安裝好VNC 然後選擇VNC view 輸入:192.168.15.9:1,冒號後的1沒有什麼意義,但是首先你要在CRT先輸入命令列輸入:vncserver 如下:
[root@java3 ~]# vncserver 
New 'java3:6 (root)' desktop is java3:1

Starting applications specified in /root/.vnc/xstartup

Log file is /root/.vnc/java3:6.log

然後再進入vnc view 輸入要已連線的服務器IP:1,輸入vnc密碼,在這裡執行./runinstall ,我靠終於有了,感覺好神奇的樣子 ,哈哈

三:首先我對照自己以前給單一實例的資料庫搭建DG的筆記,給主庫修改參數檔案,要把spfile 建立成pfile,想當然直接 create  pfile from  spfile ;

現在才意識這樣做的危害,原因是這樣的,在RAC環境,SPFILE預設情況下會存放在共用儲存上(裸裝置或ASM磁碟組上),RAC的每個節點都是使用PFILE指向SPFILE的方法來完成SPFILE的定位的。即pfile檔案中存放的是spfile的路徑。
 如:[Oracle@rac1]#cat /oracle/app/oracle/product/10.2.0/db_1/dbs/nitracdb1.ora

spfile=+DATA/racdb/spfileracdb.ora

 一旦使用“create pfile from spfile;”命令建立PFILE後,新產生的PFILE將覆蓋原有dbs目錄下的PFILE,此時PFILE檔案中存放的是具體的參數,而不是spfile的路徑了,此後資料庫執行個體啟動時讀取的將不再是共用儲存上的SPFILE,轉而讀取本地的PFILE檔案的內容,當時沒什麼問題,但是當資料庫重啟之後,會給DBA的管理帶來麻煩。
四:由於是直接將rac的參數檔案檔案傳給standby資料庫的,該修改的地方也修改完畢,可是啟動執行個體的時候報錯,

SQL> startup    nomount
ORA-00439: feature not enabled: Real Application Clusters 

試圖通過查看錯誤資訊,來解決,沒有成功

[oracle@java3 ~]$ oerr ora 00439           
 00439, 00000, "feature not enabled: %s"
 // *Cause:  The specified feature is not enabled.
 // *Action: Do not attempt to use this feature.

原來是 備庫參數檔案裡的  參數cluster_database =true  要修改成false, 這個cluster_database 是用來確定資料庫是否在rac環境的叢集中的,等於true的時候,執行個體啟動的時候,會把資料庫當成是叢集,故報錯。

五:根據參數檔案  *.audit_file_dest='/oracle/admin/JLPROJCT/adump'      #審計檔案的位置,

在備庫建立相應目錄(如果不存在的話),這個目錄必須要屬於oracle:oinstall 。否則也會報錯,具體錯誤忘記錄了。

六:SQL> startup nomount;                   
ORA-48141: error creating directory during ADR initialization [/oracle/diag]          #提示不能建立目錄

ORA-48189: OS command to create directory failed

Linux-x86_64 Error: 13: Permission denied                          #許可權問題,用root建立目錄,然後改屬組。

Additional information: 2

[root@java3 ~]# mkdir -p /oracle/diag
 [root@java3 ~]# chown -R oracle:oinstall  /oracle/diag
 
七:SQL> startup nomount   
ORA-00119: invalid specification for system parameter REMOTE_LISTENER

ORA-00132: syntax error or unresolved network name 'rac-scan:1521'
 
刪掉 參數檔案裡的 REMOTE_LISTENER這行  他是關於rac的 
 

八:[oracle@rac1 ~]$ rman target sys/manager1209@db26 auxiliary sys/manager1209@JLPROJCT3;
Recovery Manager: Release 11.2.0.3.0 - Production on Sat Feb 28 17:44:04 2015

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: JLPROJCT (DBID=2115662724)

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-12514: TNS:listener does not currently know of service requested in connect descriptor
 
這個報錯來自於備庫,備庫監聽沒有監聽到串連串,定位到主庫tnsname.ora或者是備庫的listener.ora  有錯。 好好檢查

九:報錯 說 控制檔案 不能建立  你應該看看  參數檔案裡面制定的控制檔案的位置  是不是存在  或者oracle使用者是不是有許可權。 

RMAN> duplicate target database for standby from active database  nofilenamecheck;

 Starting Duplicate Db at 28-FEB-15
 using target database control file instead of recovery catalog
 allocated channel: ORA_AUX_DISK_1
 channel ORA_AUX_DISK_1: SID=2273 device type=DISK

 contents of Memory Script:
 {
    backup as copy reuse
    targetfile  '/oracle/product/11.2.3/dbs/orapwJLPROJCT1' auxiliary format
  '/opt/oracle/product/11.2.0/dbhome_1/dbs/orapwJLPROJCT3'  ;
 }
 executing Memory Script

 Starting backup at 28-FEB-15
 allocated channel: ORA_DISK_1
 channel ORA_DISK_1: SID=657 instance=JLPROJCT1 device type=DISK
 Finished backup at 28-FEB-15
 RMAN-00571: ===========================================================
 RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
 RMAN-00571: ===========================================================
 RMAN-03002: failure of Duplicate Db command at 02/28/2015 18:13:27
 RMAN-05501: aborting duplication of target database
 RMAN-06136: ORACLE error from auxiliary database: ORA-00200: control file could not be created
 ORA-00202: control file: '+data'
 ORA-17502: ksfdcre:4 Failed to create file +data
 ORA-15001: diskgroup "DATA" does not exist or is not mounted
 ORA-15077: could not locate ASM instance serving a required diskgroup
 ORA-29701: unable to connect to Cluster Synchronization Service

十:結合警示日誌分析,以下報錯 一般都是路徑的問題  db_file_name_convert、log_file_name_convert  一定要寫對,並且保證備庫的路徑那有足夠的空間,

RMAN> duplicate target database for standby from active database  nofilenamecheck;

Starting Duplicate Db at 28-FEB-15
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=2273 device type=DISK

contents of Memory Script:
{
  backup as copy reuse
  targetfile  '/oracle/product/11.2.3/dbs/orapwJLPROJCT1' auxiliary format
 '/opt/oracle/product/11.2.0/dbhome_1/dbs/orapwJLPROJCT3'  ;
}
executing Memory Script

Starting backup at 28-FEB-15
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=657 instance=JLPROJCT1 device type=DISK
Finished backup at 28-FEB-15

RMAN-00571: ===========================================================


RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of Duplicate Db command at 02/28/2015 18:42:35

RMAN-05501: aborting duplication of target database

RMAN-03015: error occurred in stored script Memory Script

RMAN-03009: failure of backup command on ORA_DISK_1 channel at 02/28/2015 18:42:34

ORA-17628: Oracle error 19505 returned by remote Oracle server
十一:主庫tnsname.ora  裡面添加備庫資訊的連接字串(就是開頭的名字)必須和主庫參數LOG_ARCHIVE_DEST_2='SERVICE=這裡的名字。
否則duplicate  報錯,Error is 12154  關於tns 的報錯。

十二:磁碟空間不足  導致報錯    解決 換路徑    db_file_name_cencort 後面關於備庫的路徑換個空間大的。
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/02/2015 15:00:14
 ORA-17627: ORA-12577: Message 12577 not found;  product=RDBMS; facility=ORA
 RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/02/2015 15:01:09
 ORA-17627: ORA-12577: Message 12577 not found;  product=RDBMS; facility=ORA
 RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/02/2015 15:00:54
 ORA-17627: ORA-12577: Message 12577 not found;  product=RDBMS; facility=ORA
 RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/02/2015 14:52:57
 ORA-17627: ORA-12577: Message 12577 not found;  product=RDBMS; facility=ORA
 RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/02/2015 15:00:39
 ORA-17627: ORA-12577: Message 12577 not found;  product=RDBMS; facility=ORA
 RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/02/2015 15:01:24
 ORA-17627: ORA-12577: Message 12577 not found; 

十三:由於 參數檔案裡面的log_name_convert  指定的路徑 空間不足  導致    解決同上。
ORACLE error from auxiliary database: ORA-19502: write error on file "/opt/oraclegroup_4.264.865954331", block number 2529281 (block size=512)

ORA-27072: File I/O error

Additional information: 4

Additional information: 2529281

Additional information: 400896

RMAN-05535: WARNING: All redo log files were not defined properly.
 
十四���先把備庫open,然後開啟MRP進程,這時候備庫的狀態變成了open read only  ,但是  還是不能同步。一定注意順序,在開啟MRP之前要先把資料庫read only 的方式開啟。  mount 狀態也可以,開啟MRP來應用日誌,重演變化。

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.