We are working with Sybase
database. We are using Sybase ASE 15.5
version on Windows 7 machine and we have created one sample java program that connect with Sybase
using jdbc : com.sybase.jdbc4.jdbc.SybDataSource
. We are able to connect and run query on sybase database.
Our requirement is to generate DDL statements
: create table scripts
, indexes
, stored procedure
, triggers
, synonyms
, functions
etc. We want to generate SQL script
on all database objects.
We have tried to extract using sysobjects
and syscolumns
as per suggestion give here but that only produce table names user table and system tables from : SELECT * FROM sysobjects WHERE type = 'U'
.
On researching over reverse engineer sybase using schemaspy tool that visualize the relationship between tables/views. But that of no use, we need script having ddl commands.
On exploring more found that ddlgen extracts all sorts of DDL statements (tables, indexes, etc.), how can I extract these statement in my java program using ddlgen?
OR can there be any other solution that will help us to extract ddl of a sybase database like in case of oracle we get using metaModel.getDDL() ?