oracle rman备份 归档模式,RMAN备份、恢复实验室 之 备份篇 【归档模式】

归档模式的设置:

如果没有设置归档模式,会出现如下情况:

RMAN> backup database;

Starting backup at 02-AUG-13

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=9 device type=DISK

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

RMAN-03009: failure of backup command on ORA_DISK_1 channel

at 08/02/2013 01:45:49

ORA-19602: cannot backup or copy active file in NOARCHIVELOG

mode           -------看到了没?直接不让你搞啊... ...

continuing other job steps, job failed will not be re-run

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 02-AUG-13

channel ORA_DISK_1: finished piece 1 at 02-AUG-13

piece handle=/oracle/app/oracle/product/11.2.0/db_1/dbs/04og8fed_1_1 tag=TAG20130802T014548

comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03009: failure of backup command on ORA_DISK_1 channel at

08/02/2013 01:45:49

ORA-19602: cannot backup or copy active file in NOARCHIVELOG

mode

打开归档模式(单节点):

RMAN>shutdown immediate;

database closed

database dismounted

Oracle instance shut down

RMAN>startup mount;

connected to target database (not started)

Oracle instance started

database mounted

Total System Global Area

730714112 bytes

Fixed Size

2216944 bytes

Variable Size

486542352 bytes

Database Buffers

234881024 bytes

Redo Buffers

7073792 bytes

归档模式开启方法:

在RMAN命令符下执行打开归档命令,在sqlplus下直接输入“alter database

archivelog;”回车即可。

RMAN>sql 'alter database archivelog';

sql statement: alter database archivelog              --------------归档已打开,当然,你也可以在sqlplus下执行alter database archivelog命令,那样的话执行结果返回提示更直观一些,自己动手体验一把吧,多做比多看更有效果。

归档模式已打开,我们再来备份一下,看看效果如何?

RMAN> backup database;

Starting backup at 02-AUG-13

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=10 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=00001

name=/oracle/app/oradata/ORCL/datafile/o1_mf_system_8xm4839m_.dbf

input datafile file number=00002

name=/oracle/app/oradata/ORCL/datafile/o1_mf_sysaux_8xm483f7_.dbf

input datafile file number=00005 name=/oracle/app/oradata/ORCL/datafile/o1_mf_example_8xm4gzck_.dbf

input datafile file number=00003

name=/oracle/app/oradata/ORCL/datafile/o1_mf_undotbs1_8xm483gd_.dbf

input datafile file number=00004

name=/oracle/app/oradata/ORCL/datafile/o1_mf_users_8xm483jk_.dbf

channel ORA_DISK_1: starting piece 1 at 02-AUG-13

channel ORA_DISK_1: finished piece 1 at 02-AUG-13

piece handle=/oracle/app/oracle/product/11.2.0/db_1/dbs/05og8fns_1_1

tag=TAG20130802T015052 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:02:26

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 02-AUG-13

channel ORA_DISK_1:finishedpiece 1 at 02-AUG-13

piece handle=/oracle/app/oracle/product/11.2.0/db_1/dbs/06og8fsf_1_1

tag=TAG20130802T015052 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02

Finished backup at 02-AUG-13

及时你第一次看着返回结果,很多东西看不明白,但这几个字眼一目了然,告诉我们,数据库全库备份成功!~~~

67c85eadd5ab6040f59c61618466ba9d.gif  

149f407ae7d57b9510811fdf5475b6b9.gif

备份成功了,备份了那些,备份的情况如何怎么查看并确认呢?

请看:

6329ad7634929b461ff4e32fad5dd603.gifRMAN备份、恢复实验室 之 备份篇 【查看备份情况】

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值