The DBMS_COMPARISON.CREATE_COMPARISON Fails With ORA-44004 Even Though The Object Name Provided Is a Valid One (Doc ID 1353100.1)

Last updated on AUGUST 29, 2011

Applies to:

Oracle Server - Enterprise Edition - Version: 11.1.0.6 to 11.2.0.2 - Release: 11.1 to 11.2
Information in this document applies to any platform.

Symptoms

When using DBMS_COMPARISON.CREATE_COMPARISON for an object (schema or table) which has special characters like '/' for example, the procedure will fail with following errors:

-- Note: This is simple test-case to demonstrate the problem.
 
$ sqlplus /nolog

conn / as sysdba

grant dba to schema1 identified by testcase;
grant dba to schema2 identified by testcase;

create table schema1."/SAPSLL/CUHD" (col1 number(2) primary key);
create table schema2."/SAPSLL/CUHD" (col1 number(2) primary key);

BEGIN
 DBMS_COMPARISON.CREATE_COMPARISON  (
 comparison_name => 'compare_CUHD_table'  ,
 schema_name     => 'schema1'  ,
 object_name     => '"/SAPSLL/CUHD"'  ,
 dblink_name     => null  ,
 remote_schema_name=>'schema2'  ,
 remote_object_name=> '"/SAPSLL/CUHD"',
 column_list => '*');
END;
/

ORA-44004: invalid qualified SQL name
ORA-06512: at "SYS.DBMS_ASSERT", line 188
ORA-06512: at "SYS.DBMS_COMPARISON", line 404

Changes

Using tables with special characters.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms