Activates the specified database and starts up all necessary database services, so that the database is available for connection and use by any application.
Scope
This command activates the specified database on all nodes within the system. If one or more of these nodes encounters an error during activation of the database, a warning is returned. The database remains activated on all nodes on which the command has succeeded.
Authorization
One of the following:
Required Connection
None
Command Syntax
>>-ACTIVATE--+-DATABASE-+---database-alias----------------------> '-DB-------' >-----+---------------------------------------+---------------->< '-USER--username--+------------------+--' '-USING--password--'
Command Parameters
Usage Notes
If a database has not been started, and a CONNECT TO (or an implicit connect) is issued in an application, the application must wait while the database manager starts the required database, before it can do any work with that database. However, once the database is started, other applications can simply connect and use it without spending time on its start up.
Database administrators can use ACTIVATE DATABASE to start up selected databases. This eliminates any application time spent on database initialization.
Databases initialized by ACTIVATE DATABASE can be shut down by DEACTIVATE DATABASE, or by STOP DATABASE MANAGER.
If a database was started by a CONNECT TO (or an implicit connect) and subsequently an ACTIVATE DATABASE is issued for that same database, then DEACTIVATE DATABASE must be used to shut down that database. If ACTIVATE DATABASE was not used to start the database, the database will shut down when the last application disconnects.
ACTIVATE DATABASE behaves in a similar manner to a CONNECT TO (or an implicit connect) when working with a database requiring a restart (for example, database in an inconsistent state). The database will be restarted before it can be initialized by ACTIVATE DATABASE. Restart will only be performed if the database is configured to have AUTORESTART ON.
Note: | The application issuing the ACTIVATE DATABASE command cannot have an active database connection to any database. |
See Also