ALTER DATABASE
Use ALTER DATABASE
to perform the following tasks:
- Set and clear database configuration parameters.
- Drop all fault groups and their child fault groups from a database.
- Specify the subnet name of a public network to use for import/export.
- Restore down nodes, and revert active standby nodes to standby status.
Syntax
ALTER DATABASE db-spec { ... DROP ALL FAULT GROUP ... | EXPORT ON { subnet‑name | DEFAULT } ... | RESET STANDBY ... | SET [PARAMETER] parameter=value [,...] ... | CLEAR [PARAMETER] parameter[,...] }
Parameters
db-spec |
Specifies the database to alter, one of the following:
|
DROP ALL FAULT GROUP
|
Drops all fault groups defined on the specified database. The syntax for DROP ALL FAULT GROUP is singular for GROUP . |
EXPORT ON
|
Specifies the network to use for importing and exporting data, one of the following:
|
RESET STANDBY
|
Restores any replaced nodes and reverts all active standby nodes to standby status. If any replaced nodes cannot resume activity, Vertica leaves the standby nodes in place. |
SET [PARAMETER] parameter=value
|
Sets one or more configuration parameters to the specified value at the database level. |
CLEAR [PARAMETER] parameter
|
Clears one or more specified configuration parameters at the database level. |
Privileges
Examples
Drop and restore all default groups:
=> ALTER DATABASE exampledb DROP ALL FAULT GROUP; ALTER DATABASE
Restore down nodes and revert all active standby nodes:
=> ALTER DATABASE exampledb RESET STANDBY; ALTER DATABASE
Set multiple configuration parameters:
=> ALTER DATABASE exampledb SET AnalyzeRowCountInterval = 3600, DBDCorrelationSampleRowCount = 3000, ActivePartitionCount = 2;
Clear configuration parameters:
=> ALTER DATABASE exampledb CLEAR AnalyzeRowCountInterval, DBDCorrelationSampleRowCount, ActivePartitionCount;