本帖最后由 郑全 于 2023-2-10 00:10 编辑
如题,
我们很多时候,希望把数据库ORACLE从WINDOWS使用增量的方式迁移到LINUX,想法很好,减少停机时间,但有一个不好的消息, 从11.2.0.2开始,不允许这样操作,RESTORE没有问题,但在RECOVER恢复时,会报:
ORA-00600: internal error code, arguments: [4502], [0], [], [], [], [], [],[], [], [], [], []
更多的信息如下:Restoring backup of database created and running on 64-bit Windows 2008R2 to Oracle Linux 6 x86-64 using RMAN failed.
Restore of controlfile is successful.
Database change to mount mode is successful.
Restore of datafiles is successful.
When RMAN tries to recover database using archivelogs, it fails with error:
channel ORA_SBT_TAPE_2: restore complete, elapsed time: 00:00:01
archived log file name=+<diskgroup name>/archivelog/2015_04_23/thread_2_seq_2365.359.877785237 thread=2 sequence=2365
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 04/23/2015 13:14:00
RMAN-11003: failure during parse/execution of SQL statement: alter database recover logfile '+<diskgroup name>/archivelog/2015_04_23/thread_2_seq_2365.359.877785237'
ORA-10562: Error occurred while applying redo to data block (file# 3, block# 1342351)
ORA-10564: tablespace SYSAUX
ORA-01110: data file 3: '+<diskgroup name>/datafile/sysaux.417.877785187'
ORA-10561: block type 'TRANSACTION MANAGED INDEX BLOCK', data object# 475230
ORA-00600: internal error code, arguments: [ktbair2_0], [18446744073709550383], [112], [], [], [], [], [], [], [], [], []
该问题可以参考:Doc ID 2003327.1
解决办法: 不要使用增量恢复,使用全量,或者使用DG的方式来迁移。
使用全量方法如下:
windows 端:SQL>Shutdown immediate ;
SQL>Startup mount ;
RMAN> backup database format 'D:\BAK\full_%U'; ----Full backup
RMAN> backup current controlfile format 'd:\bak\control_%U'; --Controlfile backup
linux 端:
RMAN> restore controlfile from '<backup location>/CONTROL_A7R4O1B4_1_1';
RMAN> sql 'alter database mount';
RMAN> crosscheck backup;
RMAN> delete expired backup;
RMAN> catalog backuppiece '<backup location>/FULL_*****0_1_1';
RMAN> run {
set newname for database to '/u01/oradata/ORCL/datafile_%U';
restore database;
}
RMAN> switch database to copy;
SQL> alter database open resetlogs;
!!!核心内容是一致性关库,mount状态进行备份! 目标端resetlogs open打开db,会对日志文件重新格式化
恢复步骤,可以参见:Doc ID 2143991.1
|