12.1 adbschema
Generate a schema file representing tables and or procedures within a database. It can also produce sql scripts (or 4GL programs) for loading and unloading data to/from a database. This is useful when migrating from one RDBMS to another.
Usage :
adbschema [-noperms] [-fileschema] [-t tabname] \
[-s user] \
[-p user] [-r rolename] [-f procname] \
-d dbname [-ss] [filename]
-noperms Do not include any GRANT/REVOKE
-fileschema Generate a schema suitable for the FILESCHEMA SQL Module
-U Generate unload statements
-U4GL Generate a 4GL program with unload statements
-L Generate load statements
-L4GL Generate a 4GL program with load statements
A typical example may be (assuming the database being migrated was called customers):
$ adbschema -q -noperms -d customers > customers.sql
$ convertsql INFORMIX POSTGRES < customers.sql > newdb.sql
$ adbschema -q -U4GL -d customers > unloadit.4gl
$ 4glpc unloadit.4gl -o unloadit
$ ./unloadit
$ adbschema -q -L4GL -d customers > loadit.4gl
(create database in new RDBMS and run the newdb.sql file to create the tables)
$ 4glpc loadit.4gl -o loadit
$ ./loadit