zoukankan      html  css  js  c++  java
  • 11.2.0.1单实例DGduplicate过程

    记录一次duplicate完整过程
    1)环境说明
    数据库版本oracle11.2.0.1,os linux 6.6
    备库应用的归档,最近一次是三个月前,由于DG环境以前是好的,因此直接迁移数据即可。
    本次使用duplicate远程拷贝方式(使用备份本地空间不足无法操作)
    2)本次重建DG完整过程如下:
    ORCL 主
    ORCLDG 备

    2.1 配置备库静态监听
    --静态监听listener.ora
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = single)(PORT = 1521))
    )
    )
    ADR_BASE_LISTENER = /picclife/app/oracle
    SID_LIST_LISTENER=
    (SID_LIST =
    (SID_DESC =
    (SID_NAME=single)
    (ORACLE_HOME=/picclife/app/oracle/product/11.2.0/dbhome_1)

    (GLOBAL_DBNAME=single)))
    lsnrctl stop
    lsnrctl start

    2.2主库修改sys密码
    SQL>alter user sys identified by oracle;
    将主库操作系统口令文件,拷贝至备库环境且名称orapwsid
    --测试远程连接
    $sqlplus sys/oracle@ORCLDG as sysdba --备
    $sqlplus sys/oracle@ORCL as sysdba --主

    2.3 duplicate
    $vi duplicate.sh
    rman target sys/oracle@ORCL auxiliary sys/oracle@ORCLDG log=/tmp/dup.log <<EOF
    run {
    allocate channel p1 type disk;
    allocate channel p2 type disk;
    allocate channel p3 type disk;
    allocate channel p4 type disk;
    allocate auxiliary channel s1 type disk;
    allocate auxiliary channel s2 type disk;
    allocate auxiliary channel s3 type disk;
    allocate auxiliary channel s4 type disk;
    duplicate target database for standby from active database;
    }
    exit;
    EOF
    date>>/tmp/dump.log

    $nohup sh duplicate.sh &

    2.3对DG环境开启同步
    --可用查询MRP进程是否启用
    SQL>alter system set fal_client=ORCLDG;
    SQL>alter system set fal_server=ORCL;
    SQL>select PROCESS,PID,STATUS from v$managed_standby;
    SYS>recover managed standby database disconnect from session;
    SQL> select thread#,sequence#,status from v$log;
    SQL>select thread#,sequence#,name,applied,completion_time from v$archived_log where completion_time >sysdate-1;
    SYS>alter database recover managed standby database cancel;
    SYS>recover managed standby database using current logfile disconnect;
    --备库查询验证:
    SYS>select dest_name,status,recovery_mode from v$archive_dest_status where dest_name in('LOG_ARCHIVE_DEST_1','LOG_ARCHIVE_DEST_2');
    DEST_NAME STATUS RECOVERY_MODE
    -------------------- --------- -----------------------
    LOG_ARCHIVE_DEST_1 VALID MANAGED REAL TIME APPLY
    LOG_ARCHIVE_DEST_2 VALID IDLE

  • 相关阅读:
    java语法基础(总结)
    ZookeeperclientAPI之创建会话(六)
    对A轮的追逐变得越加狂热,当前距离互联网泡沫到底有多近?
    Java集合(一):Java集合概述
    深入了解Cookie(1)------selenium2进行Cookie操作的前奏
    Cocos2d-X开发中国象棋《九》走棋规则
    java中request,application,session三个域及参数简单示例
    在多浏览器使用JS复制内容到剪切板,无需插件
    初学structs2,结果类型简单示例
    使用servletAPI三种方式简单示例
  • 原文地址:https://www.cnblogs.com/lvcha001/p/10653363.html
Copyright © 2011-2022 走看看