6. Loading and Unloading Databases : Unload Operation : Locking While Unloading a Database : Inconsistent Database During an Unload
 
Share this page                  
Inconsistent Database During an Unload
There are two major ways that a database can become inconsistent during the unloading of a database:
By default the database is not exclusively locked while the unload database scripts are being created or the unload command file is running. Because of this default, a user can alter tables that are not locked during this time.
A user can alter the database after you have created the unload database scripts but before you have executed the unload command file.
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 database while it is being unloaded, lock it exclusively.
Lock Database Exclusively During Unload
To lock the database exclusively during an unload operation, edit the unload script and add the sql command -l flag to the script, before running the unload command file.
Doing this ensures the consistency of the database.