×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

How to get the DDL to create some tables?

How to get the DDL to create some tables?

How to get the DDL to create some tables?

(OP)
We have an Informix database and the boss want me to get the script to create 90 existing tables. He does not really want to recreate those existing tables, but he want the DDL script. Does anybody know how to do it in Informix? Don't tell me I have no alternative but doing it manually.

Thanks a lot.

RE: How to get the DDL to create some tables?

(OP)
By the way, the boss want the commands to grant the privileges on those tables (such as 'GRANT  select  ON table_name to User_name) be included in the file. I don't know if this is possible.

Thanks.

RE: How to get the DDL to create some tables?

MM8294:

Informix has the dbschema utility that creates the schema for a single table or the whole database:

dbschema -t all -d <dbname> -p all <outputfilename>

This does the whole database, but if all your table names are in tmpfile:

while read file
do
   dbschema -t $file -d <dbname -p all "$file".sql
done  < tmpfile

Regards,


Ed
Schaefer

RE: How to get the DDL to create some tables?

(OP)
Thanks a lot. This is what I need.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close