Scheduling data definition tasks

Once the database exists and other users have access to it, follow these guidelines when you need to perform additional data definition operations, such as adding or modifying tables or indexes.

You will probably want to schedule data definition operations for times when database usage is low. All other users are blocked from reading or writing to a table while you are creating or altering that table, although for a brief time only. If the table is part of a join index, users cannot read or write to any of the tables in the join index until the data definition operation is complete. For more information on concurrency rules during data definition, see “Locks for DDL operations”.

When you are ready to perform data definition tasks:

  1. Make sure that all users disconnect from the database. For details, see “Disconnecting from a database”.

  2. Back up the database, as described in Chapter 14, “Backup and Data Recovery”.

  3. Do the data definition task.

    NoteFor a multiplex database, see “Creating databases with multiplex functionality” for details before data definition.

  4. Back up the database again.

  5. Allow users to connect to the database.