Oracle database 15章 恢复管理器 RMAN脚本 理论试验

1、使用命令文件

先创建一个命令文件

~/app/oracle/flash_recovery_area> cat testfile01 
BACKUP DATABASE PLUS ARCHIVELOG;

然后使用rman进行调用:

~/app/oracle/flash_recovery_area> rman target / @testfile01


Recovery Manager: Release 11.2.0.1.0 - Production on Fri Apr 5 17:29:14 2013

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

connected to target database: TEST (DBID=2109669017)

RMAN> BACKUP DATABASE PLUS ARCHIVELOG;
2> 

Starting backup at 05-APR-13
current log archived
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=1522 device type=DISK
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=41 RECID=1 STAMP=811963756
channel ORA_DISK_1: starting piece 1 at 05-APR-13
channel ORA_DISK_1: finished piece 1 at 05-APR-13
piece handle=/home/oracle/app/oracle/flash_recovery_area/TEST/backupset/2013_04_05/o1_mf_annnn_TAG20130405T172916_8ox6cdvv_.bkp tag=TAG20130405T172916 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 05-APR-13

Starting backup at 05-APR-13
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/home/oracle/app/oracle/oradata/test/system01.dbf
input datafile file number=00002 name=/home/oracle/app/oracle/oradata/test/sysaux01.dbf
input datafile file number=00005 name=/home/oracle/app/oracle/oradata/test/example01.dbf
input datafile file number=00003 name=/home/oracle/app/oracle/oradata/test/undotbs01.dbf
input datafile file number=00004 name=/home/oracle/app/oracle/oradata/test/users01.dbf
channel ORA_DISK_1: starting piece 1 at 05-APR-13
channel ORA_DISK_1: finished piece 1 at 05-APR-13
piece handle=/home/oracle/app/oracle/flash_recovery_area/TEST/backupset/2013_04_05/o1_mf_nnndf_TAG20130405T172918_8ox6cgtl_.bkp tag=TAG20130405T172918 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 05-APR-13
channel ORA_DISK_1: finished piece 1 at 05-APR-13
piece handle=/home/oracle/app/oracle/flash_recovery_area/TEST/backupset/2013_04_05/o1_mf_ncsnf_TAG20130405T172918_8ox6cygd_.bkp tag=TAG20130405T172918 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 05-APR-13

Starting backup at 05-APR-13
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=42 RECID=2 STAMP=811963775
channel ORA_DISK_1: starting piece 1 at 05-APR-13
channel ORA_DISK_1: finished piece 1 at 05-APR-13
piece handle=/home/oracle/app/oracle/flash_recovery_area/TEST/backupset/2013_04_05/o1_mf_annnn_TAG20130405T172935_8ox6d03h_.bkp tag=TAG20130405T172935 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 05-APR-13

Recovery Manager complete.

查看备份文件:

~/app/oracle/flash_recovery_area/TEST/archivelog/2013_04_05> ls -lrt
total 16680
-rw-r----- 1 oracle oinstall 17025536 Apr  5 17:29 o1_mf_1_41_8ox6ccpy_.arc
-rw-r----- 1 oracle oinstall    28160 Apr  5 17:29 o1_mf_1_42_8ox6czsb_.arc



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值