数据库在Open状态下,如何使用RMAN进行全备?

1、登陆

View Code
[oracle@DG1 ubackup]$ rman target sys/oracle@db200 nocatalog

Recovery Manager: Release 11.2.0.1.0 - Production on Wed Mar 27 18:22:10 2013

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

connected to target database: POLI (DBID=3718810889)
using target database control file instead of recovery catalog

2、执行备份

View Code
RMAN> backup database format '/u01/ubackup/wb_%U';

Starting backup at 27-MAR-13
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=132 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=/u01/oradata/md/system01.dbf
input datafile file number=00002 name=/u01/oradata/md/sysaux01.dbf
input datafile file number=00005 name=/u01/oradata/md/example01.dbf
input datafile file number=00006 name=/u01/oradata/md/app1_01.dbf
input datafile file number=00003 name=/u01/oradata/md/undotbs01.dbf
input datafile file number=00004 name=/u01/oradata/md/users01.dbf
input datafile file number=00007 name=/u01/oradata/md/app2_01.dbf
channel ORA_DISK_1: starting piece 1 at 27-MAR-13
channel ORA_DISK_1: finished piece 1 at 27-MAR-13
piece handle=/u01/ubackup/wb_21o5jh40_1_1 tag=TAG20130327T182255 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:03:34
Finished backup at 27-MAR-13

Starting Control File and SPFILE Autobackup at 27-MAR-13
piece handle=/u01/flash_recovery_area/POLI/autobackup/2013_03_27/o1_mf_s_811189591_8o5lbstv_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 27-MAR-13

3、备份完成后,将当前的日志进行归档

View Code
RMAN> sql 'alter system archive log current';

sql statement: alter system archive log current

 

posted @ 2013-03-27 18:28  ArcerZhang  阅读(279)  评论(0编辑  收藏  举报