DB2 does not automatically make use of extended DMS files. When tablespace space needs to be extended, a number of DB2 commands must be run. Unlike raw devices, a Database Administrator can easily extend Quick I/O files online. Using this method, a Database Administrator can monitor the free space available in the DB2 tablespaces and use the qiomkfile command to grow the Quick I/O files online as needed (typically when the file is about 80 to 90% full). This method does not require you to lock out unused disk space for Quick I/O files. The free space on the file system is available for use by other applications.
Before extending tablespaces, make sure the following conditions have been met:
To extend a DB2 tablespace by a fixed amount
Use the following DB2 commands:
$ db2 connect to database
$ db2 alter tablespace tablespace-name extend (ALL amount)
$ db2 terminate
This example shows how to monitor the free space on the tablespaces in database PROD:
$ db2 connect to PROD
$ db2 list tablespaces show detail
$ db2 terminate
This example shows how to extend the three DB2 containers owned by tablespace EMP by 500MB using the qiomkfile command:
$ /opt/VRTS/bin/qiomkfile -e 500M tbsEMP_cont001
$ /opt/VRTS/bin/qiomkfile -e 500M tbsEMP_cont002
$ /opt/VRTS/bin/qiomkfile -e 500M tbsEMP_cont003
This example shows how to notify DB2 that all containers in tablespace EMP have grown by 500MB:
$ db2 connect to PROD
$ db2 alter tablespace EMP extend (ALL 500M)
$ db2 terminate
This example shows how to verify the newly allocated space on the tablespace EMP in database PROD:
$ db2 connect to PROD
$ db2 list tablespaces show detail
$ db2 terminate