热门标签 | HotTags
当前位置:  开发笔记 > 数据库 > 正文

配置Oracle11gActiveDataguard

[oracle@dg2~]$rmantargetsys123456@dg1auxiliarysys123456@dg2RecoveryManager:Release11.2.0.3.0

[oracle@dg2 ~]$ rman target sys/123456@dg1 auxiliary sys/123456@dg2 Recovery Manager: Release 11.2.0.3.0 - Production on Sun Apr 22 13:38:33 2012 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. connected to tar

[oracle@dg2 ~]$ rman target sys/123456@dg1 auxiliary sys/123456@dg2
Recovery Manager: Release 11.2.0.3.0 - Production on Sun Apr 22 13:38:33 2012
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

connected to target database: DG (DBID=1694605607)
connected to auxiliary database: DG (not mounted)

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

Starting Duplicate Db at 2012-04-22-13:39:25
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=134 device type=DISK

contents of Memory Script:
{
backup as copy reuse
targetfile '/u01/app/oracle/product/11.2.0/db1/dbs/orapwdg' auxiliary format
'/u01/app/oracle/product/11.2.0/db1/dbs/orapwdg' ;
}
executing Memory Script

Starting backup at 2012-04-22-13:39:26
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=19 device type=DISK
Finished backup at 2012-04-22-13:39:28

contents of Memory Script:
{
backup as copy current controlfile for standby auxiliary format

'/u01/app/oracle/oradata/dg/control01.ctl';
restore clone controlfile to '/u01/app/oracle/fast_recovery_area/dg/control02.ctl' from
'/u01/app/oracle/oradata/dg/control01.ctl';
}
executing Memory Script

Starting backup at 2012-04-22-13:39:29
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
copying standby control file
output file name=/u01/app/oracle/product/11.2.0/db1/dbs/snapcf_dg.f tag=TAG20120422T133929 RECID=1

STAMP=781277970
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
Finished backup at 2012-04-22-13:39:32

Starting restore at 2012-04-22-13:39:32
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: copied control file copy
Finished restore at 2012-04-22-13:39:34

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/oracle/oradata/dg/temp01.dbf";
switch clone tempfile all;
set newname for datafile 1 to
"/u01/app/oracle/oradata/dg/system01.dbf";
set newname for datafile 2 to
"/u01/app/oracle/oradata/dg/sysaux01.dbf";
set newname for datafile 3 to
"/u01/app/oracle/oradata/dg/undotbs01.dbf";
set newname for datafile 4 to
"/u01/app/oracle/oradata/dg/users01.dbf";
backup as copy reuse
datafile 1 auxiliary format
"/u01/app/oracle/oradata/dg/system01.dbf" datafile
2 auxiliary format
"/u01/app/oracle/oradata/dg/sysaux01.dbf" datafile
3 auxiliary format
"/u01/app/oracle/oradata/dg/undotbs01.dbf" datafile
4 auxiliary format
"/u01/app/oracle/oradata/dg/users01.dbf" ;
sql 'alter system archive log current';
}
executing Memory Script

executing command: SET NEWNAME

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

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting backup at 2012-04-22-13:39:42
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=/u01/app/oracle/oradata/dg/system01.dbf
output file name=/u01/app/oracle/oradata/dg/system01.dbf tag=TAG20120422T133943
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:03:06
channel ORA_DISK_1: starting datafile copy
input datafile file number=00002 name=/u01/app/oracle/oradata/dg/sysaux01.dbf
output file name=/u01/app/oracle/oradata/dg/sysaux01.dbf tag=TAG20120422T133943
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:01:55
channel ORA_DISK_1: starting datafile copy
input datafile file number=00003 name=/u01/app/oracle/oradata/dg/undotbs01.dbf
output file name=/u01/app/oracle/oradata/dg/undotbs01.dbf tag=TAG20120422T133943
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting datafile copy
input datafile file number=00004 name=/u01/app/oracle/oradata/dg/users01.dbf
output file name=/u01/app/oracle/oradata/dg/users01.dbf tag=TAG20120422T133943
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
Finished backup at 2012-04-22-13:45:05

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=1 STAMP=781278308 file name=/u01/app/oracle/oradata/dg/system01.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=2 STAMP=781278308 file name=/u01/app/oracle/oradata/dg/sysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=3 STAMP=781278308 file name=/u01/app/oracle/oradata/dg/undotbs01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=4 STAMP=781278308 file name=/u01/app/oracle/oradata/dg/users01.dbf
Finished Duplicate Db at 2012-04-22-13:45:29

RMAN> exit
Recovery Manager complete.

推荐阅读
  • 一、Hadoop来历Hadoop的思想来源于Google在做搜索引擎的时候出现一个很大的问题就是这么多网页我如何才能以最快的速度来搜索到,由于这个问题Google发明 ... [详细]
  • 本文详细介绍了在ASP.NET中获取插入记录的ID的几种方法,包括使用SCOPE_IDENTITY()和IDENT_CURRENT()函数,以及通过ExecuteReader方法执行SQL语句获取ID的步骤。同时,还提供了使用这些方法的示例代码和注意事项。对于需要获取表中最后一个插入操作所产生的ID或马上使用刚插入的新记录ID的开发者来说,本文提供了一些有用的技巧和建议。 ... [详细]
  • ubuntu用sqoop将数据从hive导入mysql时,命令: ... [详细]
  • Windows下配置PHP5.6的方法及注意事项
    本文介绍了在Windows系统下配置PHP5.6的步骤及注意事项,包括下载PHP5.6、解压并配置IIS、添加模块映射、测试等。同时提供了一些常见问题的解决方法,如下载缺失的msvcr110.dll文件等。通过本文的指导,读者可以轻松地在Windows系统下配置PHP5.6,并解决一些常见的配置问题。 ... [详细]
  • 使用在线工具jsonschema2pojo根据json生成java对象
    本文介绍了使用在线工具jsonschema2pojo根据json生成java对象的方法。通过该工具,用户只需将json字符串复制到输入框中,即可自动将其转换成java对象。该工具还能解析列表式的json数据,并将嵌套在内层的对象也解析出来。本文以请求github的api为例,展示了使用该工具的步骤和效果。 ... [详细]
  • HDFS2.x新特性
    一、集群间数据拷贝scp实现两个远程主机之间的文件复制scp-rhello.txtroothadoop103:useratguiguhello.txt推pushscp-rr ... [详细]
  • 仙贝旅行是日本最大的旅游服务平台之一,为广大用户提供优质的日本定制游服务。随着用户数量的增长,仙贝旅行决定与智齿科技合作,全面替换原有客服系统,打造全新的在线客服体系。该体系具备多渠道快速接入的能力,让仙贝旅行轻松与各个渠道的接入用户完成沟通。同时,机器人与人工协同发力,提升客户服务水平。 ... [详细]
  • 本文介绍了一些Java开发项目管理工具及其配置教程,包括团队协同工具worktil,版本管理工具GitLab,自动化构建工具Jenkins,项目管理工具Maven和Maven私服Nexus,以及Mybatis的安装和代码自动生成工具。提供了相关链接供读者参考。 ... [详细]
  • 本文由编程笔记#小编为大家整理,主要介绍了StartingzookeeperFAILEDTOSTART相关的知识,希望对你有一定的参考价值。下载路径:https://ar ... [详细]
  • 本文介绍了在Linux下安装和配置Kafka的方法,包括安装JDK、下载和解压Kafka、配置Kafka的参数,以及配置Kafka的日志目录、服务器IP和日志存放路径等。同时还提供了单机配置部署的方法和zookeeper地址和端口的配置。通过实操成功的案例,帮助读者快速完成Kafka的安装和配置。 ... [详细]
  • SAP羞辱国产软件商:技术停在10年前
    SAP中国研究院总裁芮祥麟表示,国产软件厂商过于热衷概念炒作,技术水平停留在10年前的客户端架构水平。他认为,国内厂商推出基于SOA的产品或转型SAAS模式是不可能的,研发新架构需要时间。当前最热门的概念是云计算,芮祥麟呼吁国产厂商应该潜心研发底层架构。 ... [详细]
  • IT方面的论坛太多了,有综合,有专业,有行业,在各个论坛里混了几年,体会颇深,以前是论坛哪里人多 ... [详细]
  • CEPH LIO iSCSI Gateway及其使用参考文档
    本文介绍了CEPH LIO iSCSI Gateway以及使用该网关的参考文档,包括Ceph Block Device、CEPH ISCSI GATEWAY、USING AN ISCSI GATEWAY等。同时提供了多个参考链接,详细介绍了CEPH LIO iSCSI Gateway的配置和使用方法。 ... [详细]
  • 本文讲述了孙悟空写给白骨精的信件引发的思考和反省。孙悟空在信中对自己的行为进行了反思,认识到自己胡闹的行为并没有给他带来实际的收获。他也揭示了西天取经的真相,认为这是玉皇、菩萨设下的一场陷阱。他还提到了师傅的虚伪和对自己的实心话,以及自己作为师傅准备提拔的对象而被派下来锻炼的经历。他认为路上的九九八十一难也都是菩萨算计好的,唐僧并没有真正的危险。最后,他提到了观音菩萨在关键时刻的指导。这封信件引发了孙悟空对自己行为的思考和反省,对西天取经的目的和自己的角色有了更深入的认识。 ... [详细]
  • Windows2003 IIS上设置301定向,实现不带www域名跳转带www域名的方法
    打开IIS,建一个网站,主机头用不带www的域名,随便指向一个目录。然后在这个网站上点右键,属性--主目录--重定向到URL如图ÿ ... [详细]
author-avatar
手机用户2602918611
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有