I need to create an exact copy of a Db2 database (V11.1+) on the same server within the same instance. (This is a development server that does not run production databases.)
This is how I do it now.
- Dump tables using a hand-written script
- Create a new database
- Import service functions specific to my application to the database
- Create a schema in the new database
- Import data from a dump into the new database
- Set database configuration parameters for the new database
I read that it is possible to copy a database scheme with db2move
.
Is there a simple approach that could be used to perform a full copy?
Best Answer
This is a minimial example of copying a database (test) to a into a new database (test2)