CHAPTER 3 Working with Database Objects
103
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.
2 Back up the database, as described in Chapter 11, “Backup and Data
Recovery”.
3 Do the data definition task.
Note For a multiplex database, you must perform the data definition task
on the write server in simplex mode, and then shut it down and bring it up
in multiplex mode before backing up the database. See the Adaptive Server
IQ Multiplex User’s Guide for details before data definition.
4 Back up the database again.
5 Allow users to connect to the database.
Extending data definition privileges
In order to perform data definition tasks, you must have the appropriate
authority.
• With DBA authority, you can perform all data definition tasks. You also
can grant authority to other users to perform specific tasks. This includes
the ability to grant DBA authority to other users.
• To create any database object, you need resource authority for that type of
object.
• When you create an object you become its owner. The owner of an object
automatically has authority to perform all operations on that object, and to
grant other users authority to update the information in a table.