Forum Stats

  • 3,854,635 Users
  • 2,264,392 Discussions
  • 7,905,744 Comments

Discussions

Database Diff unable to compare package with special characters inside

Lukas Horwath
Lukas Horwath Member Posts: 18 Red Ribbon
edited May 1, 2019 3:07PM in SQL Developer

Could you please check the following issue with the Database Diff tool, I have sometimes problems with comparing two schemas and it gives me sometimes the message „Unable to compare objects….“ and I think I can replicate it  now. It occurs only with one package when there are differences within the packages, when there is no diff, then it seems to work.

Steps to replicate, compile this code in two different databases, same schema name (but works also within one database with two different schemas with „consolidate“):

create or replace package diffme as

--  '0123456789 ~!@#$%^&amp;*()_+=-`{}[]|\?><,./"''',

end diffme;

/

My diff settings:

pastedImage_0.pngpastedImage_1.pngpastedImage_2.png

Now change the code in source destination:

create or replace package diffme as

-- diff

--  '0123456789 ~!@#$%^&amp;*()_+=-`{}[]|\?><,./"''',

end diffme;

/

And you should get this:

pastedImage_1.png

Next remove the character > and the diff works:

pastedImage_4.png

In the logging page I can see that you are using dbms_metadata.get_xml, maybe there is an issue there?

When I call get_xml this line of code is:

<SOURCE>-- &apos;0123456789 ~!@#$%^&amp;amp;*()_+=-`{}[]|\?&gt;&lt;,./&quot;&apos;&apos;&apos;,

</SOURCE>

I’m using SQL Developer Version 19.1.0.094 Build 094.2042, but should be independent and works with older versions.

Thanks,

Lukas

Answers