Comments (4)
  • Add a Comment
  • Edit
  • More Actions v
  • Quarantine this Entry

1 brunoalsantos commented Permalink

Hello Noberto,

We can also do this, extract the informations from db2look command.

2 Norberto commented Permalink

You're right Bruno, but there are situations where you just cannot use db2look (e.g.: a programmer that only connects to the database through JDBC, without the DB2 CLP).
Also, db2look won't produce the DROP commands.

I really prefer this approach because with it I can have all FKs for an schema, for example, and in a really easy way (just execute the SELECT, without having to search for thousands of lines in the db2look's outputs).
Thanks for your comment.

3 dickr commented Permalink

Never realized that. The "-dp" option with db2look will drop the whole table, so the drop FK-constraints are not required because they are gone already.

That Norberto guy is smart :)

4 Norberto commented Permalink

Good point Dick, thanks for that :-)