I'm looking for a command line tool to generate DDL for both tables and indexes (nothing more complicated is needed) for some sybase tables in databases I take care of. I have access to gui tools for viewing at individual DDLs, and I could cut and paste them, but I want something that will go through all the tables in a datbase and generate some nice text files that I can get checked into cvs.
I tried using a tool called ddlgen, which was provided by Sybase, but it just threw exceptions like: bash-3.00# ./ddlgen -SdatabaseServer:4100 -Uusername -PsecretPassword -TDB -NdatabaseName U64: null: databaseName.dbo.firstTable U64: null: databaseName.dbo.firstTable at com.sybase.ddlgen.container.UserTableContainer.getDependentDDL(UserTableContainer.java:1065) at com.sybase.ddlgen.container.UserTableContainer.open(UserTableContainer.java:1364) at com.sybase.ddlgen.container.UserTableMetaContainer.open(UserTableMetaContainer.java:94) at com.sybase.ddlgen.container.DDLBaseContainer.load(DDLBaseContainer.java:76) at com.sybase.ddlgen.container.DatabaseContainer.addChildren(DatabaseContainer.java:552) at com.sybase.ddlgen.container.DatabaseContainer.open(DatabaseContainer.java:104) at com.sybase.ddlgen.container.DatabaseMetaContainer.open(DatabaseMetaContainer.java:114) at com.sybase.ddlgen.DDLThread.run(DDLThread.java:89)
which wasn't very helpful. I keep thinking that there must be a nice perlish way to do this, but I don't know what. it is.
...thanks