ALTER DATABASE
Use the ALTER DATABASE command with the added COLLECT HISTORY clause to specify history collection for the databases and the users who are connected to it.
Synopsis
Syntax for altering a DATABASE:
ALTER DATABASE <database-name> [<ALTER-db-clause>]...
<ALTER-db-clause> ::=
... existing clauses ...
| COLLECT HISTORY { ON | OFF | DEFAULT }
Inputs
The ALTER DATABASE command has the
following input:
| Input | Description |
|---|---|
| COLLECT HISTORY [ ON | OFF | DEFAULT ] | Specifies whether history data is to be collected for sessions
attached to this database.
|
Outputs
The ALTER DATABASE command has the
following output:
| Output | Description |
|---|---|
| ERROR: permission denied. | You must have Manage Security privilege to set a database history collection attribute. |
Description
For details about all the options
of the ALTER DATABASE command, see theIBM® Netezza® Database User’s Guide.
The ALTER DATABASE command has the following characteristics:
- Privileges required
- You must be the admin user, the database owner, or your account must have the Alter privilege for the database or for the Database object class. You must have Manage Security privilege to alter the history collection attribute of a database.
- Common tasks
- In addition to its previous functions, the command assigns the collect history to the database object.
Usage
The following provides sample usage:
ALTER DATABASE SECRET COLLECT HISTORY ON;