Copying Objects Using copydb
The command copydb creates command files enabling you to copy objects owned by you out of a database and restore it. For a full explanation of copydb and all its flags, see the Command Reference Guide.
The copydb command does not copy the database but creates two SQL command files in the current directory for doing the actual copying:
• copy.out, which contains SQL instructions to copy all the tables owned by the user into files owned by the user in the named directory
• copy.in, which contains SQL instructions to copy the files into tables, create indexes, and perform modifications
The copydb command works slightly differently when you use it against a distributed database. If you run copydb against a distributed database, it only copies out registration statements of local tables and views registered in the distributed database and distributed view definitions.
The SQL instructions in copy.out copy data out into files that can be accessed by the SQL instructions in copy.in. Because copying the distributed database involves executing registration statements and not copying data, you need run only copy.in.
Last modified date: 01/30/2023