今天测试TSPITR的时候发现一个奇怪的问题(恢复表空间test):
就是在安装有goldengate的机器上测试TSPITR的测试一直报错:
......
Export: Release 10.2.0.3.0 - Production on Wed Jan 12 13:45:29 2011
Copyright (c) 1982, 2005, Oracle.All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
Export done in ZHS16GBK character set and AL16UTF16 NCHAR character set
Note: table data (rows) will not be exported
About to export Tablespace Point-in-time Recovery objects...
EXP-00008: ORACLE error 376 encountered
ORA-00376: file 5 cannot be read at this time
ORA-01110: data file 5: '/u01/app/oracle/oradata/yssingle/goldengate01.dbf'
ORA-06512: at line 912
ORA-00376: file 5 cannot be read at this time
ORA-01110: data file 5: '/u01/app/oracle/oradata/yssingle/goldengate01.dbf'
ORA-06512: at "SYS.DBMS_PITR", line 683
ORA-06512: at line 1
EXP-00000: Export terminated unsuccessfully
host command complete
Removing automatic instance
shutting down automatic instance
Oracle instance shut down
Automatic instance removed
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 01/12/2011 13:45:35
RMAN-03015: error occurred in stored script Memory Script
RMAN-06135: error executing host command: Additional information: 256
Additional information: 11
从日志看,test表空间已经restore成功,辅组数据库也创建成功了,就是在最后export的时候出错。检查发现goldengate的表空间、数据文件都正常。ggs设置了同步ddl,好像和这个有关系。
换了ggs的目标端测试就没问题。
有谁遇到过?怎么解决?
goldengate的表空间、数据文件都正常,但是test的表空间是ofline的,数据文件需要recover,直接recove datafile 6不行:
RMAN> recover datafile 6;
Starting recover at 12-JAN-11
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=30 devtype=DISK
starting media recovery
media recovery failed
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 01/12/2011 13:46:22
ORA-00283: recovery session canceled due to errors
RMAN-11003: failure during parse/execution of SQL statement: alter database recover if neededdatafile 6
ORA-00283: recovery session canceled due to errors
ORA-19909: datafile 6 belongs to an orphan incarnation
ORA-01110: data file 6: '/u01/app/oracle/oradata/yssingle/test01.dbf'
必须restore datafile6;(test的数据文件),recove datafile6后才可以。