If you need to drop a table in informix and create it again, you require the script which was initially used to create that table. To get the SQL script, we use dbschema command. Most frequently, the command is used in the following format.

dbschema -d <database> -t <tablename> -ss <file_name>
                                                                             |__ To Generate Server Specific Information

An example is given below:


The above command will take the backup of all the tables in the database smdb and store it in the file ‘smdb_20100624.sql’.

Adnan Khurshid

Adnan Khurshid, the author of this article, has been working in a telecommunication sector since 2007. He has worked there as a VAS (Value Added Services) engineer and has excelled remarkably in the field. Working in this field has been his passion and he has always made efforts to keep himself up to date. Find more about him on LinkedIn

More Posts

Tags: ,

2 Comments on How to retrieve SQL script for table creation from Informix

  1. imvu login says:

    excellent post, very informative.I wonder why the other specialists of this sector don’t notice this.You should continue your writing.I’m confident, you have a great readers’ base already!

  2. Superman says:

    Don’t suppose there is a way to exclude trigger and index creates and only export the create tables?

Leave a Reply