接着step1我用Rman duplicate测试下.

1,2两步请参考step1中的1,2

3.startup nomount (standby),一定要是nomount.

4.rman duplicate(primary)

[oracle@dg1 admin]$ rman target /

Recovery Manager: Release 11.2.0.2.0 – Production on Tue Jul 30 01:16:45 2013

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

connected to target database: DG (DBID=1735397445)

RMAN> connect auxiliary sys/oracle@dg2;

connected to auxiliary database: DG (not mounted)

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

Starting Duplicate Db at 30-JUL-13
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=18 device type=DISK

contents of Memory Script:
{
   backup as copy reuse
   targetfile  ‘/u01/app/oracle/11.2.0/dbs/orapwprimary’ auxiliary format
 ’/u01/app/oracle/11.2.0/dbs/orapwstandby’   ;
}
executing Memory Script

Starting backup at 30-JUL-13
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=74 device type=DISK
Finished backup at 30-JUL-13

contents of Memory Script:
{
   backup as copy current controlfile for standby auxiliary format  ‘/u01/app/oradata/con.ctl’;
}
executing Memory Script

Starting backup at 30-JUL-13
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
copying standby control file
output file name=/u01/app/oracle/11.2.0/dbs/snapcf_primary.f tag=TAG20130730T011802 RECID=14 STAMP=822100683
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:04
Finished backup at 30-JUL-13

contents of Memory Script:
{
   sql clone ‘alter database mount standby database’;
}
executing Memory Script

sql statement: alter database mount standby database

contents of Memory Script:
{
   set newname for tempfile  1 to
 ”/u01/app/oradata/temp01.dbf”;
   switch clone tempfile all;
   set newname for datafile  1 to
 ”/u01/app/oradata/system.dbf”;
   set newname for datafile  2 to
 ”/u01/app/oradata/sysaux.dbf”;
   set newname for datafile  3 to
 ”/u01/app/oradata/undotbs1.dbf”;
   backup as copy reuse
   datafile  1 auxiliary format
 ”/u01/app/oradata/system.dbf”   datafile
 2 auxiliary format
 ”/u01/app/oradata/sysaux.dbf”   datafile
 3 auxiliary format
 ”/u01/app/oradata/undotbs1.dbf”   ;
   sql ‘alter system archive log current’;
}
executing Memory Script

executing command: SET NEWNAME

renamed tempfile 1 to /u01/app/oradata/temp01.dbf in control file

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting backup at 30-JUL-13
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=/u01/app/oradata/system.dbf
output file name=/u01/app/oradata/system.dbf tag=TAG20130730T011813
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:56
channel ORA_DISK_1: starting datafile copy
input datafile file number=00003 name=/u01/app/oradata/undotbs1.dbf
output file name=/u01/app/oradata/undotbs1.dbf tag=TAG20130730T011813
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting datafile copy
input datafile file number=00002 name=/u01/app/oradata/sysaux.dbf
output file name=/u01/app/oradata/sysaux.dbf tag=TAG20130730T011813
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
Finished backup at 30-JUL-13

sql statement: alter system archive log current

contents of Memory Script:
{
   switch clone datafile all;
}
executing Memory Script

datafile 1 switched to datafile copy
input datafile copy RECID=14 STAMP=822100753 file name=/u01/app/oradata/system.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=15 STAMP=822100753 file name=/u01/app/oradata/sysaux.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=16 STAMP=822100753 file name=/u01/app/oradata/undotbs1.dbf
ORACLE error from auxiliary database: ORA-19527: physical standby redo log must be renamed
ORA-00312: online log 1 thread 1: ‘/u01/app/oradata/redo1.log’

RMAN-05535: WARNING: All redo log files were not defined properly.
ORACLE error from auxiliary database: ORA-19527: physical standby redo log must be renamed
ORA-00312: online log 2 thread 1: ‘/u01/app/oradata/redo2.log’

RMAN-05535: WARNING: All redo log files were not defined properly.
ORACLE error from auxiliary database: ORA-19527: physical standby redo log must be renamed
ORA-00312: online log 3 thread 1: ‘/u01/app/oradata/redo3.log’

RMAN-05535: WARNING: All redo log files were not defined properly.
Finished Duplicate Db at 30-JUL-13

4.restart standby database.

5.check dg ok

6.但是发现duplicate 有报错信息,这个是因为备库没有配置log_file_name_convert的原因,同样redolog也没有生成.

7.下面我配置一下这个参数

[oracle@dg1 admin]$ rman target /

Recovery Manager: Release 11.2.0.2.0 – Production on Tue Jul 30 01:34:22 2013

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

connected to target database: DG (DBID=1735397445)

RMAN> connect auxiliary sys/oracle@dg2;

connected to auxiliary database: DG (not mounted)

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

Starting Duplicate Db at 30-JUL-13
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=18 device type=DISK

contents of Memory Script:
{
   backup as copy reuse
   targetfile  ‘/u01/app/oracle/11.2.0/dbs/orapwprimary’ auxiliary format
 ’/u01/app/oracle/11.2.0/dbs/orapwstandby’   ;
}
executing Memory Script

Starting backup at 30-JUL-13
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=64 device type=DISK
Finished backup at 30-JUL-13

contents of Memory Script:
{
   backup as copy current controlfile for standby auxiliary format  ‘/u01/app/oradata/con.ctl’;
}
executing Memory Script

Starting backup at 30-JUL-13
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
copying standby control file
output file name=/u01/app/oracle/11.2.0/dbs/snapcf_primary.f tag=TAG20130730T013453 RECID=15 STAMP=822101695
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
Finished backup at 30-JUL-13

contents of Memory Script:
{
   sql clone ‘alter database mount standby database’;
}
executing Memory Script

sql statement: alter database mount standby database

contents of Memory Script:
{
   set newname for tempfile  1 to
 ”/u01/app/oradata/temp01.dbf”;
   switch clone tempfile all;
   set newname for datafile  1 to
 ”/u01/app/oradata/system.dbf”;
   set newname for datafile  2 to
 ”/u01/app/oradata/sysaux.dbf”;
   set newname for datafile  3 to
 ”/u01/app/oradata/undotbs1.dbf”;
   backup as copy reuse
   datafile  1 auxiliary format
 ”/u01/app/oradata/system.dbf”   datafile
 2 auxiliary format
 ”/u01/app/oradata/sysaux.dbf”   datafile
 3 auxiliary format
 ”/u01/app/oradata/undotbs1.dbf”   ;
   sql ‘alter system archive log current’;
}
executing Memory Script

executing command: SET NEWNAME

renamed tempfile 1 to /u01/app/oradata/temp01.dbf in control file

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting backup at 30-JUL-13
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=/u01/app/oradata/system.dbf
output file name=/u01/app/oradata/system.dbf tag=TAG20130730T013503
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:56
channel ORA_DISK_1: starting datafile copy
input datafile file number=00003 name=/u01/app/oradata/undotbs1.dbf
output file name=/u01/app/oradata/undotbs1.dbf tag=TAG20130730T013503
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting datafile copy
input datafile file number=00002 name=/u01/app/oradata/sysaux.dbf
output file name=/u01/app/oradata/sysaux.dbf tag=TAG20130730T013503
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:16
Finished backup at 30-JUL-13

sql statement: alter system archive log current

contents of Memory Script:
{
   switch clone datafile all;
}
executing Memory Script

datafile 1 switched to datafile copy
input datafile copy RECID=15 STAMP=822101762 file name=/u01/app/oradata/system.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=16 STAMP=822101762 file name=/u01/app/oradata/sysaux.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=17 STAMP=822101762 file name=/u01/app/oradata/undotbs1.dbf
Finished Duplicate Db at 30-JUL-13

RMAN>

可以看到上面没有报错,而且redolog也产生啦

[root@dg2 oradata]# ls
con.ctl  sysaux.dbf  system.dbf  undotbs1.dbf
[root@dg2 oradata]# ls
con.ctl  sysaux.dbf  system.dbf  undotbs1.dbf
[root@dg2 oradata]# ls
con.ctl  redo1.log  redo2.log  redo3.log  sysaux.dbf  system.dbf  undotbs1.dbf
[root@dg2 oradata]# ls
con.ctl  redo1.log  redo2.log  redo3.log  sysaux.dbf  system.dbf  undotbs1.dbf

8.看来还是duplicate简单的很多.接下来我会继续测试先做rman备份然后在去配置init parameter

Step2:配置Oracle Dataguard的更多相关文章

  1. Oracle Dataguard之物理standby的基本配置

    尽管网上有很多Oracle Dataguard的配置教程,但不难发现,很多采用的是rman duplicate这种方法,尽管此种方法较为简便.但在某种程度上,却也误导了初学者,虽说也能配置成功,但只知 ...

  2. Oracle Dataguard之failover

    Oracle Dataguard中,角色转换包含两类:Switchover和Failover.上文<Oracle Dataguard之switchover>中,我们已经谈过了switcho ...

  3. Oracle Dataguard之switchover

    Oracle Dataguard的角色转换包含两类:Switchover和Failover.Switchover指主备之间角色转换,主库降为备库,备库升级为主库.而failover则是指主库出现问题时 ...

  4. Oracle Dataguard之Real-Time Apply

    Oracle Dataguard一共支持三种模式:最大可用模式(Maximum Availability),最大性能模式(Maximum Performance),最大保护模式(Maximum Pro ...

  5. Oracle Dataguard Standby Redo Log的两个实验

    在Data Guard环境中,Standby Redo Log是一个比较特殊的日志类型.从最新的DG安装指导中,都推荐在Primary和Standby端,都配置Standby Redo Log. 简单 ...

  6. Oracle DataGuard 物理Standby 搭建(上)

    物理standby database 环境搭建 Arch asysnc Oracle Dataguard host IP Oracle_sid DB_unique_name FAL_server FA ...

  7. Oracle DataGuard搭建(一)

    第一次搭建oracle dataguard.学oracle很长时间,却没有完整的搭过dg,说起来让人笑.总得有第一次,而且第一次总是很痛苦的. 数据库版本: Oracle Database 11g E ...

  8. Oracle DataGuard数据备份方案详解

    Oracle DataGuard是一种数据库级别的HA方案,最主要功能是冗灾.数据保护.故障恢复等. 在生产数据库的"事务一致性"时,使用生产库的物理全备份(或物理COPY)创建备 ...

  9. Oracle Dataguard 介绍

    Oracle DataGuard介绍 一. DataGuard的基本原理 当某次事务处理对生产数据库中的数据作出更改时,Oracle数据库将在一个联机重做日志文件里记录此次更改.在DataGuard中 ...

随机推荐

  1. c++ 类的对象与指针

    这里首先我们需区分一下指针数组和数组指针. 指针数组:int *p[4];它最终是个数组,只是这个数组存储的是4个指向int类型的指针. 数组指针:int (*P)[4];它最终是个指针,表示一个指向 ...

  2. Hadoop集群(第10期)_MySQL关系数据库

    1.MySQL安装 MySQL下载地址:http://www.mysql.com/downloads/ 1.1 Windows平台 1)准备软件 MySQL版本:mysql-5.5.21-win32. ...

  3. System.out.println(对象)

    class Person { private String name; private int age; public String getName() { return this.name; } p ...

  4. CF 279A. Point on Spiral

    http://codeforces.com/problemset/problem/279/A 题意 :就是给你一个螺旋形的图,然后给你一个点,问从(0,0)点到这个点需要转几次弯,当然,是按着这个螺旋 ...

  5. nginx 域名rewrite跳转

    转自:http://blog.csdn.net/xingfujie/article/details/7337832 需求:nginx规则,所有对OA.bccom.info的访问,redirect到uc ...

  6. 网络编程(二)NSURLSessionConfiguration

    1.NSURLSession有三种工作模式 (1)defaultSessionConfiguration(默认):使用的是基于磁盘缓存的持久化策略,Cache,Cookie. (2)ephemeral ...

  7. SGU 488 Dales and Hills

    这给题目和LIS类似,只不过是求连续的单调序列,用单调队列可破之,比如求LDIS(连续单增序列),如果a[i]大于栈顶元素入栈,将top作为序列长度,反过来再扫一遍就是包含该元素的单调递减序列,这样通 ...

  8. 详解浏览器缓存机制与Apache设置缓存

    一.详解浏览器缓存机制 对于,如何说明缓存机制,在网络上找到了两张图,个人认为思路是比较清晰的.总结时,上图. 这里需要注意的有两点: 1.Last-Modified.Etag是响应头里的数据 2.I ...

  9. OpenSSH ‘mm_newkeys_from_blob’函数权限许可和访问控制漏洞

    漏洞名称: OpenSSH ‘mm_newkeys_from_blob’函数权限许可和访问控制漏洞 CNNVD编号: CNNVD-201311-117 发布时间: 2013-11-12 更新时间: 2 ...

  10. [转] 舞蹈链(Dancing Links)——求解精确覆盖问题

    转载自:http://www.cnblogs.com/grenet/p/3145800.html 精确覆盖问题的定义:给定一个由0-1组成的矩阵,是否能找到一个行的集合,使得集合中每一列都恰好包含一个 ...