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?
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.