## auto_extend

### Use

You can configure your database system in such a way that it automatically adds a new data volume as soon as the fill level of the data area reaches a certain percentage. To do this, you use the auto-extend function for the data area.

The number of data volumes that can be added while the database is in operation is limited by the value of the MAXDATAVOLUMES database parameter. The name of the new data volume is determined by the system based on the existing volume definitions.

You can use the AutoExtDir Database Manager parameter to define the directory in which the new data volume is to be created (see: dbm_configset). If this parameter is not defined, the Database Manager creates the new data volume in the run directory of the database instance.

You can activate and deactivate this function. The system default for this function is “on” and the system adds a new data volume to the data area as soon as the fill level reaches 90%.

You can change the fill level threshold by executing the DBM command auto_extend and entering a new value. This remains valid until you change it again.

If you activate this function and do not enter a percent value, the percent value defined last time is used.

Like other DBM commands, this one requires its own event task. For this reason, make sure when you execute this DBM command that the _MAXEVENTTASKS database parameter value is large enough.

See also:

Database Administration Tutorial, Enlarging a Database Instance

Concepts of the Database System, Volumes (Permanent Storage)

### Prerequisites

You have the server authorization ParamFull or AccessUtility.

● The database instance is in the ONLINE operational state.

● The last data volume that you added is of the file type.

### Syntax

auto_extend <mode> [<number>]

Options

Option | Description
<mode> | Function for automatically extending the data area; possible values are: ON: activate function OFF: deactivate function SHOW: display function
<number> | Percentage at which the system is to add a new data volume Valid values are: 1 <= <number> <= 100 The default value is 90

### Reply

OK

[ON [<number>] | OFF [, <reason> | UNKNOWN]

Values for the Reply Fields

Value | Description
ON | The function for automatically extending the data area is active
<number> | Defined percentage as of which the system adds a data volume
OFF | The function for automatically extending the data area is not active
<reason> | Reason why the function was deactivated
UNKNOWN | The status of the function for automatically extending the data area cannot be determined

### Examples

Call the Database Manager CLI in session mode, log on as operator OLEG with the password MONDAY, connect to the database instance DEMODB,

● Activate the function for automatically extending the data area; the system is to add a data volume as soon as the data area is 66 % full:

>dbmcli -d DEMODB -u OLEG,MONDAY

dbmcli on DEMODB>auto_extend ON 66

OK

● Display the status of the function for automatically extending the data area:

dbmcli on DEMODB>auto_extend SHOW

OK

ON 66