RMAN中CONVERT跨平臺傳輸資料庫時整庫轉換不通過的問題
今天在用RMANCONVERT做跨平臺傳輸資料時,到整庫轉換時怎麼也過不去,總是在做undotbs的備份時自動將資料庫shutdown
檢視了一下告警日誌如下:
Data in bad block:
type: 2 format: 2 rdba: 0x00806dc4
last change scn: 0x0000.00116ab5 seq: 0x75 flg: 0x04
spare1: 0x0 spare2: 0x0 spare3: 0x0
consistency value in tail: 0x00000000
check value in block header: 0xaf89
computed block checksum: 0x8f75
Hex dump of block from foreign database
Hex dump of (file 2, block 28101) in trace file /u01/app/oracle/admin/orcl/udump/orcl_ora_5317.trc
Corrupt block relative dba: 0x00806dc5 (file 2, block 28101)
Completely zero block found during reading datafile for conversion
Hex dump of block from foreign database
Hex dump of (file 2, block 28102) in trace file /u01/app/oracle/admin/orcl/udump/orcl_ora_5317.trc
Corrupt block relative dba: 0x00806dc6 (file 2, block 28102)
Completely zero block found during reading datafile for conversion
Hex dump of block from foreign databaseHex dump of (file 2, block 28103) in trace file /u01/app/oracle/admin/orcl/udump/orcl_ora_5317.trc
Corrupt block relative dba: 0x00806dc7 (file 2, block 28103)
Completely zero block found during reading datafile for conversionHex dump of block from foreign database
檢視了一下告警日誌如下:
Data in bad block:
type: 2 format: 2 rdba: 0x00806dc4
last change scn: 0x0000.00116ab5 seq: 0x75 flg: 0x04
spare1: 0x0 spare2: 0x0 spare3: 0x0
consistency value in tail: 0x00000000
check value in block header: 0xaf89
computed block checksum: 0x8f75
Hex dump of block from foreign database
Hex dump of (file 2, block 28101) in trace file /u01/app/oracle/admin/orcl/udump/orcl_ora_5317.trc
Corrupt block relative dba: 0x00806dc5 (file 2, block 28101)
Completely zero block found during reading datafile for conversion
Hex dump of block from foreign database
Hex dump of (file 2, block 28102) in trace file /u01/app/oracle/admin/orcl/udump/orcl_ora_5317.trc
Corrupt block relative dba: 0x00806dc6 (file 2, block 28102)
Completely zero block found during reading datafile for conversion
Hex dump of block from foreign databaseHex dump of (file 2, block 28103) in trace file /u01/app/oracle/admin/orcl/udump/orcl_ora_5317.trc
Corrupt block relative dba: 0x00806dc7 (file 2, block 28103)
Completely zero block found during reading datafile for conversionHex dump of block from foreign database
.
.
.
看這樣子是出現壞塊了,進入資料庫檢視一下:
SQL> select tablespace_name, segment_type, owner, segment_name, partition_name from dba_extents where file_id = 2 and 28081 between block_id and block_id + blocks - 1;
no rows selected
沒有查到這個壞塊資訊,去網上求救,據說出現這種問題是oracle10.2.0.1的一個bug,直接向在資料庫中新建立一個大表,向該大表中插入資料後刪除,目的是將出現的壞塊替換掉,照做了還是無法解決該問題
仔細看了下出錯資訊,進入資料庫檢視一下:
SQL> select file#,name from v$datafile;
FILE# NAME
--------- ---------------------------------------------
1 /u01/app/oracle/oradata/orcl/system01.dbf
3 /u01/app/oracle/oradata/orcl/sysaux01.dbf
4 /u01/app/oracle/oradata/orcl/users01.dbf
5 /u01/app/oracle/oradata/orcl/example01.dbf
6 /u01/app/oracle/oradata/orcl/tts01.dbf
7 /u01/app/oracle/oradata/orcl/tts02.dbf
8 /u01/app/oracle/oradata/orcl/undotbs001.dbf
file 2竟然是undo表空間中的一個資料檔案,清醒的是資料庫能正常開啟,重做一個undo表空間:
SQL> create undo tablespace undotbs
2 datafile '/u01/app/oracle/oradata/orcl/undotbs001.dbf' size 100m
3 /
Tablespace created.
SQL> alter system set undo_tablespace=undotbs ;
System altered.
SQL> drop tablespace undotbs1 including contents and datafiles;
Tablespace dropped.
SQL> select file_name,tablespace_name from dba_data_files;
FILE_NAME TABLESPACE_NAME
--------------------------------------------- ------------------------------
/u01/app/oracle/oradata/orcl/users01.dbf USERS
/u01/app/oracle/oradata/orcl/sysaux01.dbf SYSAUX
/u01/app/oracle/oradata/orcl/system01.dbf SYSTEM
/u01/app/oracle/oradata/orcl/example01.dbf EXAMPLE
/u01/tts_dir/tts02.dbf TTS_TEST
/u01/tts_dir/tts01.dbf TTS_TEST
/u01/app/oracle/oradata/orcl/undotbs001.dbf UNDOTBS
READ ONLY模式啟動資料庫
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup open read only;
ORACLE instance started.
Total System Global Area 167772160 bytes
Fixed Size 1218316 bytes
Variable Size 79694068 bytes
Database Buffers 83886080 bytes
Redo Buffers 2973696 bytes
Database mounted.
Database opened.
再次執行一次整庫轉換:
RMAN> convert database new database 'orcl2'
2> transport script '/u01/rman_convert/whole_db_script.sql'
3> to platform 'Linux IA (32-bit)'
4> db_file_name_convert '/u01/app/oracle/oradata/orcl' '/u01/app/oracle/oradata/orcl2'
5> ;
Starting convert at 09-APR-14
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=153 devtype=DISK
External table SH.SALES_TRANSACTIONS_EXT found in the database
Directory SYS.EXPDP_DIR2 found in the database
Directory SYS.EXPDP_DIR found in the database
Directory SYS.DATA_PUMP_DIR found in the database
Directory SYS.SUBDIR found in the database
Directory SYS.XMLDIR found in the database
Directory SYS.MEDIA_DIR found in the database
Directory SYS.LOG_FILE_DIR found in the database
Directory SYS.DATA_FILE_DIR found in the database
Directory SYS.WORK_DIR found in the database
Directory SYS.ADMIN_DIR found in the database
BFILE PM.PRINT_MEDIA found in the database
User SYS with SYSDBA and SYSOPER privilege found in password file
channel ORA_DISK_1: starting datafile conversion
input datafile fno=00001 name=/u01/app/oracle/oradata/orcl/system01.dbf
converted datafile=/u01/app/oracle/oradata/orcl2/system01.dbf
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:45
channel ORA_DISK_1: starting datafile conversion
input datafile fno=00003 name=/u01/app/oracle/oradata/orcl/sysaux01.dbf
converted datafile=/u01/app/oracle/oradata/orcl2/sysaux01.dbf
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting datafile conversion
input datafile fno=00004 name=/u01/app/oracle/oradata/orcl/users01.dbf
converted datafile=/u01/app/oracle/oradata/orcl2/users01.dbf
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting datafile conversion
input datafile fno=00005 name=/u01/app/oracle/oradata/orcl/example01.dbf
converted datafile=/u01/app/oracle/oradata/orcl2/example01.dbf
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting datafile conversion
input datafile fno=00008 name=/u01/app/oracle/oradata/orcl/undotbs001.dbf
converted datafile=/u01/app/oracle/oradata/orcl2/undotbs001.dbf
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting datafile conversion
input datafile fno=00006 name=/u01/app/oracle/oradata/orcl/tts01.dbf
converted datafile=/u01/app/oracle/oradata/orcl2/tts01.dbf
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting datafile conversion
input datafile fno=00007 name=/u01/app/oracle/oradata/orcl/tts02.dbf
converted datafile=/u01/app/oracle/oradata/orcl2/tts02.dbf
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:03
Run SQL script /u01/rman_convert/whole_db_script.sql on the target platform to create database
Edit init.ora file /u01/app/oracle/10.2.0/db_1/dbs/init_00p5aqna_1_0.ora. This PFILE will be used to create the database on the target platform
To recompile all PL/SQL modules, run utlirp.sql and utlrp.sql on the target platform
To change the internal database identifier, use DBNEWID Utility
Finished backup at 09-APR-14
轉換成功
.
.
看這樣子是出現壞塊了,進入資料庫檢視一下:
SQL> select tablespace_name, segment_type, owner, segment_name, partition_name from dba_extents where file_id = 2 and 28081 between block_id and block_id + blocks - 1;
no rows selected
沒有查到這個壞塊資訊,去網上求救,據說出現這種問題是oracle10.2.0.1的一個bug,直接向在資料庫中新建立一個大表,向該大表中插入資料後刪除,目的是將出現的壞塊替換掉,照做了還是無法解決該問題
仔細看了下出錯資訊,進入資料庫檢視一下:
SQL> select file#,name from v$datafile;
FILE# NAME
--------- ---------------------------------------------
1 /u01/app/oracle/oradata/orcl/system01.dbf
3 /u01/app/oracle/oradata/orcl/sysaux01.dbf
4 /u01/app/oracle/oradata/orcl/users01.dbf
5 /u01/app/oracle/oradata/orcl/example01.dbf
6 /u01/app/oracle/oradata/orcl/tts01.dbf
7 /u01/app/oracle/oradata/orcl/tts02.dbf
8 /u01/app/oracle/oradata/orcl/undotbs001.dbf
SQL> create undo tablespace undotbs
2 datafile '/u01/app/oracle/oradata/orcl/undotbs001.dbf' size 100m
3 /
Tablespace created.
SQL> alter system set undo_tablespace=undotbs ;
System altered.
SQL> drop tablespace undotbs1 including contents and datafiles;
Tablespace dropped.
FILE_NAME TABLESPACE_NAME
--------------------------------------------- ------------------------------
/u01/app/oracle/oradata/orcl/users01.dbf USERS
/u01/app/oracle/oradata/orcl/sysaux01.dbf SYSAUX
/u01/app/oracle/oradata/orcl/system01.dbf SYSTEM
/u01/app/oracle/oradata/orcl/example01.dbf EXAMPLE
/u01/tts_dir/tts02.dbf TTS_TEST
/u01/tts_dir/tts01.dbf TTS_TEST
/u01/app/oracle/oradata/orcl/undotbs001.dbf UNDOTBS
READ ONLY模式啟動資料庫
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup open read only;
ORACLE instance started.
Total System Global Area 167772160 bytes
Fixed Size 1218316 bytes
Variable Size 79694068 bytes
Database Buffers 83886080 bytes
Redo Buffers 2973696 bytes
Database mounted.
Database opened.
RMAN> convert database new database 'orcl2'
2> transport script '/u01/rman_convert/whole_db_script.sql'
3> to platform 'Linux IA (32-bit)'
4> db_file_name_convert '/u01/app/oracle/oradata/orcl' '/u01/app/oracle/oradata/orcl2'
5> ;
Starting convert at 09-APR-14
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=153 devtype=DISK
External table SH.SALES_TRANSACTIONS_EXT found in the database
Directory SYS.EXPDP_DIR2 found in the database
Directory SYS.EXPDP_DIR found in the database
Directory SYS.DATA_PUMP_DIR found in the database
Directory SYS.SUBDIR found in the database
Directory SYS.XMLDIR found in the database
Directory SYS.MEDIA_DIR found in the database
Directory SYS.LOG_FILE_DIR found in the database
Directory SYS.DATA_FILE_DIR found in the database
Directory SYS.WORK_DIR found in the database
Directory SYS.ADMIN_DIR found in the database
BFILE PM.PRINT_MEDIA found in the database
User SYS with SYSDBA and SYSOPER privilege found in password file
channel ORA_DISK_1: starting datafile conversion
input datafile fno=00001 name=/u01/app/oracle/oradata/orcl/system01.dbf
converted datafile=/u01/app/oracle/oradata/orcl2/system01.dbf
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:45
channel ORA_DISK_1: starting datafile conversion
input datafile fno=00003 name=/u01/app/oracle/oradata/orcl/sysaux01.dbf
converted datafile=/u01/app/oracle/oradata/orcl2/sysaux01.dbf
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting datafile conversion
input datafile fno=00004 name=/u01/app/oracle/oradata/orcl/users01.dbf
converted datafile=/u01/app/oracle/oradata/orcl2/users01.dbf
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting datafile conversion
input datafile fno=00005 name=/u01/app/oracle/oradata/orcl/example01.dbf
converted datafile=/u01/app/oracle/oradata/orcl2/example01.dbf
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting datafile conversion
input datafile fno=00008 name=/u01/app/oracle/oradata/orcl/undotbs001.dbf
converted datafile=/u01/app/oracle/oradata/orcl2/undotbs001.dbf
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting datafile conversion
input datafile fno=00006 name=/u01/app/oracle/oradata/orcl/tts01.dbf
converted datafile=/u01/app/oracle/oradata/orcl2/tts01.dbf
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting datafile conversion
input datafile fno=00007 name=/u01/app/oracle/oradata/orcl/tts02.dbf
converted datafile=/u01/app/oracle/oradata/orcl2/tts02.dbf
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:03
Run SQL script /u01/rman_convert/whole_db_script.sql on the target platform to create database
Edit init.ora file /u01/app/oracle/10.2.0/db_1/dbs/init_00p5aqna_1_0.ora. This PFILE will be used to create the database on the target platform
To recompile all PL/SQL modules, run utlirp.sql and utlrp.sql on the target platform
To change the internal database identifier, use DBNEWID Utility
Finished backup at 09-APR-14
轉換成功
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29320885/viewspace-1138936/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- RMAN跨平臺傳輸資料庫和表空間資料庫
- RMAN跨平臺可傳輸表空間和資料庫資料庫
- 利用可傳輸表空間跨平臺遷移 -RMAN CONVERT
- 利用RMAN跨平臺遷移資料庫資料庫
- RMAN同位元組序跨平臺跨版本遷移資料庫資料庫
- RMAN之CONVERT整庫遷移
- 利用RMAN Convert database特性進行跨平臺遷移資料Database
- RMAN同位元組序跨平臺跨版本遷移資料庫(一)資料庫
- RMAN同位元組序跨平臺跨版本遷移資料庫(二)資料庫
- rman將linux平臺資料庫遷移到window平臺資料庫Linux資料庫
- hp-ux利用rman將資料庫跨平臺遷移到aix平臺上UX資料庫AI
- RMAN跨平臺傳輸表空間(different Endian)
- RMAN跨平臺傳輸表空間(same endian)
- 從資料庫裡取值時遇到的換行問題(轉)資料庫
- 應用RMAN Transportable Database進行資料庫跨平臺遷移Database資料庫
- 資料庫中跨平臺遷移方法介紹資料庫
- RMAN跨小版本跨平臺與位元組序傳輸表空間
- Oracle資料庫同平臺與異構平臺下的表空間傳輸Oracle資料庫
- SQL Server資料庫中的資料型別隱式轉換問題SQLServer資料庫資料型別
- 跨平臺遷移oracle資料庫指南Oracle資料庫
- 跨平臺資料庫 Realm 整合實踐資料庫
- 傳輸表空間(TTS) - 不同位元組序平臺 RMAN Convert - 1TTS
- 傳輸表空間(TTS) - 不同位元組序平臺 RMAN Convert - 2TTS
- 使用JFS2,GPFS 跨平臺遷移: AIX ASM 到Linux ASM系統的傳輸及轉換(Convert) - 2AIASMLinux
- 使用JFS2,GPFS 跨平臺遷移: AIX ASM 到Linux ASM系統的傳輸及轉換(Convert) - 1AIASMLinux
- Oracle資料庫中convert()函式,在瀚高資料庫中如何替換使用?Oracle資料庫函式
- 用傳輸表空間跨平臺遷移資料
- ORACLE資料庫中SCN與時間的轉換Oracle資料庫
- 利用rman來實現linux平臺資料庫複製到windows平臺資料庫Linux資料庫Windows
- 通過RMAN的Transportable平臺間轉移資料
- 【資料遷移】XTTS跨平臺傳輸表空間v3(2.RMAN增量)TTS
- Mysql多臺資料庫同步問題(轉)MySql資料庫
- long資料型別跨平臺問題資料型別
- Oracle 12C 跨網路傳輸資料庫Oracle資料庫
- 大型資料庫跨平臺遷移總結資料庫
- 使用RMAN完成跨平臺資料遷移
- rman進行跨平臺資料遷移
- Realm,一個跨平臺、高效能的資料庫資料庫