Results 1 to 2 of 2

Thread: New to DB2...

  1. #1
    Join Date
    Sep 2004

    Unanswered: New to DB2...

    I just started to work with DB2 in the windows environment. On our server we have a database called db1. Wanted to create a copy of this but without the data. Is this possible? I know in Oracle I can create a dump then restore the dump without the data. If that is not possible, how can I run truncate statements against the db?

  2. #2
    Join Date
    Jun 2003
    Toronto, Canada
    Provided Answers: 1
    You can run db2look utility to extract the DDL statements: "db2look -d db1 -e -a -o all.ddl" will create a file named "all.ddl". On your local machine you will then issue: "db2 create db db1" (to create an empty database) and "db2 -tf all.ddl" to create all extracted objects in it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts