<< 返回文章列表

跨平台版本迁移之 XTTS 方案操作指南(4)

2018年4月23日
罗贵林
2976

8、XTTS 迁移测试耗时(20T)



9XTTS 迁移测试问题记录


expdp \'/ as sysdba\'  directory=xtts dumpfile=expdp_LUOKLE_meta0822.dmp logfile=expdp_LUOKLE_meta0822.log CONTENT=metadata_only SCHEMAS=LUOKLE  15:06 开始到出

 

ORA-39014: One or more workers have prematurely exited.

ORA-39029: worker 1 with process name "DW00" prematurely terminated

ORA-31671: Worker process DW00 had an unhandled exception.

ORA-04030: out of process memory when trying to allocate 3704 bytes (kkoutlCreatePh,kkotbi : kkotbal)

ORA-06512: at "SYS.KUPW$WORKER", line 1887

ORA-06512: at line 2


在做元数据导出时候后台报大量 ORA-04030 错误,经过分析为 AMM 问题,通过关闭 AMM 手工管理内存解决。


10g 的 sga_target 设置为0

 

Errors in file /oracle/app/oracle/diag/rdbms/LUOKLE/orcl1/trace/orcl1_ora_13107324.trc  (incident=28001):

 ORA-04030: out of process memory when trying to allocate 32808 bytes (TCHK^cadd45dc,kggec.c.kggfa)


经过分析发现 AIX stack 设置偏小导致,修改限制解决。

 

ERROR IN CONVERSION ORA-19624: operation failed, retry possible

ORA-19505:

failed to identify file "/aix_xtts/oradata2/f8rdl6vi_1_1"

ORA-27037: unable to

obtain file status

Linux-x86_64 Error: 2: No such file or directory

Additional

information: 3

ORA-19600: input file is backup piece

(/aix_xtts/oradata2/f8rdl6vi_1_1)

ORA-19601: output file is backup piece

(/aix_xtts/incr/xib_f8rdl6vi_1_1_6_8_10_12_14_16_18_20_22_)

CONVERTED BACKUP PIECE/aix_xtts/incr/xib_f8rdl6vi_1_1_6_8_10_12_14_16_18_20_22_

 

PL/SQL procedure successfully completed.

ERROR IN CONVERSION ORA-19624: operation failed, retry possible

ORA-19505:

failed to identify file "/aix_xtts/oradata2/f9rdl70m_1_1"

ORA-27037: unable to

obtain file status

Linux-x86_64 Error: 2: No such file or directory

Additional

information: 3

ORA-19600: input file is backup piece

(/aix_xtts/oradata2/f9rdl70m_1_1)

ORA-19601: output file is backup piece

(/aix_xtts/incr/xib_f9rdl70m_1_1_7_9_11_13_15_17_19_21_23_)

CONVERTED BACKUP PIECE/aix_xtts/incr/xib_f9rdl70m_1_1_7_9_11_13_15_17_19_21_23_


经过分析发现增量备份没有放在对应目录导致。

 

failed to create file

"/xtts/incr/xib_f9rdl70m_1_1_7_9_11_13_15_17_19_21_23_"

ORA-27040: file create

error, unable to create file

Linux-x86_64 Error: 13: Permission

denied

Additional information: 1

ORA-19600: input file is backup piece

(/xtts/oradata2/f9rdl70m_1_1)

ORA-19601: output file is backup piece

(/xtts/incr/xib_f9rdl70m_1_1_7_9_11_13_15_17_19_21_23_)

CONVERTED BACKUP PIECE/xtts/incr/xib_f9rdl70m_1_1_7_9_11_13_15_17_19_21_23_

 

PL/SQL procedure successfully completed.

ERROR IN CONVERSION ORA-19624: operation failed, retry possible

ORA-19504:

failed to create file

"/xtts/incr/xib_f8rdl6vi_1_1_6_8_10_12_14_16_18_20_22_"

ORA-27040: file create

error, unable to create file

Linux-x86_64 Error: 13: Permission

denied

Additional information: 1

ORA-19600: input file is backup piece

(/xtts/oradata2/f8rdl6vi_1_1)

ORA-19601: output file is backup piece

(/xtts/incr/xib_f8rdl6vi_1_1_6_8_10_12_14_16_18_20_22_)

CONVERTED BACKUP PIECE/xtts/incr/xib_f8rdl6vi_1_1_6_8_10_12_14_16_18_20_22_


NFS 目录权限问题导致不行读写,修改权限解决。

 

NFS 问题:

mount: 1831-008 giving up on:

192.168.1.100:/xtts

vmount: Operation not permitted.

# nfso -p -o nfs_use_reserved_ports=1

Setting nfs_use_reserved_ports to 1

Setting nfs_use_reserved_ports to 1 in nextboot file

# mount -o cio,rw,bg,hard,nointr,rsize=32768,wsize=32768,proto=tcp,noac,vers=3,timeo=600 10.20.28.21:/xtts /aix_xtts


10总结


 XTTS 支持跨平台跨版本迁移,操作起来比较方便,由于停机时间较短,可以较轻松完成迁移工作,在大数据量的跨平台跨版本迁移场景中,建议作为首选方案。

 

建议在做 XTTS 迁移的时候减少批次,批次越多,增量备份的数据越少,数据越少,最后停机时间越短,但是这个过程如果做太多就越容易出错。一般使用一次增量备份再做一次正式迁移,甚至初始化后直接做正式迁移。


11附录 - xttdriver.pl 脚本使用说明



详见:11G - Reduce Transportable Tablespace Downtime using Cross Platform Incremental Backup (文档 ID 1389592.1)

Description of Perl Script xttdriver.pl Options


The following table describes the options available for the main supporting script xttdriver.pl.


Option

Description

-S prepare source for transfer

-S option is used only when Prepare phase method is dbms_file_transfer.

Prepare step is run once on the source system during Phase 2A with the environment (ORACLE_HOME and ORACLE_SID) set to the source database.  This step creates files xttnewdatafiles.txt and getfile.sql.

-G get datafiles from source

-G option is used only when Prepare phase method is dbms_file_transfer.

Get datafiles step is run once on the destination system during Phase 2A with the environment (ORACLE_HOME and ORACLE_SID) set to the destination database.  The -S option must be run beforehand and files xttnewdatafiles.txt and getfile.sql transferred to the destination system.

This option connects to the destination database and runs script getfile.sql.  getfile.sql invokes dbms_file_transfer.get_file() subprogram for each datafile to transfer it from the source database directory object (defined by parameter srcdir) to the destination database directory object (defined by parameter dstdir) over a database link (defined by parameter srclink).

-p prepare source for backup

-p option is used only when Prepare phase method is RMAN backup.

Prepare step is run once on the source system during Phase 2B with the environment (ORACLE_HOME and ORACLE_SID) set to the source database.

This step connects to the source database and runs the xttpreparesrc.sql script once for each tablespace to be transported, as configured in xtt.properties.  xttpreparesrc.sql does the following:

1. Verifies the tablespace is online, in READ WRITE mode, and contains no offline datafiles.

2. Identifies the SCN that will be used for the first iteration of the incremental backup step and writes it into file $TMPDIR/xttplan.txt.

3. Creates the initial datafile copies on the destination system in the location specified by the parameter dfcopydir set in xtt.properties.  These datafile copies must be transferred manually to the destination system.

4. Creates RMAN script $TMPDIR/rmanconvert.cmd that will be used to convert the datafile copies to the required endian format on the destination system.

-c convert datafiles

-c option is used only when Prepare phase method is RMAN backup.

Convert datafiles step is run once on the destination system during Phase 2B with the environment (ORACLE_HOME and ORACLE_SID) set to the destination database.

This step uses the rmanconvert.cmd file created in the Prepare step to convert the datafile copies to the proper endian format.  Converted datafile copies are written on the destination system to the location specified by the parameter storageondest set in xtt.properties.

-i create incremental

Create incremental step is run one or more times on the source system with the environment (ORACLE_HOME and ORACLE_SID) set to the source database.

This step reads the SCNs listed in $TMPDIR/xttplan.txt and generates an incremental backup that will be used to roll forward the datafile copies on the destination system.

-r rollforward datafiles

Rollforward datafiles step is run once for every incremental backup created with the environment (ORACLE_HOME and ORACLE_SID) set to the destination database.

This step connects to the incremental convert instance using the parameters cnvinst_home and cnvinst_sid, converts the incremental backup pieces created by the Create Incremental step, then connects to the destination database and rolls forward the datafile copies by applying the incremental for each tablespace being transported.

-s determine new FROM_SCN

Determine new FROM_SCN step is run one or more times with the environment (ORACLE_HOME and ORACLE_SID) set to the source database.
This step calculates the next FROM_SCN, records it in the file xttplan.txt, then uses that SCN when the next incremental backup is created in step 3.1. It reports the mapping of the new FROM_SCN to wall clock time to indicate how far behind the changes in the next incremental backup will be.

-e generate Data Pump TTS command

Generate Data Pump TTS command step is run once on the destination system with the environment (ORACLE_HOME and ORACLE_SID) set to the destination database.

This step creates the template of a Data Pump Import command that uses a network_link to import metadata of objects that are in the tablespaces being transported.

-d debug

-d option enables debug mode for xttdriver.pl and RMAN commands it executes.  Debug mode can also be enabled by setting environment variable XTTDEBUG=1.


资源下载

关注公众号:数据和云(OraNews)回复关键字获取

‘2017DTC’,2017 DTC 大会 PPT

‘DBALIFE’,“DBA 的一天”海报

‘DBA04’,DBA 手记4 经典篇章电子书

‘RACV1’, RAC 系列课程视频及 PPT

‘122ARCH’,Oracle 12.2 体系结构图

‘2017OOW’,Oracle OpenWorld 资料

‘PRELECTION’,大讲堂讲师课程资料