通过rman执行0级备份。通常来说,0级备份也可以叫做全库备份,但是全库备份不能充当0级备份。
因为在执行增量备份恢复数据库的时候,不同用全库备份来完成。在执行增量备份恢复数据库的时候,
只能有0级备份与后面的增量备份(差异增量备份或者累积增量备份)共同完成。只有当没有增量备份的时候,
0级备份与全库备份恢复数据库是等同的。
run{
shutdown immediate;
startup mount;
backup as backupset incremental level 0 database;
alter database open;
}
#rman工具也可以执行语句块。
[oracle@enmo ~]$ rman target /
Recovery Manager: Release 11.2.0.4.0 - Production on Mon Nov 7 17:57:54 2016
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: PROD (DBID=338469376)
RMAN> run{
2> shutdown immediate;
3> startup mount;
4> backup as backupset incremental level 0 database;
5> alter database open;
6> }
using target database control file instead of recovery catalog
database closed
database dismounted
Oracle instance shut down
connected to target database (not started)
Oracle instance started
database mounted
Total System Global Area 835104768 bytes
Fixed Size 2257840 bytes
Variable Size 507513936 bytes
Database Buffers 322961408 bytes
Redo Buffers 2371584 bytes
Starting backup at 07-NOV-16
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=18 device type=DISK
channel ORA_DISK_1: starting incremental level 0 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/PROD/system01.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/PROD/sysaux01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/PROD/example01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/PROD/undotbs01.dbf
input datafile file number=00006 name=/u01/app/oracle/oradata/PROD/ts_xxf_01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/PROD/users01.dbf
input datafile file number=00007 name=/u01/app/oracle/oradata/PROD/ts_ctl01.dbf
channel ORA_DISK_1: starting piece 1 at 07-NOV-16
channel ORA_DISK_1: finished piece 1 at 07-NOV-16
piece handle=/u01/app/FRA/PROD/backupset/2016_11_07/o1_mf_nnnd0_TAG20161107T175851_d20n2vry_.bkp tag=TAG20161107T175851 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:03:52
channel ORA_DISK_1: starting incremental level 0 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 07-NOV-16
channel ORA_DISK_1: finished piece 1 at 07-NOV-16
piece handle=/u01/app/FRA/PROD/backupset/2016_11_07/o1_mf_ncsn0_TAG20161107T175851_d20nb469_.bkp tag=TAG20161107T175851 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 07-NOV-16
通过增量备份恢复数据库也可以达到完全恢复。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/31392094/viewspace-2127951/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/31392094/viewspace-2127951/