环境:
Oracle 11.2.0.4
Ogg 11.2.1.0.24
某公司业务oracle数据库从10.2.0.5升级到11.2.0.4,ogg进行重新初始化,ogg新版本为11.2.1.0.24,ogg开启了ddl
在初始化过程中复制进程异常中断,报如下错误:
ERROR OGG-00519 Fatal error executing DDL replication: error [Error code [10655], ORA-10655: Segment can be shrunk SQL alter table PSDSS
_MID."MID_AO_CUST_INFO" shrink space CHECK /* GOLDENGATE_DDL_REPLICATION */], no error handler present.
分析问题
在源端查看相应的抽取语句:
select * from GGS_DDL_HIST where OPTIME>='2014-12-27 00:00:00' AND metadata_text like '%shrink space%CHECK%'
METADATA_TEXT结果如下:
,G1='alter table "SGDC_PMS_XD"."EQU_SD_WLGT" shrink space CHECK ',
手动在源端数据库执行该命令,首先会提示你开启行迁移
SQL> alter table sgdc_pms_xd.equ_sd_wlgt shrink space CHECK;
alter table sgdc_pms_xd.equ_sd_wlgt shrink space CHECK
*
ERROR at line 1:
ORA-10636: ROW MOVEMENT is not enabled
SQL> alter table sgdc_pms_xd.equ_sd_wlgt enable row movement;
Table altered.
SQL> alter table sgdc_pms_xd.equ_sd_wlgt shrink space CHECK;
alter table sgdc_pms_xd.equ_sd_wlgt shrink space CHECK
*
ERROR at line 1:
ORA-10655: Segment can be shrunk ----在这里oracle会抛出一个ORA错误,实际上这并不是一个错误
SQL> alter table sgdc_pms_xd.equ_sd_wlgt disable row movement;
Table altered.
这一系列的命令由oracle段顾问(segment adviosr)任务来完成的
This is INTERNAL ONLY research. No action should be taken by the customer on this information. This is research only, and may NOT be applicable to your specific situation.
查看MOS文档,有关于shrunk space check的解释:
What is the Meaning of SHRINK SPACE CHECK? ( Doc ID 1132163.1 )
关联文档:
SEGMENT SHRINK and Details. ( Doc ID 242090.1 )
10g and above SEGMENT ADVISOR ( Doc ID 242736.1 )
总结:
这相对于是一个oracle数据库和ogg软件接口层的bug,没能自动忽略该报错。有3中方法可以避免该错误导致的进程异常中断:
1、关闭源端数据库segment adviosr任务,建议不要使用这种方法
BEGIN
dbms_auto_task_admin.enable(
client_name => 'auto space advisor',
peration => NULL,
window_name => NULL);
END;
/
2、源端规避抽取alter ... shrink space check操作
在抽取进程中添加:
EXCLUDE INSTR 'shrink space CHECK' &
3、在目标端复制进程忽略该报错
DDLERROR 10655 IGNORE
Oracle 11.2.0.4
Ogg 11.2.1.0.24
某公司业务oracle数据库从10.2.0.5升级到11.2.0.4,ogg进行重新初始化,ogg新版本为11.2.1.0.24,ogg开启了ddl
在初始化过程中复制进程异常中断,报如下错误:
ERROR OGG-00519 Fatal error executing DDL replication: error [Error code [10655], ORA-10655: Segment can be shrunk SQL alter table PSDSS
_MID."MID_AO_CUST_INFO" shrink space CHECK /* GOLDENGATE_DDL_REPLICATION */], no error handler present.
分析问题
在源端查看相应的抽取语句:
select * from GGS_DDL_HIST where OPTIME>='2014-12-27 00:00:00' AND metadata_text like '%shrink space%CHECK%'
METADATA_TEXT结果如下:
,G1='alter table "SGDC_PMS_XD"."EQU_SD_WLGT" shrink space CHECK ',
手动在源端数据库执行该命令,首先会提示你开启行迁移
SQL> alter table sgdc_pms_xd.equ_sd_wlgt shrink space CHECK;
alter table sgdc_pms_xd.equ_sd_wlgt shrink space CHECK
*
ERROR at line 1:
ORA-10636: ROW MOVEMENT is not enabled
SQL> alter table sgdc_pms_xd.equ_sd_wlgt enable row movement;
Table altered.
SQL> alter table sgdc_pms_xd.equ_sd_wlgt shrink space CHECK;
alter table sgdc_pms_xd.equ_sd_wlgt shrink space CHECK
*
ERROR at line 1:
ORA-10655: Segment can be shrunk ----在这里oracle会抛出一个ORA错误,实际上这并不是一个错误
SQL> alter table sgdc_pms_xd.equ_sd_wlgt disable row movement;
Table altered.
这一系列的命令由oracle段顾问(segment adviosr)任务来完成的
This is INTERNAL ONLY research. No action should be taken by the customer on this information. This is research only, and may NOT be applicable to your specific situation.
查看MOS文档,有关于shrunk space check的解释:
What is the Meaning of SHRINK SPACE CHECK? ( Doc ID 1132163.1 )
关联文档:
SEGMENT SHRINK and Details. ( Doc ID 242090.1 )
10g and above SEGMENT ADVISOR ( Doc ID 242736.1 )
总结:
这相对于是一个oracle数据库和ogg软件接口层的bug,没能自动忽略该报错。有3中方法可以避免该错误导致的进程异常中断:
1、关闭源端数据库segment adviosr任务,建议不要使用这种方法
BEGIN
dbms_auto_task_admin.enable(
client_name => 'auto space advisor',
peration => NULL,
window_name => NULL);
END;
/
2、源端规避抽取alter ... shrink space check操作
在抽取进程中添加:
EXCLUDE INSTR 'shrink space CHECK' &
3、在目标端复制进程忽略该报错
DDLERROR 10655 IGNORE
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29953799/viewspace-1432957/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/29953799/viewspace-1432957/