Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3125233
  • 博文数量: 206
  • 博客积分: 3409
  • 博客等级: 中校
  • 技术积分: 4066
  • 用 户 组: 普通用户
  • 注册时间: 2010-12-24 10:21
个人简介

● ITPUB名人堂嘉宾 ● ChinaUnix社区博客专家 ● ChinaUnix社区Oracle板块版主 ● 优酷网认证音乐牛人:EricGuitar ● SDOUG 核心成员 ●E-mail:gaoqiangdba@163.com

文章分类

全部博文(206)

文章存档

2021年(11)

2020年(7)

2019年(7)

2016年(5)

2015年(36)

2014年(23)

2013年(15)

2012年(23)

2011年(61)

2010年(18)

分类: Oracle

2013-08-15 11:45:13

  
归档模式的设置:

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

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: finished piece 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


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


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

请看:
RMAN备份、恢复实验室 之 备份篇 【查看备份情况】


阅读(9988) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~