Perform bulk-load operations

Inserting hundreds or thousands of rows goes much faster if you turn off transaction logging. Logging these insertions makes no sense because, in the event of a failure, you can easily re-create the lost work. The following list contains the steps of a large bulk-load operation:
  • If any chance exists that other users are using the database, exclude them with the DATABASE EXCLUSIVE statement.
  • Ask the administrator to turn off logging for the database.

    The existing logs can be used to recover the database in its present state, and you can run the bulk insertion again to recover those rows if they are lost.

  • Perform the statements or run the utilities that load the tables with data.
  • Back up the newly loaded database.

    Either ask the administrator to perform a full or incremental backup or use the onunload utility to make a binary copy of your database only.

  • Restore transaction logging and release the exclusive lock on the database.