1

I am working on a project where I need to programmatically validate and/or compare a database schema between product releases.

I am using Perl and am looking for a cross-platform method to collect the database schema. I am currently able to perform database queries by utilizing the dbisql.exe command and then parsing the results.

I am wondering if there is potentially a stored procedure or set of queries that I can run to collect the database schema.

It appears that the dbunload.exe command could be used to generate a SQL regeneration script however I am thinking that this output may be difficult to parse.

Any feedback would be greatly appreciated.

Danny Beckett
  • 20,529
  • 24
  • 107
  • 134
Brad Krusemark
  • 503
  • 1
  • 4
  • 10
  • 1
    Try the [SQL Anywhere forums](http://sqlanywhere-forum.sybase.com/) for your answer. It's a StackExchange clone, just for SQL Anywhere. – Jonathan B Mar 21 '12 at 09:48

2 Answers2

0

If you would like to retrieve the DB schema data on a really low level you could query the corresponding system tables. They are in the SYS-Namespace, especially SYSTABLE (for all tables) and SYSCOLUMN for all fields in those tables.

Check the ASA SQL Reference Handbook for the schema of those system tables.

With Perl's DBI you can easily fire queries on those tables. But you will have to create some local storage for the schema to compare the query results with.

Oliver Jakoubek
  • 416
  • 1
  • 3
  • 6
0

Sybase Central v3.0 has the possibility to export DDL with all DB objects; and I think SC v6.0 can't connect to ASA 11 :(

Menefee
  • 1,475
  • 1
  • 17
  • 26
Augustas
  • 1,167
  • 21
  • 31