[code]standby在standby状态下的备份方式如下,生成一个控制文件备份control_1,一个数据文件备份full_dataRMAN> backup database format \'/iso/backup/XX_%U\';primary的备份方式如下,并拷贝到standby的对应目录RMAN> backup current controlfile format \'/iso/backup/control_2\';RMAN> backup current controlfile for standby format \'/iso/backup/control_3\';得出结论:主库backup current controlfile带上了for standby的话,使用该控制文件备份,无论怎么样还原都是standby状态主库backup current controlfile没有带for standby的话restore standby controlfile后是standby状态restore controlfile后是primary状态备库backup current controlfile带不带for standby,使用该控制文件备份,无论怎么样还原都是standby状态恢复方法(使用control_1,备库控制文件正常备份方式),备库还是备库状态1.备库关机并启动至startup nomount状态2.备库restore controlfile from \'/iso/backup/control_1\';3.备库restore database4.备库recover database until sequence XX5.备库alter database open resetlogsORA-01666: control file is for a standby database6.alter database open;7.alter database recover managed standby database disconnect from session;恢复方法(使用control_2,主库控制文件正常备份方式),备库脱离备库成主库状态1.备库关机并启动至startup nomount状态2.备库restore controlfile from \'/iso/backup/control_2\';3.备库restore database(先做catalog backuppiece full_data的前提下 )4.备库recover database until sequence XX5.备库alter database open resetlogs恢复方法(使用control_2,主库控制文件正常备份方式,但是恢复时使用了standby),备库还是备库状态1.备库关机并启动至startup nomount状态2.备库restore standby controlfile from \'/iso/backup/control_2\';3.备库restore database(先做catalog backuppiece full_data的前提下 )4.备库recover database until sequence XX5.备库alter database open resetlogsORA-01666: control file is for a standby database6.alter database open;7.alter database recover managed standby database disconnect from session;恢复方法(使用control_3,主库控制文件standby备份方式),备库还是备库状态1.备库关机并启动至startup nomount状态2.备库restore controlfile from \'/iso/backup/control_3\'3.备库restore database(先做catalog backuppiece full_data的前提下 )4.备库recover database until sequence XX5.备库alter database open resetlogsORA-01666: control file is for a standby database6.alter database open;7.alter database recover managed standby database disconnect from session;