热门标签 | 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.

推荐阅读
  • 本文详细探讨了在Web开发中常见的UTF-8编码问题及其解决方案,包括HTML页面、PHP脚本、MySQL数据库以及JavaScript和Flash应用中的乱码问题。 ... [详细]
  • C# 中创建和执行存储过程的方法
    本文详细介绍了如何使用 C# 创建和调用 SQL Server 存储过程,包括连接数据库、定义命令类型、设置参数等步骤。 ... [详细]
  • 本文介绍如何通过整合SparkSQL与Hive来构建高效的用户画像环境,提高数据处理速度和查询效率。 ... [详细]
  • 探讨密码安全的重要性
    近期,多家知名网站如CSDN、人人网、多玩、开心网等的数据库相继被泄露,其中大量用户的账户密码因明文存储而暴露无遗。本文将探讨黑客获取密码的常见手段,网站如何安全存储用户信息,以及用户应如何保护自己的密码。 ... [详细]
  • 本文详细介绍了Oracle 11g中的创建表空间的方法,以及如何设置客户端和服务端的基本配置,包括用户管理、环境变量配置等。 ... [详细]
  • XenDesktop部署与管理经验分享
    本文详细介绍了XenDesktop的安装步骤,包括在管理员权限下进行虚拟桌面配置、域登录及VDA安装等关键操作,并探讨了个人磁盘模式下的镜像更新策略,以及如何正确处理应用程序和快捷方式的权限设置。 ... [详细]
  • 原文地址:https:blog.csdn.netqq_35361471articledetails84715491原文地址:https:blog.cs ... [详细]
  • 本文详细介绍了如何调整 Kettle 的内存配置以优化性能,并指导用户如何正确设置日志输出中的时间类型,确保数据处理和监控的准确性。 ... [详细]
  • 本文将深入探讨 Unreal Engine 4 (UE4) 中的距离场技术,包括其原理、实现细节以及在渲染中的应用。距离场技术在现代游戏引擎中用于提高光照和阴影的效果,尤其是在处理复杂几何形状时。文章将结合具体代码示例,帮助读者更好地理解和应用这一技术。 ... [详细]
  • JavaScript 实现图片文件转Base64编码的方法
    本文详细介绍了如何使用JavaScript将用户通过文件输入控件选择的图片文件转换为Base64编码字符串,适用于Web前端开发中图片上传前的预处理。 ... [详细]
  • POJ2263是一个经典的图论问题,涉及寻找从起点到终点的最大载重路径。本文将详细介绍该问题的背景、解题思路及代码实现。 ... [详细]
  • 探讨了在VB中使用WebBrowser控件时遇到的‘无法找到或打开C:\WINDOWS\system32\ieframe.dll’问题,并提供了解决方案。 ... [详细]
  • 最近在博客园上发现了一款ViewState解码工具,这是一款非常实用的工具,可以帮助开发者检查ViewState是否正确保存。然而,这也意味着其他人可以通过该工具查看ViewState中的数据,因此隐藏ViewState变得尤为重要。 ... [详细]
  • 使用 jQuery 实现页面加载进度条
    页面加载进度条是提升用户体验的重要工具,通过在页面头部显示一个加载状态,并在页面完全加载后隐藏,可以有效减少用户的等待焦虑。本文将详细介绍如何使用 jQuery 实现这一功能。 ... [详细]
  • 本文介绍了如何在Linux系统中获取库源码,并在从源代码编译软件时收集所需的依赖项列表。 ... [详细]
author-avatar
永无止境
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有