Showing results for 
Search instead for 
Did you mean: 

Compare database

Former Member
0 Kudos


I'm trying to compare 2 SA12 databases in Sybase Central using "Tools - SQL Anywhere 12 - Compare databases...".

Both databases are quite small (< 100 Mb), almost no data.

DB1 is an old ASA9 which has been upgraded to SA12 using unload/reaload and "Upgrade database".

DB2 is a SA12 from the start.

It's a lot of similarities in the databases, but I think there are a few missing tables, FK's, triggers and such in DB1.

Therefore I'm trying to compare them so that I can get at sql-file to make them identical.

But it looks like the compare-function never gets finished.

I started it on friday afternoon, and it was still running this morning. So I cancelled the job.

When comparing 2 small databases like this, I think something is wrong?

Or is it supposed to take this long?

I've installed the latest EBF (4104), and started the compare once again.

Is this the best way to compare the databases?

Is there perhaps a commandline I can use?


Bjarne Anker

Maritech Systems


View Entire Topic
0 Kudos

No, it should not take that long.

Perhaps it is the unload that is failing. To compare the databases, Sybase Central unloads the databases and then compares the reload scripts.

Please try unloading each database using the following command:

    dbunload -q -qr -m -n -y -r <reload-filename> -c "<connection-string>;charset=UTF-8"

(replace <reload-filename> with any filename, and ensure that "charset=UTF-8" is included in the connection string.)

I'm curious to know if either of the unload operations fail.

Currently, there is no command-line support for database comparison.

Richard Jones

Former Member
0 Kudos

Hi Richards, and thanks for the reply.

Unload of both databases takes approx 10-15 secs each, and creates the files without any error.

The script for the original database is 4.7 Mb, and the script for the new database is 2.01 Mb.

So it's a fairly small amount of data and objects.

Is there anything more I can try?

Is it any point in installing SA16, and try the compare there?

Bjarne Anker

0 Kudos

I would use PowerDesigner (Physical Model) which come bundled with SQL Anywhere as part of the Developer Tools package (or CD). It reads the database structure to generate a model, which can be compared to another model reengineered the same way from another database. You may then generate a script to apply the appropriate modification to the target database.

But of cause you'll have to install the product and figure out how to do that task, so it may not be worth the effort if it's one time only.

Data Architecture &amp; Modeling PowerDesigner | Technology |SAP | SAP

0 Kudos

Yes, I would try version 16. Version 16 implements a few enhancements that reduce the time and space requirements for the reload script comparison. I've seen issues similar to yours before with version 12--where the unload is successful but the comparison is not--and all such these issues have been addressed by version 16.