6. Loading and Unloading Databases : Copy Operation : Locking While Copying a Database : Inconsistent Database During Copy Operation
 
Share this page                  
Inconsistent Database During Copy Operation
There are two major ways that the database can become inconsistent during the creation of copy database scripts or the execution of the scripts:
Because shared locks are taken on the tables being copied while the copy scripts are being created or copy.out is being executed, a user can alter the tables that are not locked during this time.
A user can alter the tables being copied after you run the copy.out script, but before you have run the copy.in script.
If a user drops a table in this interval, it generates an error message. However, if a user makes either of the following changes during this time, no error message is generated, and you do not know about the change:
Adds or deletes rows from a table
Adds a table
To ensure the consistency of the tables being copied, lock them exclusively while they are being copied.