LEVEL0 备份
RMAN> run{
2> allocate channel d1 type disk;
3> backup incremental LEVEL 0 database
4> format 'D:\oracle\backup\practice_rman_20080730_0db_%d_%s_%p_%t'
5> tag='WHOLE_INC1_0';
6> }
allocated channel: d1
channel d1: sid=12 devtype=DISKStarting backup at 30-JUL-08
channel d1: starting incremental level 0 datafile backupset
channel d1: specifying datafile(s) in backupset
including current SPFILE in backupset
including current controlfile in backupset
input datafile fno=00002 name=D:ORANTORADATAPRACTICEUNDOTBS01.DBF
input datafile fno=00001 name=D:ORANTORADATAPRACTICESYSTEM01.DBF
input datafile fno=00003 name=D:ORANTORADATAPRACTICEINDX01.DBF
input datafile fno=00004 name=D:ORANTORADATAPRACTICETOOLS01.DBF
input datafile fno=00005 name=D:ORANTORADATAPRACTICEUSERS01.DBF
input datafile fno=00006 name=D:ORANTORADATAPRACTICEUSER02.DBF
channel d1: starting piece 1 at 30-JUL-08
channel d1: finished piece 1 at 30-JUL-08
piece handle=D:ORACLEBACKUPPRACTICE_RMAN_20080730_0DB_PRACTICE_3_1_661448999
comment=NONE
channel d1: backup set complete, elapsed time: 00:00:27
Finished backup at 30-JUL-08
released channel: d1RMAN> **end-of-file**drop table xxx配置辅助实例
开始恢复
RMAN> connect target sys/practice@practice
connected to target database: PRACTICE (DBID=2848469222)RMAN> connect catalog rman/rman@rcat
connected to recovery catalog databaseRMAN> connect auxiliary sys/auxy@auxy
connected to auxiliary database: PRACTICE (not mounted)RMAN> run{
2> set until time "to_date('2008/07/30 15:55:04', 'YYYY/MM/DD HH24:MI:SS')";
3> allocate auxiliary channel d1 type disk;
4> recover tablespace users;
5> }
executing command: SET until clauseallocated channel: d1
channel d1: sid=9 devtype=DISKStarting recover at 30-JUL-08
released channel: d1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 07/30/2008 15:58:45
RMAN-06555: datafile 5 must be restored from backup created before 30-JUL-08RMAN> **end-of-file**这是为什么啊
RMAN> run{
2> allocate channel d1 type disk;
3> backup incremental LEVEL 0 database
4> format 'D:\oracle\backup\practice_rman_20080730_0db_%d_%s_%p_%t'
5> tag='WHOLE_INC1_0';
6> }
allocated channel: d1
channel d1: sid=12 devtype=DISKStarting backup at 30-JUL-08
channel d1: starting incremental level 0 datafile backupset
channel d1: specifying datafile(s) in backupset
including current SPFILE in backupset
including current controlfile in backupset
input datafile fno=00002 name=D:ORANTORADATAPRACTICEUNDOTBS01.DBF
input datafile fno=00001 name=D:ORANTORADATAPRACTICESYSTEM01.DBF
input datafile fno=00003 name=D:ORANTORADATAPRACTICEINDX01.DBF
input datafile fno=00004 name=D:ORANTORADATAPRACTICETOOLS01.DBF
input datafile fno=00005 name=D:ORANTORADATAPRACTICEUSERS01.DBF
input datafile fno=00006 name=D:ORANTORADATAPRACTICEUSER02.DBF
channel d1: starting piece 1 at 30-JUL-08
channel d1: finished piece 1 at 30-JUL-08
piece handle=D:ORACLEBACKUPPRACTICE_RMAN_20080730_0DB_PRACTICE_3_1_661448999
comment=NONE
channel d1: backup set complete, elapsed time: 00:00:27
Finished backup at 30-JUL-08
released channel: d1RMAN> **end-of-file**drop table xxx配置辅助实例
开始恢复
RMAN> connect target sys/practice@practice
connected to target database: PRACTICE (DBID=2848469222)RMAN> connect catalog rman/rman@rcat
connected to recovery catalog databaseRMAN> connect auxiliary sys/auxy@auxy
connected to auxiliary database: PRACTICE (not mounted)RMAN> run{
2> set until time "to_date('2008/07/30 15:55:04', 'YYYY/MM/DD HH24:MI:SS')";
3> allocate auxiliary channel d1 type disk;
4> recover tablespace users;
5> }
executing command: SET until clauseallocated channel: d1
channel d1: sid=9 devtype=DISKStarting recover at 30-JUL-08
released channel: d1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 07/30/2008 15:58:45
RMAN-06555: datafile 5 must be restored from backup created before 30-JUL-08RMAN> **end-of-file**这是为什么啊
Starting backup at 30-JUL-08
channel d1: starting incremental level 0 datafile backupset
channel d1: specifying datafile(s) in backupset
including current SPFILE in backupset
including current controlfile in backupset
input datafile fno=00002 name=D:ORANTORADATAPRACTICEUNDOTBS01.DBF 还有“配置辅助实例”是在备份之前进行吧? --〉为什么呢?
这个好像也不行RMAN> run{
2> set until time "to_date('2008/07/30 15:55:04', 'YYYY/MM/DD HH24:MI:SS'
3> allocate auxiliary channel d1 type disk;
4> allocate channel c1 type disk;
5> restore tablespace users;
6> recover tablespace users;
7> }
executing command: SET until clauseallocated channel: d1
channel d1: sid=9 devtype=DISKallocated channel: c1
channel c1: sid=10 devtype=DISKStarting restore at 06-AUG-08channel c1: starting datafile backupset restore
channel c1: specifying datafile(s) to restore from backup set
restoring datafile 00005 to D:\ORANT\ORADATA\PRACTICE\USERS01.DBF
restoring datafile 00006 to D:\ORANT\ORADATA\PRACTICE\USER02.DBF
released channel: d1
released channel: c1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 08/06/2008 13:06:11
ORA-19573: cannot obtain exclusive enqueue for datafile 5RMAN> **end-of-file**