日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

配置DATAGUARD 时关于 LOG_FILE_NAME_CONVERT配置错误的解决

發布時間:2024/4/15 40 豆豆
生活随笔 收集整理的這篇文章主要介紹了 配置DATAGUARD 时关于 LOG_FILE_NAME_CONVERT配置错误的解决 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

RAC: 雙節點,存儲使用ASM.

DATAGUARD : 單實例,使用本地目錄文件。

構建RAC-單實例 的DATAGUARD時,遇到以下問題:

在使用RMAN 復制文件到 STANDBY 庫時,出錯,
STANDBY 無法MOUNT.

以下是RMAN 及STANDBY 端的ALERT.LOG.


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

[oracle@ract1 dbs]$ rman target sys/sa@tdb auxiliary sys/sa@tdg nocatalog

Recovery Manager: Release 11.2.0.1.0 - Production on Wed Aug 14 15:29:38 2013

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

connected to target database: TDB (DBID=2450705824)
using target database control file instead of recovery catalog
connected to auxiliary database: TDB (not mounted)

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

Starting Duplicate Db at 2013-08-14 15:31:46
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=10 device type=DISK

contents of Memory Script:
{
?? backup as copy reuse
?? targetfile? '/opt/app/oracle/product/11.2.0/dbs/orapwtdb1' auxiliary format
'/opt/app/oracle/product/11.2.0/dbs/orapwtdg'?? ;
}
executing Memory Script

Starting backup at 2013-08-14 15:31:58
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=46 instance=tdb1 device type=DISK
Finished backup at 2013-08-14 15:32:24

contents of Memory Script:
{
?? backup as copy current controlfile for standby auxiliary format? '/opt/app/oracle/oradata/tdg/control01.ctl';
?? restore clone controlfile to? '/opt/app/oracle/flash_recovery_area/tdg/control02.ctl' from
'/opt/app/oracle/oradata/tdg/control01.ctl';
}
executing Memory Script

Starting backup at 2013-08-14 15:32:24
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
copying standby control file
output file name=/opt/app/oracle/product/11.2.0/dbs/snapcf_tdb1.f tag=TAG20130814T153224 RECID=6 STAMP=823447956
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:25
Finished backup at 2013-08-14 15:32:50

Starting restore at 2013-08-14 15:32:50
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: copied control file copy
Finished restore at 2013-08-14 15:32:53

contents of Memory Script:
{
?? sql clone 'alter database mount standby database';
}
executing Memory Script
.......
"/opt/app/oracle/oradata/tdg/system.259.823282257"?? datafile
2 auxiliary format
"/opt/app/oracle/oradata/tdg/sysaux.260.823282317"?? datafile
3 auxiliary format
"/opt/app/oracle/oradata/tdg/undotbs1.261.823282361"?? datafile
4 auxiliary format
"/opt/app/oracle/oradata/tdg/undotbs2.263.823282545"?? datafile
5 auxiliary format
"/opt/app/oracle/oradata/tdg/users.264.823282567"?? ;
?? sql 'alter system archive log current';
}
executing Memory Script

executing command: SET NEWNAME

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00601: fatal error in recovery manager
RMAN-03004: fatal error during execution of command
RMAN-04006: error from auxiliary database: ORA-12537: TNS:connection closed
RMAN-03002: failure of Duplicate Db command at 08/14/2013 15:33:04
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of switch command on clone_default channel at 08/14/2013 15:33:04
ORA-03113: end-of-file on communication channel
[oracle@ract1 dbs]$



---------------------------------------STANDBY ALERT.LOG----------------------------------------------------------------

Physical Standby Database mounted.
Lost write protection disabled
Wed Aug 14 15:32:59 2013
ARC1 started with pid=24, OS id=13762
Completed: alter database mount standby database
Wed Aug 14 15:32:59 2013
.......
ERROR: slave communication error with ASM; terminating process 13510
Errors in file /opt/app/oracle/diag/rdbms/tdg/tdg/trace/tdg_lgwr_13510.trc:
ORA-00312: online log 5 thread 1: '/opt/app/oracle/flash_recovery_area/tdg/onlinelog/group_5.268.823442397'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Wed Aug 14 15:33:00 2013
ARC4 started with pid=28, OS id=13770
Wed Aug 14 15:33:01 2013
.......
PMON (ospid: 13488): terminating the instance due to error 470
Instance terminated by PMON, pid = 13488

---------------------primary pfile ---------------------
*.db_file_name_convert='/opt/app/oracle/oradata/tdg','+DATA/tdb/datafile','/opt/app/oracle/oradata/tdg/tempfile','+DATA/tdb/tempfile'
*.LOG_FILE_NAME_CONVERT='/opt/app/oracle/flash_recovery_area/tdg/onlinelog','+DATA/tdb/onlinelog','/opt/app/oracle/flash_recovery_area/tdg/onlinelog' ,'+RECOVERY/tdb/archivelog'
*.log_archive_config='DG_CONFIG=(tdg,tdb)'
*.log_archive_dest_2='SERVICE=tdg LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=tdg'

*.log_archive_dest_state_2='ENABLE'

---------------------standby pfile ---------------------
*.db_file_name_convert='+DATA/tdb/datafile','/opt/app/oracle/oradata/tdg','+DATA/tdb/tempfile','/opt/app/oracle/oradata/tdg/tempfile'
*.log_file_name_convert='+DATA/tdb/onlinelog','/opt/app/oracle/flash_recovery_area/tdg/onlinelog','+RECOVERY/tdb/archivelog','/opt/app/oracle/flash_recovery_area/tdg/onlinelog'
*.log_archive_config='DG_CONFIG=(tdb,tdg)'
*.log_archive_dest_1='LOCATION=/opt/app/oracle/flash_recovery_area/tdg/onlinelog'
*.log_archive_dest_2='SERVICE=tdb LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=tdb'
*.log_archive_dest_state_2='ENABLE'

-------------------------------------------
經和朋友分析后,發現問題出在 log_file_name_convert 參數中的: '+RECOVERY/tdb/archivelog'


在修改參數時,確實沒有理解這里同步的是在線重做日志REDO文件。把一個目錄修改成了歸檔日志目錄: archivelog了。

在RAC 開啟了使用了RECOVERY后,需要把兩個地方的REDO都指定同步的目錄,比如這里的:

+DATA/tdb/onlinelog

+RECOVERY/tdb/onlinelog

其實這是一對。




這個是PRIMARY 端 RAC1 的參數:

*.LOG_FILE_NAME_CONVERT='/opt/app/oracle/flash_recovery_area/tdg/onlinelog','+DATA/tdb/onlinelog','/opt/app/oracle/flash_recovery_area/tdg/onlinelog' ,'+RECOVERY/tdb/archivelog'

修改后:
*.log_file_name_convert='/opt/app/oracle/flash_recovery_area/tdg/onlinelog','+DATA/tdb/onlinelog','/opt/app/oracle/flash_recovery_area/tdg/onlinelog' ,'+RECOVERY/tdb/onlinelog'


同時也修改了STANDBY端的參數(在RMAN 復制時起作用的還是STANDBY端的參數設置):
*.log_file_name_convert='+DATA/tdb/onlinelog','/opt/app/oracle/flash_recovery_area/tdg/onlinelog' ,'+RECOVERY/tdb/archivelog','/opt/app/oracle/flash_recovery_area/tdg/onlinelog'
修改后的:

*.log_file_name_convert='+DATA/tdb/onlinelog','/opt/app/oracle/flash_recovery_area/tdg/onlinelog', '+RECOVERY/tdb/onlinelog','/opt/app/oracle/flash_recovery_area/tdg/onlinelog' 與50位技術專家面對面20年技術見證,附贈技術全景圖

總結

以上是生活随笔為你收集整理的配置DATAGUARD 时关于 LOG_FILE_NAME_CONVERT配置错误的解决的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。