当前位置:  数据库>oracle

利用RMAN进行异机还原(目录相同)

    来源: 互联网  发布时间:2017-05-27

    本文导语: 利用RMAN进行异机还原(目录相同) 源始库:192.168.201.2目标库:192.168.201.3 --192.168.201.2--rman[Oracle@db01 ~]$ rman target / Recovery Manager: Release 10.2.0.1.0 - Production on Wed Sep 18 08:52:25 2013 Copyright (c) 1982, 2005, Oracle.  All rights reserved. connected to target...

利用RMAN进行异机还原(目录相同)

源始库:192.168.201.2
目标库:192.168.201.3

--192.168.201.2
--rman
[Oracle@db01 ~]$ rman target /

Recovery Manager: Release 10.2.0.1.0 - Production on Wed Sep 18 08:52:25 2013

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

connected to target database: ORCL (DBID=1354163930)--dbid

--备份数据文件
RMAN> backup database format '/u02/backup/dbf_%T_%U.bak';

Starting backup at 18-SEP-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=140 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/u02/oradata/orcl/system01.dbf
input datafile fno=00002 name=/u02/oradata/orcl/undotbs01.dbf
input datafile fno=00003 name=/u02/oradata/orcl/sysaux01.dbf
input datafile fno=00005 name=/u02/oradata/orcl/app01.dbf
input datafile fno=00004 name=/u02/oradata/orcl/users01.dbf
channel ORA_DISK_1: starting piece 1 at 18-SEP-13
channel ORA_DISK_1: finished piece 1 at 18-SEP-13
piece handle=/u02/backup/dbf_20130918_05ok565a_1_1.bak tag=TAG20130918T085402

comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:25
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 18-SEP-13
channel ORA_DISK_1: finished piece 1 at 18-SEP-13
piece handle=/u02/backup/dbf_20130918_06ok567v_1_1.bak tag=TAG20130918T085402

comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 18-SEP-13

--备份归档日志
RMAN> backup archivelog all format '/u02/backup/arc_%T_%U.bak' delete input;

Starting backup at 18-SEP-13
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=33 recid=6 stamp=826448032
input archive log thread=1 sequence=34 recid=7 stamp=826448303
channel ORA_DISK_1: starting piece 1 at 18-SEP-13
channel ORA_DISK_1: finished piece 1 at 18-SEP-13
piece handle=/u02/backup/arc_20130918_07ok56dg_1_1.bak tag=TAG20130918T085823

comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
channel ORA_DISK_1: deleting archive log(s)
archive log filename=/u02/archivelog/1_33_826383194.dbf recid=6 stamp=826448032
archive log filename=/u02/archivelog/1_34_826383194.dbf recid=7 stamp=826448303
Finished backup at 18-SEP-13

--备份控制文件
RMAN> backup current controlfile format '/u02/backup/ctl_%T_%U.bak';

Starting backup at 18-SEP-13
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
channel ORA_DISK_1: starting piece 1 at 18-SEP-13
channel ORA_DISK_1: finished piece 1 at 18-SEP-13
piece handle=/u02/backup/ctl_20130918_08ok56fa_1_1.bak tag=TAG20130918T085922

comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 18-SEP-13


--192.168.201.3
--关闭数据库
[oracle@db02 orcl]$ sqlplus /nolog

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Sep 18 07:39:50 2013

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

SQL> conn /as sysdba
Connected.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

--打开数据库到nomount状态
SQL> startup nomount;
ORACLE instance started.

Total System Global Area  734003200 bytes
Fixed Size      1221564 bytes
Variable Size    213912644 bytes
Database Buffers  515899392 bytes
Redo Buffers      2969600 bytes

--rman
[oracle@db02 bdump]$ rman target /

Recovery Manager: Release 10.2.0.1.0 - Production on Wed Sep 18 09:02:02 2013

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

connected to target database: orcl (not mounted)

--设置dbid(与源库保持一致,如果与源库不同,则会无法恢复,后面再演示)

 

推荐阅读:

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

RMAN备份策略制定参考内容

RMAN备份学习笔记

Oracle数据库备份加密 RMAN加密


    
 
 

您可能感兴趣的文章:

  • 利用文件系统过滤驱动实现 类似还原卡功能 的原理是什么?
  • 怎么样利用Socket进行Java网络编程
  • 有多少人利用motif进行GUI软件的开发?
  • 有谁想过利用光盘进行多重启动?
  • 请问谁有在Dos 6.X下利用TCP/IP软件包进行开发的经验
  • 请问怎么利用sco unix 5.05中的磁盘分区工具进行硬盘分区
  • linux c语言利用socket进行HTTP访问
  • 高手,我装了Cygwin,有153M,不知道装全了没有,我在命令行敲入gcc,不行,那我该怎么办,才能利用它进行编程?
  • 解析如何利用switch语句进行字符统计
  • [严正声明]有人利用我的账号进行破坏活动,请网管明察(代Patrick_DK发)
  • 在java中 利用匿名内部类进行较简洁的双括弧初始化的方法
  • c#利用Grahics进行图片裁剪
  • UNIX下利用管道重定向实现对程序的输出进行操作
  • 利用windows性能计数器进行服务器性能监控示例分享
  • Android简单的利用MediaRecorder进行录音的实例代码
  • 利用双管道进行进程的数据通信
  • 如何利用time命令对程序进行全面统计——原创
  • 在socket中如何利用HTTP协议进行发送和接受数据?——新手问题,请高手赐教!
  •  
    本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
    本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。












  • 相关文章推荐
  • linux c下利用srand和rand函数生成随机字符串
  • 请问:Linux下用C编程计算CPU利用率和内存利用率?
  • linux下利用(cat,strings,head,sed)命令生成随机字符串
  • 在2003下利用vmware安装了linux,又利用host-only方式上了网,问题如下多谢指点!!!
  • Web前端开发如何利用css样式来控制Html中的h1/h2/h3标签不换行
  • 大虾 紧急求助!!!!如何求得当前机子的处理器利用率和内存利用率?
  • 如何利用libpcap和Python嗅探数据包
  • 如何利用Bash脚本(利用awksedgrepwc等)来自动修改配置文件
  • windows堆栈溢出利用的七种方式
  • 求RADIUS的动态分配IP的问题(利用IPPOOL)
  • iowait和cpu利用率的权衡问题
  • 利用java.net.URLConnection上传文件
  • Qt中利用槽如何来传递参数
  • 浏览器漏洞利用框架 BeEF
  • 请问如何编程获得CPU利用率?(空)
  • 如何利用Linux安装盘制作启动盘?
  • 谁知道linux/unix下利用Schema读取校验xml的开源代码,给一个链接,谢谢!
  • 怎样实现利用fprintf,输出定长字串,位数不足时在左侧填入指定字符填充。。
  • CPU、内存、数据库利用率监控
  • 怎样利用u-boot烧写??
  • 根目录 / 文件利用过高, 啥办法?


  • 站内导航:


    特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

    ©2012-2021,