在使用recovery还原数据库或者rman复制数据库时,在备份中无法找到sequence就会报错RMAN-06054。解决方法:
说明:此处的sequence和thread概念
说明:此处的sequence和thread概念
- sequence是数据库日志递增的序列号,日志切换时会顺序递增
- thread是instance id。单实例是1,rac环境中的话有1,2。。。
- SCN是system change number 是跟随事务递增的。
#备份数据库
RMAN> run{
2> allocate channel d1 type disk;
3> allocate channel d2 type disk;
4> backup database format 'db_%d_%s_%p_%u.bk';
5> backup current controlfile tag='bak_ctlfile' format 'ctl_%d_%s_%p_%u.bk';
6> backup archivelog all format 'arc_%d_%s_%p_%u.bk';
7> release channel d2;
8> release channel d1;
9> }
using target database control file instead of recovery catalog
allocated channel: d1
channel d1: SID=34 device type=DISK
allocated channel: d2
channel d2: SID=40 device type=DISK
Starting backup at 15-AUG-14
channel d1: starting full datafile backup set
channel d1: specifying datafile(s) in backup set
input datafile file number=00001 name=/opt/app/oracle/oradata/orcl11g/system01.dbf
input datafile file number=00004 name=/opt/app/oracle/oradata/orcl11g/users01.dbf
channel d1: starting piece 1 at 15-AUG-14
channel d2: starting full datafile backup set
channel d2: specifying datafile(s) in backup set
input datafile file number=00002 name=/opt/app/oracle/oradata/orcl11g/sysaux01.dbf
input datafile file number=00003 name=/opt/app/oracle/oradata/orcl11g/undotbs01.dbf
channel d2: starting piece 1 at 15-AUG-14
channel d2: finished piece 1 at 15-AUG-14
piece handle=/opt/app/oracle/product/11.2/db_1/dbs/db_ORCL11G_20_1_0kpg0fs8.bk tag=TAG20140815T094439 comment=NONE
channel d2: backup set complete, elapsed time: 00:02:47
channel d2: starting full datafile backup set
channel d2: specifying datafile(s) in backup set
including current control file in backup set
channel d2: starting piece 1 at 15-AUG-14
channel d1: finished piece 1 at 15-AUG-14
piece handle=/opt/app/oracle/product/11.2/db_1/dbs/db_ORCL11G_19_1_0jpg0fs7.bk tag=TAG20140815T094439 comment=NONE
channel d1: backup set complete, elapsed time: 00:03:21
channel d1: starting full datafile backup set
channel d1: specifying datafile(s) in backup set
including current SPFILE in backup set
channel d1: starting piece 1 at 15-AUG-14
channel d2: finished piece 1 at 15-AUG-14
piece handle=/opt/app/oracle/product/11.2/db_1/dbs/db_ORCL11G_21_1_0lpg0g1n.bk tag=TAG20140815T094439 comment=NONE
channel d2: backup set complete, elapsed time: 00:00:09
channel d1: finished piece 1 at 15-AUG-14
piece handle=/opt/app/oracle/product/11.2/db_1/dbs/db_ORCL11G_22_1_0mpg0g2j.bk tag=TAG20140815T094439 comment=NONE
channel d1: backup set complete, elapsed time: 00:00:01
Finished backup at 15-AUG-14
Starting backup at 15-AUG-14
channel d1: starting full datafile backup set
channel d1: specifying datafile(s) in backup set
including current control file in backup set
channel d1: starting piece 1 at 15-AUG-14
channel d1: finished piece 1 at 15-AUG-14
piece handle=/opt/app/oracle/product/11.2/db_1/dbs/ctl_ORCL11G_23_1_0np