zoukankan      html  css  js  c++  java
  • adg 搭建备库,归档缺失(GAP)

    ---adg 搭建备库,归档缺失,主库归档有备份

    --主库RAC,备库单机

    ---adg 搭建备库,归档缺失

    alter system set log_archive_config='dg_config=(ssdb,ssadg,ssbak)';

    alter system set fal_server='ssadg,ssbak';

    alter system set LOG_ARCHIVE_DEST_10='service=ssbak db_unique_name=ssbak reopen=30 compression=enable valid_for=(all_logfiles, primary_role)';

    alter system set log_archive_dest_state_10=defer;

    ----搭建

    nuhup rman target sys/123456 auxiliary sys/123456@ssbak @qb_bak.rman &

    vi qb_bak.rman

    run{

    allocate channel ch01 type disk rate 10M;

    allocate channel ch02 type disk rate 10M;

    allocate channel ch03 type disk rate 10M;

    allocate channel ch04 type disk rate 10M;

    allocate auxiliary channel ch05 type disk;

    duplicate target database for standby from active database DORECOVER;

    release channel ch01;

    release channel ch02;

    release channel ch03;

    release channel ch04;

    release channel ch05;

    }

    --登陆数据库,杀掉通道进程

    Select s.sid, s.serial#,s.status, p.spid, s.client_info

      from v$process p, v$session s

    where p.addr = s.paddr

       and s.program like '%rman%'

    --批量杀死rman会话

    SELECT 'alter system kill session '''||SID||','||serial#||''' immediate;'

              FROM V$SESSION t 

             WHERE T.client_info like  'rman channel=%' and status='ACTIVE';    

    --操作系统批量kill rman进程         

    ps -ef|grep rman |grep -v grep|awk '{print $2}' |xargs kill -9 

    ---根据主库的备份归档文件,把归档传递过了;然后在北京进行恢复;

    ---缺少归档

    Tue Jun 11 17:12:14 2019

    FAL[client]: Failed to request gap sequence

     GAP - thread 2 sequence 25196-25206

     DBID 1476960055 branch 992196795

    --查询归档对应备份集

    list backup of archivelog from logseq 25196 until logseq 25206 thread 2;

    --从主库传递归档

    ---注册

    catalog start with '/archive/archive1/arch/';

    ---恢复

    restore archivelog from logseq 25196 thread 2;

    ---应用

    alter database recover managed standby database using current logfile disconnect;



  • 相关阅读:
    HANDLER进行堆叠注入
    CDUT第一届信安大挑战Re-wp
    Nu1LBook第一章wp
    Linux和VMWare
    [MRCTF]Xor
    IDA 调整栈帧 (411A04:positive sp value has been found)
    [BUU] 简单注册器
    2020年“安洵杯”四川省大学生信息安全技术大赛 部分WRITEUP
    关于我的pip不听话,总是说【Fatal error in launcher: Unable to create process using '"'】这件事
    C语言的PELode编写记录
  • 原文地址:https://www.cnblogs.com/ss-33/p/11010760.html
Copyright © 2011-2022 走看看