Hi Luishmr,
This problem happens when all of the following are true:
- You are comparing Tables, Views, or MViews
- The primary key of the table contains a mix of VARCHAR2 and non-varchar2 datatypes.
- The tables are in different databases and you are not using a DB Link in the comparison
So, if you already have or can create a DB Link from one of the databases to the other, you can work around it like this:
If you are not able to create a DB Link, and you want to just do a compare, but not a SYNC, you can compare queries instead of tables:
This bug was introduced by a mistake that I made while fixing the bug reported here.
If you turn on spool sql, you'll see that we are using this order by, which is correct, to query one of the tables:
Order by CD_RELAT_CONFIG, NLSSORT(NM_LABEL, 'NLS_SORT = BINARY'), NLSSORT(TP_PARAMETRO, 'NLS_SORT = BINARY');
and this order by, which is incorrect, to query the other table:
Order by NLSSORT(CD_RELAT_CONFIG, 'NLS_SORT = BINARY'), NLSSORT(NM_LABEL, 'NLS_SORT = BINARY'), NLSSORT(TP_PARAMETRO, 'NLS_SORT = BINARY');
The different-connection comparison code is expecting these tables to be fetched with the same order by, and this is what's causing the problem.
As you noted the bug exists in Toad 2025 R3, but not 2025 R1. Just FYI, it does not exist in 2025 R2.
This will be fixed in the next beta.
-John

