Procedure documentationEnlarging a Database Locate this document in the navigation structure

 

If you notice that the data area was defined too small when you created the database and you are concerned that the data area may overflow, you can extend the data area while the database is in operation.

You must have sufficient storage space to do this, because the database system reserves the corresponding storage space immediately when you create a data volume.

During database operation, you can only add data volumes if the value you defined for MAXDATAVOLUMES is large enough.

If this value is not large enough, you first must increase the value for MAXDATAVOLUMES and restart the database system. You can then add data volumes while the database is in operation.

You can use the function to automatically extend the data area. This creates data volumes as soon as the database system has reached the defined fill level. You can also add data volumes manually.

Prerequisites

You can find the prerequisites under Database Manager CLI, auto_extend, db_addvolume

Procedure

Scenario 1

You want the database system to extend the data area by one data volume whenever the fill level reaches 66%. The system should then create an additional data volume in the directory in which the previously defined data volume was created.

The data volume that was created is of the type File.

Procedure

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

    >dbmcli –u OLEG,MONDAY –d DEMODB

    dbmcli on DEMODB>

  2. Activate the function for automatically extending the data area at a fill level of 66 %:

    dbmcli on DEMODB>auto_extend ON 66

    OK

Result

You have activated the function for automatically extending the data area.

You can check this with the DBM command auto_extend SHOW and display the value currently defined as the threshold value.

Scenario 2

You have noticed that the fill level of the data area of DEMODB is approaching 95 %.However, you want a fill level of 50%.

The system should add as many volumes as necessary to achieve a database area fill level of 50%.

Procedure

Call Database Manager CLI, log on as operator OLEG with password MONDAY, connect to database DEMODB, and extend the data area so as to reach a fill level of 50 %:

>dbmcli –u OLEG,MONDAY –d DEMODB db_addvolume DATA –fd 50

OK

1

Result

To reach a fill level of 50%, the system has added 1 data volume.

Scenario 3

As a precaution, you want to create a second data volume of type File for DEMODB. You want it to be of exactly the same size as the first data volume (32768 pages) and to be created with the name DISKD0002 in the same directory (C:\Documents and Settings\All Users\Application Data\sdb\data\DEMODB\data).

Procedure

  1. Call Database Manager CLI in session mode, log on as operator OLEG with password MONDAY, and connect to database DEMODB:

    >dbmcli –u OLEG,MONDAY –d DEMODB

    dbmcli on DEMODB>

  2. Create the second data volume with the properties specified in the scenario:

    dbmcli on demodb>db_addvolume DATA "C:\Documents and Settings\All Users\Application Data\sdb\data\DEMODB\data\DISKD0002" F 32768

    OK

Result

You have created the data volume DISKD0002 for database DEMODB.

You can display all data and log volumes as well as their storage paths using the DBM command param_getvolsall.

More Information

Changing the Value of a Single Database Parameter

Concepts of the Database System, Volumes (Permanent Storage)