2. Using Ingres Commands : alterdb Command--Set Database Characteristics
 
Share this page                  
alterdb Command--Set Database Characteristics
Permission required: DBA or a privileged user running as the DBA.
The alterdb command sets journaling and other characteristics for a database. You can use alterdb to halt journaling for a specified database. To restart journaling, you must use the ckpdb +j command.
For further details about journaling options, see the Database Administrator Guide.
The alterdb command has the following format:
alterdb [-disable_journaling] [-delete_oldest_ckp]
[-init_jnl_blocks=n] [-jnl_block_size=n] [-next_jnl_file]
[-target_jnl_blocks=n] [-delete_invalid_ckp] [-n|-i[ucollation_name]]
[-keep=n] [-disable_mvcc] [-enable_mvcc] [-enable_mustlog]
[-disable_mustlog] [‑readonly|‑readwrite] [-verbose] [-help]
dbname[/server_class]
-disable_journaling
Halts journaling immediately, regardless of whether users are connected to the database.
Note:  A side effect of using alterdb to disable journaling is that incorrect journaling status is displayed for tables. Tables display journaling as enabled--although journaling is disabled for the database--where you would expect enabled after next checkpoint.
-delete_oldest_ckp
Deletes the oldest available checkpoint, including related journals and dump files. The request fails if you attempt to delete the only remaining valid checkpoint.
-init_jnl_blocks=n
Specifies the size of the first journal file created after a checkpoint is taken (with the ckpdb command), where 0 <= n <= current target journal size.
The target journal size is displayed by infodb and is the parameter set by the -target_jnl_blocks flag.
-jnl_block_size=n
Specifies the size of each journal file block for the database, where n = 4096, 8192, 16384, 32768, or 65536 bytes. The current size can be obtained by the infodb Journal block size parameter.
Journaling must be off when issuing this command.
-next_jnl_file
Starts a new journal file for this database.
-target_jnl_blocks=n
Specifies the number of journal blocks to be used for the database’s journal file, where 32 <= n <= 65536. The current size can be obtained by the infodb Target journal size parameter.
If using Ingres Cluster Solution, this option has no effect on journal files created as part of a cluster merge.
-delete_invalid_ckp
Deletes all invalid checkpoints. Where there is a previous valid checkpoint, the journal and dump files associated with the invalid checkpoint are retained. For invalid checkpoints with no previous valid checkpoint, associated journal and dump files are removed.
-n[ucollation_name]
Converts a non-Unicode database to a Unicode database with Normalization Form D (NFD). If no collation name is specified, the default collation (udefault) is used.
-i[ucollation_name]
Converts a non-Unicode database to a Unicode database with Normalization Form C (NFC). If no collation name is specified, the default collation (udefault) is used.
-keep=n
Preserves the specified number of last valid checkpoints and deletes all older checkpoints, valid or invalid.
-disable_mvcc
Rejects requests for MVCC lock levels the next time the database is opened.
-enable_mvcc
Accepts requests for MVCC lock levels the next time the database is opened.
-enable_mustlog
Indicates that all operations on this database must be logged. Attempts to use SET NOLOGGING on this database will be rejected.
-disable_mustlog
Disables the directive to log all operations on this database.
-readonly|-readwrite
Sets a read-write database to read-only, or sets a read-only database to read-write.
-verbose
Displays system commentary to the standard output device as the alterdb operation continues. This parameter can be used with any one other alterdb parameter.
-help
Displays command syntax online.
dbname
Specifies the database name, as described in Standard Flags and Parameters. Specify one database name only. If required, identify the server_class.