本帖最后由 zhenjiang412518 于 2014-12-23 22:57:15 编辑

解决方案 »

  1.   

    于是我通过将主库的备份文件sftp到第二台备服务器上进行rman恢复,主库日志能传输到备库并且实时应用,但是备库上查询视图v$dataguard_status总显示下面信息:
    MESSAGE 
     -------------------------------------------------------------------------------- 
     Primary database is in MAXIMUM PERFORMANCE mode 
     ARC0: Beginning to archive thread 1 sequence 9679 (3454929957-3454931470) 
     ARC0: Completed archiving thread 1 sequence 9679 (0-0) 
     Media Recovery Log /opt/oracle/archivelog/1_9679_840379839.dbf 
     Media Recovery Waiting for thread 1 sequence 9680 (in transit) 
    RFS[53]: Possible network disconnect with primary database 
     RFS[52]: Possible network disconnect with primary database 
     RFS[92]: Assigned to RFS process 19290 
     RFS[92]: Identified database type as 'physical standby': Client is ARCH pid 1762 
     krsv_proc_kill: Killing 12884901889 processes (idle RFS by thread/sequence) 
     RFS[93]: Assigned to RFS process 19292  MESSAGE 
     -------------------------------------------------------------------------------- 
     RFS[93]: Identified database type as 'physical standby': Client is ARCH pid 4036 
     ARC2: Beginning to archive thread 1 sequence 9680 (3454931470-3454931890) 
     ARC2: Completed archiving thread 1 sequence 9680 (0-0) 
     Media Recovery Waiting for thread 1 sequence 9681 
     RFS[94]: Assigned to RFS process 19300 
     RFS[94]: Identified database type as 'physical standby': Client is LGWR SYNC pid 
     9027  Primary database is in MAXIMUM PERFORMANCE mode 
     ARC0: Beginning to archive thread 1 sequence 9681 (3454931890-3454932672) 
     ARC0: Completed archiving thread 1 sequence 9681 (0-0)  MESSAGE 
     -------------------------------------------------------------------------------- 
     Media Recovery Log /opt/oracle/archivelog/1_9681_840379839.dbf 
     Media Recovery Waiting for thread 1 sequence 9682 (in transit) 
     RFS[56]: Possible network disconnect with primary database 
     RFS[55]: Possible network disconnect with primary database在主库上查询视图v$dataguard_status总显示下面信息:MESSAGE--------------------------------------------------------------------------------LGWR: Attempting destination LOG_ARCHIVE_DEST_3 network reconnect (3135)LGWR: Destination LOG_ARCHIVE_DEST_3 network reconnect abandonedError 3135 for archive log file 1 to 'DB3'LGWR: Error 1041 disconnecting from destination LOG_ARCHIVE_DEST_3 standby host'DB3'LGWR: Failed to archive log 1 thread 1 sequence 11056 (3135)LGWR: Standby redo logfile selected for thread 1 sequence 11057 for destinationLOG_ARCHIVE_DEST_2LGWR: Beginning to archive log 2 thread 1 sequence 11057MESSAGE--------------------------------------------------------------------------------ARC0: Beginning to archive thread 1 sequence 11056 (3518988802-3518997595)ARC0: Completed archiving thread 1 sequence 11056 (3518988802-3518997595)ARC1: Standby redo logfile selected for thread 1 sequence 11056 for destinationLOG_ARCHIVE_DEST_3LGWR: Completed archiving log 2 thread 1 sequence 11057LGWR: Standby redo logfile selected for thread 1 sequence 11058 for destinationLOG_ARCHIVE_DEST_3LGWR: Standby redo logfile selected for thread 1 sequence 11058 for destinationLOG_ARCHIVE_DEST_2MESSAGE--------------------------------------------------------------------------------LGWR: Beginning to archive log 3 thread 1 sequence 11058ARC0: Beginning to archive thread 1 sequence 11057 (3518997595-3519008882)ARC0: Completed archiving thread 1 sequence 11057 (3518997595-3519008882)ARC1: Standby redo logfile selected for thread 1 sequence 11057 for destinationLOG_ARCHIVE_DEST_3256 rows selected.SQL> ho oerr ora 104101041, 00000, "internal error. hostdef extension doesn't exist"// *Cause: Pointer to hstdef extension in hstdef is null.// *Action: Report as a bugSQL> ho oerr ora 313503135, 00000, "connection lost contact"// *Cause:  1) Server unexpectedly terminated or was forced to terminate.//          2) Server timed out the connection.// *Action: 1) Check if the server session was terminated.//          2) Check if the timeout parameters are set properly in sqlnet.ora.本地主备库之间是没有问题的,本地主库与异地备库之间会出现规律性disconnect,但是主库提交的数据还是能传到异地备库,不知道是否跟数据库网络配置或者硬件防火墙有关。
      

  2.   

    主库DG参数:
    *.db_name='orcl' 
     *.db_recovery_file_dest='/dbdat/orclprd/flash_recovery_area' 
     *.db_recovery_file_dest_size=21474836480 
     *.db_unique_name='DB1' 
     *.diagnostic_dest='/opt/oracle' 
     *.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)' 
     *.fal_client='DB1' 
     *.fal_server='DB2' 
     *.fal_server='DB3' 
     *.log_archive_config='DG_CONFIG=(DB1,DB2,DB3)' 
     *.log_archive_dest_1='LOCATION=/dbdat/orclprd/oracle/archivelog valid_for=(all_logfiles,all_roles) db_unique_name=DB1' 
     *.log_archive_dest_2='SERVICE=DB2 lgwr sync valid_for=(online_logfile,primary_role) db_unique_name=DB2' 
     *.log_archive_dest_3='SERVICE=DB3 lgwr sync valid_for=(online_logfile,primary_role) db_unique_name=DB3' 
     log_archive_dest_state_1=enable 
     log_archive_dest_state_2=enable 
     log_archive_dest_state_3=enable备库1 DG参数:
    *.db_name='orcl' 
     *.db_recovery_file_dest='/dbdat/orclprd/flash_recovery_area' 
     *.db_recovery_file_dest_size=21474836480 
     *.db_unique_name='DB2' 
     *.diagnostic_dest='/opt/oracle' 
     *.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)' 
     *.fal_client='DB2' 
     *.fal_server='DB1' 
     *.fal_server='DB3' 
     *.log_archive_config='DG_CONFIG=(DB1,DB2,DB3)' 
     *.log_archive_dest_1='LOCATION=/dbdat/orclprd/oracle/archivelog valid_for=(all_logfiles,all_roles) db_unique_name=DB2' 
     *.log_archive_dest_2='SERVICE=DB1 lgwr sync valid_for=(online_logfile,primary_role) db_unique_name=DB1' 
     *.log_archive_dest_3='SERVICE=DB3 lgwr sync valid_for=(online_logfile,primary_role) db_unique_name=DB3' 
     log_archive_dest_state_1=enable 
     log_archive_dest_state_2=enable 
     log_archive_dest_state_3=enable备库2 DG参数
    *.db_name='orcl' 
     *.db_recovery_file_dest='/dbdat/orclprd/flash_recovery_area' 
     *.db_recovery_file_dest_size=21474836480 
     *.db_unique_name='DB3' 
     *.diagnostic_dest='/opt/oracle' 
     *.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)' 
     *.fal_client='DB3' 
     *.fal_server='DB1' 
     *.fal_server='DB2' 
     *.log_archive_config='DG_CONFIG=(DB1,DB2,DB3)' 
     *.log_archive_dest_1='LOCATION=/dbdat/orclprd/oracle/archivelog valid_for=(all_logfiles,all_roles) db_unique_name=DB3' 
     *.log_archive_dest_2='SERVICE=DB1 lgwr sync valid_for=(online_logfile,primary_role) db_unique_name=DB1' 
     *.log_archive_dest_3='SERVICE=DB2 lgwr sync valid_for=(online_logfile,primary_role) db_unique_name=DB2' 
     log_archive_dest_state_1=enable 
     log_archive_dest_state_2=enable 
     log_archive_dest_state_3=enable