oracle数据库备份恢复篇-在rman工具下记录日志的方法

在SQLPLUS工具下如果想要记录操作日志,需要使用spool命令
在RMAN工具下如果想要记录自己的操作日志,同样需要使用spool命令,不过用法上稍微有一点不同

[oracle@asm11g ~]$ rman target /
Recovery Manager: Release 11.2.0.3.0 - Production on Fri May 18 16:42:57 2012
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: DB01 (DBID=1413747133)
RMAN> spool log to '/home/oracle/backup/backup.log';
RMAN> backup tablespace users format '/home/oracle/backup/uses.bus';
RMAN> spool log off
Spooling for log turned off
Recovery Manager11.2.0.3.0
RMAN> exit
Recovery Manager complete.

[oracle@asm11g ~]$ cd /home/oracle/backup

[oracle@asm11g backup]$ ls -l
total 3832
-rw-r--r-- 1 oracle oinstall 731 May 18 16:43 backup.log
-rw-r----- 1 oracle asmadmin 3915776 May 18 16:43 uses.bus

[oracle@asm11g backup]$ more backup.log

Spooling started in log file: /home/oracle/backup/backup.log

Recovery Manager11.2.0.3.0

RMAN>
Starting backup at 18-MAY-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=46 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00004 name=+DG1/db01/datafile/users.259.782478971
channel ORA_DISK_1: starting piece 1 at 18-MAY-12
channel ORA_DISK_1: finished piece 1 at 18-MAY-12
piece handle=/home/oracle/backup/uses.bus tag=TAG20120518T164343 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 18-MAY-12

RMAN>

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值