精华内容
下载资源
问答
  • oracledataguard
    2021-05-03 11:12:51

    配置 DG 详细步骤:

    –====Primary端:

    1、

    主库全备:

    rman > backup database format ‘/tmp/nsp_%U.full’;

    2、

    备份主库参数文件 nsp.init,编辑

    SQL> create pfile=’/tmp/nsp.init’ from spfile;

    3、

    创建备库控制文件

    SQL>alter database create standby controlfile as ‘/tmp/nsp_sty.ctl’;

    4、

    备库目录初始化:

    cd ORACLEBASEmkdir−padmin/‘ORACLEBASEmkdir−padmin/‘ORACLE_SID

    cd $ORACLE_BASE

    mkdir diag diag/rdbms diag/tnslsnr

    cd admin/$ORACLE_SID

    mkdir adump pfile bdump cdump udump

    5、主库配置TNS

    cat11g =(description =(address = (protocol = tcp)(host = 10.200.8.35)(port = 1528))(connect_data = (sid = cat11g)))

    nsp=(description =(address = (protocol = tcp)(host = 10.198.217.153)(port = 1528))(connect_data = (sid = nsp)))

    lnsp=(description =(address = (protocol = tcp)(host = 25.8.1.33)(port = 1528))(connect_data = (sid = nsp)))

    —-主库配置:

    alter system set log_archive_config = ‘DG_CONFIG=(nsp,lnsp)’ scope = both;

    配置log_archive_dest_n:

    alter system set log_archive_dest_2 = ‘SERVICE=lnsp lgwr async noaffirm reopen=60 valid_for=(online_logfiles,primary_role) db_unique_name=lnsp’ scope = both;

    配置fal:

    alter system set fal_server = lnsp scope = both;

    alter system set fal_client = nsp scope = both;

    修改standby_file_management = auto

    alter system set standby_file_management = auto scope = both;

    检查:

    select process,status,thread#,sequence#,block#,blocks from v$managed_standby where process!=’ARCH’;

    select name,SEQUENCE#,ARCHIVED,APPLIED,STATUS,to_char(COMPLETION_TIME,’yyyy-mm-dd hh24:mi:ss’) data from v$archived_log order by data;

    –====Standby端nomount:

    sqlplus ‘/as sysdba’

    SQL> startup nomount pfile=’$ORACLE_HOME/dbs/nsp.init’

    cp /tmp/nsp_sty.ctl /crbank/nsp/data/nsp/control01.ctl

    SQL> alter databae mount;

    2、备库增加standby redologfile:

    alter database add standby logfile group 9 ‘/crbank/nsp/data/nsp/redolog09.log’ size 1024m;

    alter database add standby logfile group 10 ‘/crbank/nsp/data/nsp/redolog10.log’ size 1024m;

    alter database add standby logfile group 11 ‘/crbank/nsp/data/nsp/redolog11.log’ size 1024m;

    alter database add standby logfile group 12 ‘/crbank/nsp/data/nsp/redolog12.log’ size 1024m;

    alter database add standby logfile group 13 ‘/crbank/nsp/data/nsp/redolog13.log’ size 1024m;

    alter database add standby logfile group 14 ‘/crbank/nsp/data/nsp/redolog14.log’ size 1024m;

    alter database add standby logfile group 15 ‘/crbank/nsp/data/nsp/redolog15.log’ size 1024m;

    alter database add standby logfile group 16 ‘/crbank/nsp/data/nsp/redolog16.log’ size 1024m;

    alter database add standby logfile group 17 ‘/crbank/nsp/data/nsp/redolog17.log’ size 1024m;

    alter database add standby logfile group 18 ‘/crbank/nsp/data/nsp/redolog18.log’ size 1024m;

    select group#,bytes/1024/1024 from v$standby_log;

    select ‘set newname for datafile ‘||file#||’ to ”’|| ‘/crbank/nsp/data/nsp/’||substr(name,instr(name,’/’,1,5)+1)||”” from v$datafile ;

    select ‘set newname for datafile ‘||file#||’ to ”’|| ‘/crbank/nsp/data/nsp/’||substr(name,5)+1)||”” from v$tempfile ;

    3、备库恢复:

    rman target /

    run{

    allocate channel c1 type disk;

    allocate channel c2 type disk;

    allocate channel c3 type disk;

    allocate channel c4 type disk;

    restore database;

    release channel c1;

    release channel c2;

    release channel c3;

    release channel c4;

    }

    4、备库配置监听:

    lnsp =

    (DESCRIPTION_LIST =

    (DESCRIPTION =

    (ADDRESS_LIST =

    (ADDRESS = (PROTOCOL = TCP)(HOST = 25.8.1.33)(PORT = 1528))

    )

    )

    )

    备库配置TNS:

    cat11g =(description =(address = (protocol = tcp)(host = 10.200.8.35)(port = 1528))(connect_data = (sid = cat11g)))

    nsp=(description =(address = (protocol = tcp)(host = 10.198.217.153)(port = 1528))(connect_data = (sid = nsp)))

    lnsp=(description =(address = (protocol = tcp)(host = 25.8.1.33)(port = 1528))(connect_data = (sid = nsp)))

    备库DG配置

    alter system set log_archive_dest_2 = ‘SERVICE=nsp lgwr async noaffirm reopen=60 valid_for=(online_logfiles,primary_role) db_unique_name=nsp’ scope = both;

    alter system set fal_server = nsp scope = both;

    alter system set fal_client = lnsp scope = both;

    alter system set log_archive_config = ‘DG_CONFIG=(nsp,lnsp)’ scope = both;

    alter system set db_unique_name=lnsp scope=both;

    alter system set service_names = nsp scope= spfile;

    alter system set standby_file_management = auto scope = both;

    alter system set db_recovery_file_dest_size = 32G scope=spfile;

    alter system set db_recovery_file_dest= ‘/crbank/nsp/fra’ scope=spfile;

    alter system set standby_archive_dest =” scope=spfile;

    alter system set log_archive_dest_1 = ” scope=spfile;

    alter system set open_links=0 scope=spfile;

    alter system set open_links_per_instance=0 scope=spfile;

    alter system set parallel_execution_message_size=32768 scope=spfile;

    alter system set disk_asynch_io=TRUE scope=spfile;

    alter system set db_writer_processes=4 scope=spfile;

    alter database recover managed standby database cancel;

    shutdown immediate;

    startup mount;

    alter database open;

    alter database recover managed standby database using current logfile disconnect;

    错误问题:

    1、

    alter database recover managed standby database using current logfile disconnect

    *

    ERROR at line 1:

    ORA-38500: USING CURRENT LOGFILE option not available without standby redo logs

    使用’using current logfile’ 需要创建stanby logfile

    解决:

    alter database add standby logfile group 10 ‘/crbank/nsp/data/nsp/redolog10.log’ size 1024m;

    3、备库在打开的时候alert.log出现了大量的错误,检测到控制文件记录的redolog文件不存在问题

    ORA-00313: open failed for members of log group 8 of thread 1

    ORA-00312: online log 8 thread 1: ‘/crbank/nsp/data/nsp/redo08.log’

    ORA-27037: unable to obtain file status

    Linux-x86_64 Error: 2: No such file or directory

    select l.group#,l.SEQUENCE#,lg.member,l.status,lg.type from v$logfile lg,v$log l where lg.group#=l.group#;

    alter database drop logfile group 2;

    alter database clear unarchived logfile ‘/crbank/nsp/data/nsp/redo02.log’;

    v$log有记录,但是物理文件不存在,删除或者清除都出问题。

    解决:设置logfile_name_convert参数,重新打开备库就可以自动创建。

    4、备库在打开的时候在告警日志报临时文件损坏,需要重新创建,但是创建失败

    ORA-01186: file 1025 failed verification tests

    ORA-01122: database file 1025 failed verification check

    ORA-01110: data file 1025: ‘/crbank/nsp/data/nsp/temp01.dbf’

    ORA-01205: not a data file - type number in header is 3

    解决:物理删除掉temp临时文件,数据库在打开的时候会自动创建。

    更多相关内容
  • OracleDataGuard以最低的成本实现
  • OracleDataGuard容灾方案.docx
  • OracleDataGuard容灾方案.doc
  • OracleDataGuard数据库容灾方案.pdf
  • Oracledataguard[参照].pdf

    2021-10-12 23:43:48
    Oracledataguard[参照].pdf
  • OracleDataGuard容灾解决方案.doc
  • OracleDataGuard容灾解决方案.pdf
  • OracleDataGuard数据库容灾方案参照.pdf
  • OracleDataguard方案建议PPT教案.pptx
  • ORACLEDataguard配置步骤[文].pdf
  • OracleDataGuard容灾方案[归纳].pdf
  • 教程名称:Oracle Data Guard管理维护资料合集课程目录:【】1_使用Oracle数据库11gR2实现最高可用性【】Data Guard and RAC Maximum Availability at Verizon Wireless【】dataguard日常维护(综合版)【】Oracle_11G...
  • OracleDataGuard容灾解决方案[参照].pdf
  • Oracle10gRAC下“军卫一号”数据库升级和OracleDataGuard部署.pdf
  • Oracle Data Guard 11gR2 Administration – FreePdfBook
  • Oracle_Data_Guard_快速启动故障切换指南
  • OracleDataGuard简单配置

    2019-04-28 16:24:26
    OracleDataGuard简单配置 主要转载 白昼ron:https://blog.csdn.net/xiezuoyong/article/details/83862885 1、配置 虚拟机设置ip段(仅主机模式) 192.168.6.0 主库: 系统:centos7 数据库:11.2.0.4 主机名:ora11...

    OracleDataGuard简单配置

    主要转载 白昼ron:https://blog.csdn.net/xiezuoyong/article/details/83862885

    1、配置

    虚拟机设置ip段(仅主机模式)
    192.168.6.0
    主库:
    系统:centos7
    数据库:11.2.0.4
    主机名:ora11gp
    ip:192.168.6.130
    ORACLE_BASE=/u01/app/oracle
    ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
    ORACLE_SID=orcl
    归档模式:是
    数据库安装:安装数据库软件、创建监听、并建库
    

    从库:

    系统:centos7
    数据库:11.2.0.4
    主机名:ora11gs
    ip:192.168.6.131
    ORACLE_BASE=/u01/app/oracle
    ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
    ORACLE_SID=orcl
    归档模式:否
    数据库安装:安装数据库软件、创建监听、但不建库
    

    2、主库先安装数据库软件,然后克隆虚拟机到备库。
    (1)修改主库主机名为ora11gp
    (2)在hosts文件中添加192.168.6.130 ora11gp
    (3)在hosts文件中添加192.168.6.131 ora11gs
    (4)使用root用户创建/u01目录并授权给oracle用户

    mkdir /u01
    chown oracle:oinstall /u01
    

    (5)上传oracle-rdbms-server-11gR2-preinstall-1.0-7.el6.x86_64.rpm到服务器执行

    rpm -ivh oracle-rdbms-server-11gR2-preinstall-1.0-7.el6.x86_64.rpm
    

    (6)以上命令执行会显示缺少的包

    	compat-libcap1 被 oracle-rdbms-server-11gR2-preinstall-1.0-7.el6.x86_64 需要
    	compat-libstdc++-33 被 oracle-rdbms-server-11gR2-preinstall-1.0-7.el6.x86_64 需要
    	gcc 被 oracle-rdbms-server-11gR2-preinstall-1.0-7.el6.x86_64 需要
    	gcc-c++ 被 oracle-rdbms-server-11gR2-preinstall-1.0-7.el6.x86_64 需要
    	glibc-devel 被 oracle-rdbms-server-11gR2-preinstall-1.0-7.el6.x86_64 需要
    	kernel-uek 被 oracle-rdbms-server-11gR2-preinstall-1.0-7.el6.x86_64 需要
    	ksh 被 oracle-rdbms-server-11gR2-preinstall-1.0-7.el6.x86_64 需要
    	libaio-devel 被 oracle-rdbms-server-11gR2-preinstall-1.0-7.el6.x86_64 需要
    	libstdc++-devel 被 oracle-rdbms-server-11gR2-preinstall-1.0-7.el6.x86_64 需要
    

    (7)使用yum命令安装上面的包
    (8)以下包会缺少

    compat-libstdc++-33
    kernel-uek
    

    (9)其中compat-libstdc+±33需要自己去oraclelinux的rpm库下载。kernel-uek暂时不管
    (10)上传安装包到服务器这个安装包是我下载1to7所有的zip解压后又压缩的合集包

    p13390677_112040_Linux-x86-64.zip
    

    (11)上传到/home/oracle目录解压

    unzip p13390677_112040_Linux-x86-64.zip -d install
    

    (12)删除原zip包节省空间

    rm -rf p13390677_112040_Linux-x86-64.zip
    

    (13)进入/home/oracle/install/database 目录

    cd /home/oracle/install/database
    

    (14)执行下面命令设置可运行权限

    chmod -R +x .  (后面有个点,表示当前目录)
    

    (15)执行下面命令查看本机物理机的ip或主机名

    who -m  (其实就是看你连接服务器的ip)
    

    (16)输入下面命令设置x11服务器(前提是安装xmanager,启动Xmanager - Passive;或者安装mobaxterm打开x11服务器)

    export DISPLAY=192.168.6.1:0.0   (oracle用户执行)
    

    (17)打开另一个shell界面,用root创建下面目录(oracle不这样做可能安装界面乱码,或者设置英文安装目录也可以)

    mkdir -p /usr/share/fonts/zh_CN/TrueType   (root用户执行,下面复制那个zysong.ttf文件也是root用户,
    目的是添加中文字体,要不然安装界面无法显示中文)
    

    (18)在window系统中打开字体设置,找到宋体字体文件或者网上下载SIMSUN.TTC。修改名称为zysong.ttf上传到/usr/share/fonts/zh_CN/TrueType目录
    (19)在刚才的oracle用户界面执行以下命令打开安装图形界面

    ./runInstaller
    

    (20)在几次弹出的窗口都点击“是”
    (21)安装基本选下一步。其中选择安装基目录时/u01/app/oracle 选择仅安装数据库软件

    (22)检测时显示缺少以下两个包

    elfutils-libelf-devel
    pdksh
    

    (23)使用以下命令安装

    yum install elfutils-libelf-devel
    

    (24)pdksh需要自己去oraclelinux5系统中下载,这个其实和ksh是一个东西并且ksh更新,只是因为oracle11g安装包中的检测程序没有更新。不影响使用,如果有强迫症可以自己下载rpm包使用命令

    
    rpm -ivh 包名.rpm --nodeps安装
    

    (25)在页面点击重新检测则全部通过
    (26)点击安装。
    (27)过一会出现ins_emagent.mk的错误
    (28)重新打开一个界面,用oracle用户登录执行下面命令

    vim /u01/app/oracle/product/11.2.0/dbhome_1/sysman/lib/ins_emagent.mk
    

    (29)将下面内容修改

    $(MK_EMAGENT_NMECTL)修改为下面的。记得之间有空格并且后面的11是数字1
    $(MK_EMAGENT_NMECTL) -lnnz11
    

    (30)在安装界面点击重试即可
    (31)过一会弹出执行root脚本。使用root用户登录执行即可

    /u01/app/oraInventory/orainstRoot.sh
    /u01/app/oracle/product/11.2.0/dbhome_1/root.sh
    

    (32)数据软件安装成功
    (33)设置以下环境变量到oracle用户

    vim ~/.bash_profile
    
    添加下面内容
    ################oracle##############
    export ORACLE_BASE=/u01/app/oracle
    export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
    export ORACLE_SID=orcl
    export PATH=$ORACLE_HOME/bin:$PATH
    export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
    ################oracle##############
    

    (34)关闭服务器(这是虚拟机我可以关闭准备直接克隆,如果是物理服务器最好自己安装)

    poweroff
    

    (35)克隆链接克隆为备机
    (36)启动备机系统
    (37)修改ip为192.168.6.131
    (38)修改主机名为ora11gs
    (39)启动主库服务器
    (40)登录主库oracle用户设置x11

    su - oracle
    export DISPLAY=192.168.6.1:0.0
    

    (41)使用下面目录建立监听

    netca
    

    后面直接选择建立监听全部下一步完成即可

    (42)输入命令dbca创建数据库,数据库名orcl其他全部下一步,最后点击完成

    dbca
    

    (43)等待创建完成
    (44)登录

    sqlplus / as sysdba
    

    (45)输入下面命令查看当前是什么模式

    SQL> archive log list;   (这个不是归档模式)
    Database log mode	       No Archive Mode
    Automatic archival	       Disabled
    Archive destination	       USE_DB_RECOVERY_FILE_DEST
    Oldest online log sequence     3
    Current log sequence	       5
    SQL> 
    

    (46)输入这个命令

    shutdown immediate;
    startup mount;
    

    (47)修改为归档模式

     alter database archivelog;
     打开数据库
    alter database open;
    查看是否开启归档
    archive log list;
    

    (48)这是已经开启

    SQL> archive log list;
    Database log mode	       Archive Mode
    Automatic archival	       Enabled
    Archive destination	       /u01/app/oracle/oradata/orcl/archivelog
    Oldest online log sequence     6
    Next log sequence to archive   8
    Current log sequence	       8
    SQL> 
    

    (49)以下内容基本来自(白昼ron:https://blog.csdn.net/xiezuoyong/article/details/83862885 我只是实践了一下)
    (50)强制日志模式

    alter database force logging;
    

    (51)查询如下

    SQL> select name,log_mode,force_logging from v$database;
    NAME	  LOG_MODE     FOR
    --------- ------------ ---
    ORCL	  ARCHIVELOG   YES
    SQL> 
    

    (52)创建standby redolog日志组
    (53)参考

    1:standby redo log的文件大小与primary 数据库online redo log 文件大小相同
    2:standby redo log日志文件组的个数依照下面的原则进行计算:
           Standby redo log组数公式>=(每个instance日志组个数+1)*instance个数
           假如只有一个节点,这个节点有三组redolog,
           所以Standby redo log组数>=(3+1)*1 == 4
        所以至少需要创建4组Standby redo log
    

    (54)查看当前线程与日志组的对应关系及日志组的大小

    SQL> select thread#,group#,bytes/1024/1024 from v$log;
    
       THREAD#     GROUP# BYTES/1024/1024
    ---------- ---------- ---------------
    	 1	    1		   50
    	 1	    2		   50
    	 1	    3		   50
    

    (55)如上,这里有三组redo log,所以至少需要创建4组Standby redo log,大小均为50M:

    alter database add standby logfile group 4('/u01/app/oracle/oradata/orcl/standbyredo01.log') size 50m;
    alter database add standby logfile group 5('/u01/app/oracle/oradata/orcl/standbyredo02.log') size 50m;
    alter database add standby logfile group 6('/u01/app/oracle/oradata/orcl/standbyredo03.log') size 50m;
    alter database add standby logfile group 7('/u01/app/oracle/oradata/orcl/standbyredo04.log') size 50m;
    

    (56)查看standby 日志组的信息

    SQL> select group#,sequence#,status, bytes/1024/1024 from v$standby_log;
    
        GROUP#  SEQUENCE# STATUS	 BYTES/1024/1024
    ---------- ---------- ---------- ---------------
    	 4	    0 UNASSIGNED	      50
    	 5	    0 UNASSIGNED	      50
    	 6	    0 UNASSIGNED	      50
    	 7	    0 UNASSIGNED	      50
    

    (57)创建主库密码文件

    
    [oracle@ora11gp ~]$ orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=oracle force=y
    [oracle@ora11gp ~]$ 
    

    (58)配置spfile文件
    (59)查看spfile的路径

    SQL> show parameter spfile;     
    
    NAME				     TYPE	 VALUE
    ------------------------------------ ----------- ------------------------------
    spfile				     string	 /u01/app/oracle/product/11.2.0
    						 /dbhome_1/dbs/spfileorcl.ora
    SQL> 
    

    (60)用spfile创建一个pfile,用于修改

    SQL> create pfile='/tmp/initorcl.ora' from spfile;
    
    File created.
    
    SQL> 
    

    (61)修改pfile文件

    vim /tmp/initorcl.ora
    
    ######原内容######
    orcl.__db_cache_size=637534208
    orcl.__java_pool_size=16777216
    orcl.__large_pool_size=33554432
    orcl.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
    orcl.__pga_aggregate_target=637534208
    orcl.__sga_target=956301312
    orcl.__shared_io_pool_size=0
    orcl.__shared_pool_size=234881024
    orcl.__streams_pool_size=16777216
    *.audit_file_dest='/u01/app/oracle/admin/orcl/adump'
    *.audit_trail='db'
    *.compatible='11.2.0.4.0'
    *.control_files='/u01/app/oracle/oradata/orcl/control01.ctl','/u01/app/oracle/fast_recovery_area/orcl/control02.ctl'
    *.db_block_size=8192
    *.db_domain=''
    *.db_name='orcl'
    *.db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'
    *.db_recovery_file_dest_size=4385144832
    *.diagnostic_dest='/u01/app/oracle'
    *.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'
    *.memory_target=1580204032
    *.nls_language='SIMPLIFIED CHINESE'
    *.nls_territory='CHINA'
    *.open_cursors=300
    *.processes=150
    *.remote_login_passwordfile='EXCLUSIVE'
    *.undo_tablespace='UNDOTBS1'
    
    ######原内容######
    
    
    ######修改后的内容##########
    orcl.__db_cache_size=637534208
    orcl.__java_pool_size=16777216
    orcl.__large_pool_size=33554432
    orcl.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
    orcl.__pga_aggregate_target=637534208
    orcl.__sga_target=956301312
    orcl.__shared_io_pool_size=0
    orcl.__shared_pool_size=234881024
    orcl.__streams_pool_size=16777216
    *.audit_file_dest='/u01/app/oracle/admin/orcl/adump'
    *.audit_trail='db'
    *.compatible='11.2.0.4.0'
    *.control_files='/u01/app/oracle/oradata/orcl/control01.ctl','/u01/app/oracle/fast_recovery_area/orcl/control02.ctl'
    *.db_block_size=8192
    *.db_domain=''
    *.db_name='orcl'
    *.db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'
    *.db_recovery_file_dest_size=4385144832
    *.diagnostic_dest='/u01/app/oracle'
    *.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'
    *.memory_target=1580204032
    *.nls_language='SIMPLIFIED CHINESE'
    *.nls_territory='CHINA'
    *.open_cursors=300
    *.processes=150
    *.remote_login_passwordfile='EXCLUSIVE'
    *.undo_tablespace='UNDOTBS1'
    *.db_unique_name='orclpr'
    *.fal_client='orclpr'
    *.fal_server='orcldg'
    *.standby_file_management='AUTO'
    *.log_archive_config='DG_CONFIG=(orclpr,orcldg)'
    *.log_archive_dest_1='location=/u01/app/oracle/oradata/orcl/archivelog'
    *.log_archive_dest_2='SERVICE=orcldg LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=orcldg'
    *.log_archive_dest_state_1='ENABLE'
    *.log_archive_dest_state_2='ENABLE'
    ######修改后的内容##########
    

    (62)复制pfile文件到spfile

    SQL> shutdown immediate;
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> create spfile from pfile='/tmp/initorcl.ora';
    
    File created.
    
    SQL> startup;
    ORACLE instance started.
    
    Total System Global Area 1586708480 bytes
    Fixed Size		    2253624 bytes
    Variable Size		  973081800 bytes
    Database Buffers	  603979776 bytes
    Redo Buffers		    7393280 bytes
    Database mounted.
    Database opened.
    SQL> 
    

    (63)修改监听文件,添加静态监听

    # listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
    # Generated by Oracle configuration tools.
    
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = ora11gp)(PORT = 1521))
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
        )
      )
    
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (GLOBAL_DBNAME = orcl)
          (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
          (SID_NAME = orcl)
        )
      )
    
    
    ADR_BASE_LISTENER = /u01/app/oracle
    SAVE_CONFIG_ON_STOP_LISTENER = ON
    
    

    (64)重启监听服务

    lsnrctl stop
    lsnrctl start
    

    (65)编辑网络服务名配置文件tnsnames.ora

    vi $ORACLE_HOME/network/admin/tnsnames.ora
    
    # tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
    # Generated by Oracle configuration tools.
    
    orcldg =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = ora11gs)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = orcl)
        )
      )
    
    
    orclpr =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = ora11gp)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = orcl)
        )
      )
    
    

    (66)在备库使用netca命令配置监听
    (67)tnsping测试

    [oracle@ora11gp orcl]$ tnsping orcldg
    TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 28-APR-2019 15:59:28
    Copyright (c) 1997, 2013, Oracle.  All rights reserved.
    Used parameter files:
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ora11gs)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))
    OK (0 msec)
    [oracle@ora11gp orcl]$ 
    

    (68)备库配置
    (69)将主库中的密码文件、pfile文件、监听文件复制到备库

    [oracle@ora11gp ~]$ cd /u01/app/oracle/product/11.2.0/dbhome_1/dbs
    [oracle@ora11gp dbs]$ scp orapworcl 192.168.6.131:/u01/app/oracle/product/11.2.0/dbhome_1/dbs/
    oracle@192.168.6.131's password: 
    orapworcl                                                                             100% 1536   488.5KB/s   00:00    
    [oracle@ora11gp dbs]$ scp /tmp/initorcl.ora 192.168.6.131:/tmp/
    oracle@192.168.6.131's password: 
    initorcl.ora                                                                          100% 1380   621.9KB/s   00:00    
    [oracle@ora11gp dbs]$ cd /u01/app/oracle/product/11.2.0/dbhome_1/network/admin
    [oracle@ora11gp admin]$ scp listener.ora 192.168.6.131:/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/
    oracle@192.168.6.131's password: 
    listener.ora                                                                          100%  582   619.3KB/s   00:00    
    [oracle@ora11gp admin]$ scp tnsnames.ora 192.168.6.131:/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/
    oracle@192.168.6.131's password: 
    tnsnames.ora                                                                          100%  504   503.2KB/s   00:00    
    [oracle@ora11gp admin]$ 
    

    (70)配置spfile文件(备机操作)
    (71)修改pfile文件

    vim /tmp/initorcl.ora
    orcl.__db_cache_size=637534208
    orcl.__java_pool_size=16777216
    orcl.__large_pool_size=33554432
    orcl.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
    orcl.__pga_aggregate_target=637534208
    orcl.__sga_target=956301312
    orcl.__shared_io_pool_size=0
    orcl.__shared_pool_size=234881024
    orcl.__streams_pool_size=16777216
    *.audit_file_dest='/u01/app/oracle/admin/orcl/adump'
    *.audit_trail='db'
    *.compatible='11.2.0.4.0'
    *.control_files='/u01/app/oracle/oradata/orcl/control01.ctl','/u01/app/oracle/fast_recovery_area/orcl/control02.ctl'
    *.db_block_size=8192
    *.db_domain=''
    *.db_name='orcl'
    *.db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'
    *.db_recovery_file_dest_size=4385144832
    *.diagnostic_dest='/u01/app/oracle'
    *.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'
    *.memory_target=1580204032
    *.nls_language='SIMPLIFIED CHINESE'
    *.nls_territory='CHINA'
    *.open_cursors=300
    *.processes=150
    *.remote_login_passwordfile='EXCLUSIVE'
    *.undo_tablespace='UNDOTBS1'
    *.db_unique_name='orcldg'
    *.fal_client='orcldg'
    *.fal_server='orclpr'
    *.standby_file_management='AUTO'
    *.log_archive_config='DG_CONFIG=(orclpr,orcldg)'
    *.log_archive_dest_1='location=/u01/app/oracle/oradata/orcl/archivelog'
    *.log_archive_dest_2='SERVICE=orclpr LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=orclpr'
    *.log_archive_dest_state_1='ENABLE'
    *.log_archive_dest_state_2='ENABLE'
    

    (72)复制pfile文件到spfile

    create spfile from pfile='/tmp/initorcl.ora';  (如果是dataguard被破坏后进行恢复dataguard记得执行shutdown immediate;后再执行此命令)
    shutdown immediate;(报错不要紧)
    startup nomount;
    

    (73)修改监听文件

    vim /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (GLOBAL_DBNAME = orcl)
          (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
          (SID_NAME = orcl)
        )
      )
    
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = ora11gs)(PORT = 1521))
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
        )
      )
    
    
    ADR_BASE_LISTENER = /u01/app/oracle
    

    (74)重启监听服务

    lsnrctl stop
    lsnrctl start
    

    (75)tnsping测试

    [oracle@ora11gs orcl]$ tnsping orclpr
    TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 28-APR-2019 16:00:34
    Copyright (c) 1997, 2013, Oracle.  All rights reserved.
    Used parameter files:
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ora11gp)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))
    OK (0 msec)
    [oracle@ora11gs orcl]$ 
    

    (76)手工创建所需的目录

    su - oracle
    mkdir -p /u01/app/oracle/admin/orcl/adump
    mkdir -p /u01/app/oracle/admin/orcl/dbdump
    mkdir -p /u01/app/oracle/admin/orcl/pfile
    mkdir -p /u01/app/oracle/oradata/orcl
    mkdir -p /u01/app/oracle/fast_recovery_area/orcl
    mkdir -p /u01/app/oracle/oradata/orcl/archivelog
    

    (77)启动备库到nomount

    shutdown immediate;(报错不要紧)
    startup nomount;
    

    (78)利用RMAN在备库上恢复主库

    rman target sys/oracle@orclpr auxiliary sys/oracle@orcldg
    
    其中oracle是上面创建主库密码文件中的密码
    

    执行以下命令恢复

    RMAN> duplicate target database for standby from active database nofilenamecheck;
    出现这个恢复完成
    Finished Duplicate Db at 28-APR-19
    RMAN> 
    

    (79)过程中若报错如下(我没有遇到)
    (80)说明使用了catalog,但是在连接的时候没有指定catalog,需要用下面的连接方式

    
    DBGSQL:     TARGET> begin :fhdbi := dbms_rcvcat.getDbid; end;
    DBGSQL:        sqlcode = 6550
    DBGSQL:         B :fhdbi = 32767
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 11/08/2018 15:22:28
    RMAN-05501: aborting duplication of target database
    RMAN-03015: error occurred in stored script Memory Script
    ORA-06550: line 1, column 17:
    PLS-00201: identifier 'DBMS_RCVCAT.GETDBID' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    
    rman target sys/oracle@orclpr auxiliary sys/oracle@orcldg nocatalog
    

    (81)登陆备库并查看数据库当前状态

    [oracle@ora11gs ~]$ sqlplus / as sysdba
    SQL*Plus: Release 11.2.0.4.0 Production on Sun Apr 28 01:01:30 2019
    Copyright (c) 1982, 2013, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> select status from v$instance;
    STATUS
    ------------
    MOUNTED
    SQL> 
    

    (82)RMAN恢复完直接就是mount状态。
    (83)设置最高模式

    alter database set standby database to maximize protection;
    

    (84)设置参数

    alter system set standby_file_management=auto;
    

    主库设置参数

    alter system set log_archive_dest_2='service=orcldg lgwr sync affirm valid_for=(online_logfile,primary_role) db_unique_name=orcldg';
    

    备库设置参数

    alter system set log_archive_dest_2='service=orclpr lgwr sync affirm valid_for=(online_logfile,primary_role) db_unique_name=orclpr';
    

    查看设置的参数

    show parameter log_archive_dest_2;
    

    设置备库为read only

    alter database open read only;
    

    (85)备库启动日志应用

    SQL>alter database recover managed standby database cancel; (可能会报错)
    SQL> alter database recover managed standby database using current logfile disconnect from session;
    
    Database altered.
    
    SQL> set pagesize 100;
    SQL> select sequence#,applied from v$archived_log order by 1;
    
     SEQUENCE# APPLIED
    ---------- ---------
    	 7 YES
    	 8 YES
    	 9 YES
    
    SQL> 
    

    (86)分别查看主库和备库的归档序列号是否一致
    (87)先在主库手动切换一下日志再查看

    SQL> alter system switch logfile;
    
    System altered.
    
    SQL>  archive log list;
    Database log mode	       Archive Mode
    Automatic archival	       Enabled
    Archive destination	       /u01/app/oracle/oradata/orcl/archivelog
    Oldest online log sequence     9
    Next log sequence to archive   11
    Current log sequence	       11
    

    (88)再在备库上查看

    SQL> archive log list;
    Database log mode	       Archive Mode
    Automatic archival	       Enabled
    Archive destination	       /u01/app/oracle/oradata/orcl/archivelog
    Oldest online log sequence     9
    Next log sequence to archive   0
    Current log sequence	       11
    SQL> 
    

    (89)查看备库中各文件如下

    [oracle@ora11gs orcl]$ ll
    总用量 1407312
    drwxr-xr-x. 2 oracle oinstall       111 4月  28 01:04 archivelog
    -rw-r-----. 1 oracle oinstall   9748480 4月  28 01:06 control01.ctl
    -rw-r-----. 1 oracle oinstall 555753472 4月  28 01:04 sysaux01.dbf
    -rw-r-----. 1 oracle oinstall 775954432 4月  28 01:04 system01.dbf
    -rw-r-----. 1 oracle oinstall  94380032 4月  28 01:04 undotbs01.dbf
    -rw-r-----. 1 oracle oinstall   5251072 4月  28 01:04 users01.dbf
    [oracle@ora11gs orcl]$ 
    [oracle@ora11gs orcl]$ cd archivelog/
    [oracle@ora11gs archivelog]$ ll
    总用量 12084
    -rw-r-----. 1 oracle oinstall  249344 4月  28 01:04 1_10_1006732228.dbf
    -rw-r-----. 1 oracle oinstall 6653952 4月  28 01:00 1_7_1006732228.dbf
    -rw-r-----. 1 oracle oinstall   44544 4月  28 01:00 1_8_1006732228.dbf
    -rw-r-----. 1 oracle oinstall 5420544 4月  28 01:00 1_9_1006732228.dbf
    [oracle@ora11gs archivelog]$ 
    

    (90)在主备库查看当前模式

    select database_role,protection_mode,protection_level from v$database;
    

    (91)在/u01目录下创建两个脚本
    (92)/u01/clearlog.sh 后面的减几就是清理几天前的归档日志

    vim /u01/clearlog.sh   内容如下(这其实不是一个sh)
    DELETE ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE-1';
    

    (93)/u01/rman.sh chmod +x rman.sh设置可执行权限,内容如下

    #!/bin/sh
    rman target/ cmdfile '/u01/clearlog.sh'
    

    (94)将rman.sh脚本设置到cron中定时每天执行
    (95)完成
    (96)正确打开主库,按照下面顺序

    SQL> STARTUP MOUNT;
    SQL> ALTER DATABASE OPEN; 
    

    (97)正确打开备库

    SQL> STARTUP MOUNT;
    SQL>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION; 
    

    (98)正确关闭备库

    SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
    SQL>SHUTDOWN IMMEDIATE; 
    

    (99)正确关闭主库

    SQL>SHUTDOWN IMMEDIATE; 
    

    3、正常主备切换
    (1)查询主库状态

    SQL> select switchover_status from v$database;
    SWITCHOVER_STATUS
    --------------------
    SESSIONS ACTIVE
    SQL> 
    

    (2)查看备库状态

    SQL> select switchover_status from v$database;
    SWITCHOVER_STATUS
    --------------------
    NOT ALLOWED
    SQL> 
    

    (3)主库切换到standby模式

    SQL> alter database commit to switchover to physical standby with session shutdown;
    Database altered.
    SQL> startup mount
    ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
    ORACLE instance started.
    Total System Global Area 1586708480 bytes
    Fixed Size		    2253624 bytes
    Variable Size		  973081800 bytes
    Database Buffers	  603979776 bytes
    Redo Buffers		    7393280 bytes
    Database mounted.
    SQL> select switchover_status from v$database;
    SWITCHOVER_STATUS
    --------------------
    RECOVERY NEEDED
    SQL> alter database recover managed standby database using current logfile disconnect from session;
    Database altered.
    SQL> select open_mode,database_role from v$database;
    OPEN_MODE	     DATABASE_ROLE
    -------------------- ----------------
    MOUNTED 	     PHYSICAL STANDBY
    SQL> 
    
    

    (4)切换备库

    SQL> select switchover_status from v$database;
    SWITCHOVER_STATUS
    --------------------
    SESSIONS ACTIVE
    SQL> alter database commit to switchover to primary with session shutdown;
    Database altered.
    SQL> shutdown immediate
    ORA-01109: database not open
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup
    ORACLE instance started.
    Total System Global Area 1586708480 bytes
    Fixed Size		    2253624 bytes
    Variable Size		  973081800 bytes
    Database Buffers	  603979776 bytes
    Redo Buffers		    7393280 bytes
    Database mounted.
    Database opened.
    SQL> select switchover_status from v$database;
    SWITCHOVER_STATUS
    --------------------
    SESSIONS ACTIVE
    SQL> 
    

    (5)切换完成
    4、应急切换
    (1)主库崩溃,将备库切换为主库

    SQL> alter database recover managed standby database finish; 停止应用恢复模式
    Database altered.
    SQL> alter database commit to switchover to primary; 转换为主库
    Database altered.
    SQL> shutdown immediate
    ORA-01109: database not open
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup
    ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
    ORACLE instance started.
    Total System Global Area 1586708480 bytes
    Fixed Size		    2253624 bytes
    Variable Size		  973081800 bytes
    Database Buffers	  603979776 bytes
    Redo Buffers		    7393280 bytes
    Database mounted.
    Database opened.
    SQL> select open_mode,database_role from v$database;
    OPEN_MODE	     DATABASE_ROLE
    -------------------- ----------------
    READ WRITE	     PRIMARY
    

    (2)应急切换后dataguard将被破坏
    (3)应急切换后如果原主库正常了。需要将原主库做为备库重新建立dataguard

    展开全文
  • OracleDataguard数据同步复制的容灾技术方案.doc
  • OracleDataGuard以最低的成本实现最高的数据保护
  • Oracle Data Guard培训容灾培训1、课程介绍:本课程中,学员将学习如何使用Oracle Data Guard 以保护Oracle 数据库避免宕机。课程将包括 Oracle Data Guard 的体系结构,以及备份数据库的物理结构和逻辑结构的建立,...

    Oracle Data Guard培训容灾培训

    1、课程介绍:

    本课程中,学员将学习如何使用Oracle Data Guard 以保护Oracle 数据库避免宕机。课程将包括 Oracle Data Guard 的体系结构,以及备份数据库的物理结构和逻辑结构的建立,此外,课程包括使用 Data Guard 对性能的考虑,并且提供诊断错误的技巧。

    2、课程对象:

    3、课程长度:3天

    4、课程大纲:

    第*章. Oracle Data Guard概述

    第二章.了解Oracle Data Guard的体系结构

    第三章.使用Oracle Data Guard Broker和企业管理器

    第四章.使用Enterprise Manager创建一个配置和物理备用数据库

    第五章.使用SQL创建物理备用数据库

    第六章.配置数据保护模式和日志传输服务

    第七章.使用Enterprise Manager创建逻辑备用数据库

    第八章.使用SQL创建逻辑备用数据库

    第九章.执行转换和故障切换

    第十章.启用快速启动故障切换

    第十一章.在一个真正的应用集群配置中使用的数据卫士

    第十二章. Oracle Data Guard的其他注意事项

    459184bb445e6d119be58fd69b3d5905.png

    展开全文
  • 启动时应用重做日志,关闭时取消重做日志: 8.1Starting Up and Shutting Down a Physical Standby Database This section descr启动时应用重做日志,关闭时取消重做日志:Starting Up and Shutting Down a Physical...

    启动时应用重做日志,关闭时取消重做日志: 8.1Starting Up and Shutting Down a Physical Standby Database This section descr

    启动时应用重做日志,关闭时取消重做日志:

    Starting Up and Shutting Down a Physical Standby Database

    This section describes the SQL*Plus statements used to start up and shut down a physical standby database.

    Starting Up a Physical Standby Database

    8.1.1 启动物理备库

    To start a physical standby database, use SQL*Plus to connect to the database with administrator privileges, and then use either the SQL*PlusSTARTUPorSTARTUPMOUNTstatement. When used on a physical standby database:

    TheSTARTUPstatement starts the database, mounts the database as a physical standby database, and opens the database for read-only access.

    TheSTARTUP MOUNTstatement starts and mounts the database as a physical standby database, but does not open the database.

    Once mounted, the database can receive archived redo data from the primary database. You then have the option of either starting Redo Apply or real-time apply, or opening the database for read-only access.

    一旦数据库装载后,数据库就能从主库接收归档重做日志。然后,你可以选择启用应用重做或者实时应用,再或者以只读方式打开数据库来访问。

    For example:

    Start and mount the physical standby database:

    SQL> STARTUP MOUNT;

    Start Redo Apply or real-time apply:

    To start Redo Apply, issue the following statement:

    SQL>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE

    2>DISCONNECT FROM SESSION;

    #########################################################################

    Sat Mar 29 11:48:57 2014

    ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION

    Sat Mar 29 11:48:57 2014

    Attempt to start background Managed Standby Recovery process (PRODSTD)

    MRP0 started with pid=54, OS id=3158

    Sat Mar 29 11:48:57 2014

    MRP0: Background Managed Standby Recovery process started (PRODSTD)

    Managed Standby Recovery not using Real Time Apply

    Media Recovery Waiting for thread 1 sequence 29

    Sat Mar 29 11:49:03 2014

    Completed: ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION

    ############################################################################

    To start real-time apply, issue the following statement:

    SQL>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE

    2>USING CURRENT LOGFILE;

    On the primary database, query theRECOVERY_MODEcolumn in theV$ARCHIVE_DEST_STATUSview, which displays the standby database's operation asMANAGED_RECOVERYfor Redo Apply andMANAGED REAL TIME APPLYfor real-time apply.

    在主库上,你可以查询V$ARCHIVE_DEST_STATUS的RECOVERY_MODE列,可以显示出备库的操作是MANAGED_RECOVERY 重做应用还是MANAGED REAL TIME APPLY实时应用。

    Seefor information about Redo Apply,for information about real-time apply, andfor information about opening a physical standby database for read-only or read/write access.

    Note:

    When you first start Redo Apply on a newly created physical standby database that has not yet received any redo data from the primary database, anORA-01112message may be returned. This indicates that Redo Apply is unable to determine the starting sequence number for media recovery. If this occurs, you must either manually retrieve and register an archived redo log file on the standby database, or wait for the automatic archiving to occur before restarting Redo Apply.

    当你在一个新创建的物理备库上第一次应用重做时,主库并没有归档日志传输到备库来,于是报错ORA-01112.这意味着重做应用无法为介质恢复提供一个日志序号。如果这个情况发生,你必须手动在备库上生成一个归档日志,,或者在重做应用之前自动归档。

    8.1.2Shutting Down a Physical Standby Database

    Toshut down a physical standby database and stop Redo Apply, use the SQL*PlusSHUTDOWNstatement. Control is not returned to the session that initiates a database shutdown until shutdown is complete.

    关闭物理备库以及关闭重做应用,使用SHUTDOWN语句。

    If the primary database is up and running, defer the destination on the primary database and perform a log switch before shutting down the standby database.

    To stop Redo Apply before shutting down the database, use the following steps:

    在关闭数据库之前要先停止重做应用,使用一下步骤:

    Issue the following query to find out if the standby database is performing Redo Apply or real-time apply. If the MRP0 or MRP process exists, then the standby database is applying redo.

    1.通过如下查询找出备库是在重做应用还是实时应用,如果MRP0或者MRP进程存在,那么备库正在应用重做。

    SQL> SELECT PROCESS, STATUS FROM V$MANAGED_STANDBY;

    ###############################################################################

    PROCESS STATUS

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

    ARCH CONNECTED

    ARCH CONNECTED

    MRP0 WAIT_FOR_LOG

    RFS IDLE

    RFS IDLE

    ###############################################################################

    If Redo Apply is running, cancel it as shown in the following example:

    2.如果重做应用正在运行,用如下例子来取消它。

    SQL>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

    ###############################################################################

    Sat Mar 29 11:49:40 2014

    ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL

    Sat Mar 29 11:49:42 2014

    MRP0: Background Media Recovery cancelled with status 16037

    Sat Mar 29 11:49:42 2014

    Errors in file /u01/app/Oracle/admin/PRODSTD/bdump/prodstd_mrp0_3158.trc:

    ORA-16037: user requested cancel of managed recovery operation

    Recovery interrupted!

    Sat Mar 29 11:49:43 2014

    Waiting for MRP0 pid 3158 to terminate

    Waiting for MRP0 pid 3158 to terminate

    Waiting for MRP0 pid 3158 to terminate

    Sat Mar 29 11:49:45 2014

    Errors in file /u01/app/oracle/admin/PRODSTD/bdump/prodstd_mrp0_3158.trc:

    ORA-16037: user requested cancel of managed recovery operation

    Sat Mar 29 11:49:45 2014

    MRP0: Background Media Recovery process shutdown (PRODSTD)

    Sat Mar 29 11:49:46 2014

    Managed Standby Recovery Canceled (PRODSTD)

    Completed: ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL

    取消日志应用之后,即没有MRP0的进程了。

    ###############################################################################

    Shut down the standby database.

    3.关闭备库。

    SQL> SHUTDOWN IMMEDIATE;

    推荐阅读:

    RMAN 配置归档日志删除策略

    Oracle基础教程之通过RMAN复制数据库

    RMAN备份策略制定参考内容

    RMAN备份学习笔记

    Oracle数据库备份加密 RMAN加密

    logo.gif 本条技术文章来源于互联网,如果无意侵犯您的权益请点击此处反馈版权投诉 本文系统来源:php中文网

    展开全文
  • OracleDataGuard理论知识

    千次阅读 2019-03-03 16:56:13
    原 Oracle Data Guard 理论知识https://blog.csdn.net/tianlesoftware/article/details/5514082版权声明: https://blog.csdn.net/tianlesoftware/article/details/5514082 RAC, Data Gurad, Stream 是Oracle 高...
  • Oracle Data Guard_ 主库添加数据文件或创建表空间8.3Managing Primary Database Events That Affect the Standby Database8.3 管理主库能影响备库的事件To prevent possible problems, you must be aware of events...
  • Data Guard 备库归档文件删除策略,此次备库的归档删除策略是在单机版的基础上进行升级,增加了日志功能,支持对2个节点RAC主库的1、Data Guard 主库归档文件删除策略:当我们设置:RMAN>configure archivelog ...

空空如也

空空如也

1 2 3 4 5 ... 8
收藏数 153
精华内容 61
热门标签
关键字:

oracledataguard