为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。
【DM版本】:
【操作系统】:
【CPU】:
【问题描述】*:
1、源库统计的对象数量
其中表数量1173个
select object_type,count(*) from all_objects where owner='TOPICPSP' group by object_type order by 1;
行号 OBJECT_TYPE COUNT(*)
---------- ------------- --------------------
1 CONSTRAINT 178
2 CONTEXT INDEX 1
3 INDEX 1346
4 SCH 1
5 SEQUENCE 9
6 TABLE 1173
6 rows got
2、DTS界面显示表的数量是1169个
差的那4张表,怎么查呢?
有几个方式可以比对

方式1:通过DTS的数据比对功能快速比对表差异
方式2:创建移植辅助表,统计指定用户下所有的对象并插入到辅助表中,迁移到DM数据库后统计所有的进行比对差异
--根据指定用户统计用户下的各对象类型和数目 select object_type,count(*) from all_objects where owner='OA8000_DM2015' group by object_type; --创建移植辅助表,统计指定用户下所有的对象并插入到辅助表中 create table oracle_objects(obj_owner varchar(100),obj_name varchar(100),obj_type varchar(50)); insert into oracle_objects select owner,object_name,object_type from all_objects where owner='TEST'; select * from oracle_objects; --创建移植辅助表,统计每个表的数据量并插入到移植辅助表中 CREATE TABLE oracle_tables ( tab_owner VARCHAR ( 100 ), tab_name VARCHAR ( 100 ), tab_count int ); BEGIN FOR rec IN ( SELECT owner, object_name FROM all_objects WHERE owner = 'ITPUX' AND object_type = 'TABLE' ) loop BEGIN execute IMMEDIATE 'insert into oracle_tables select ''' || rec.owner || ''',''' || rec.object_name || ''',count(*) from ' || rec.owner || '.' || rec.object_name; EXCEPTION WHEN others THEN dbms_output.put_line ( rec.owner || '.' || rec.object_name || 'get count error' ); END; END loop; END; select * from oracle_tables;