DB2 Version 10.1 for Linux, UNIX, and Windows

ALTER DATABASE statement

The ALTER DATABASE statement adds new storage paths to, or removes existing storage paths from, the collection of paths that are used for automatic storage table spaces.

An automatic storage table space is a table space that has been created using automatic storage; that is, the MANAGED BY AUTOMATIC STORAGE clause has been specified on the CREATE TABLESPACE statement, or no MANAGED BY clause has been specified at all. If a database is enabled for automatic storage, container and space management characteristics of its table spaces can be completely determined by the database manager. If the database is not currently enabled for automatic storage then the act of adding storage paths will enable it.

Important: This statement is deprecated and might be removed in a future release. Use the CREATE STOGROUP or ALTER STOGROUP statements instead.

Invocation

The statement can be embedded in an application program or issued interactively. It is an executable statement that can be dynamically prepared only if DYNAMICRULES run behavior is in effect for the package (SQLSTATE 42509).

Authorization

The privileges held by the authorization ID of the statement must include either SYSADM or SYSCTRL authority.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-ALTER DATABASE--+---------------+---------------------------->
                   '-database-name-'   

   .-----------------------------------------------.   
   |                         .-,--------------.    |   
   V  (1)                    V                |    |   
>----------+-ADD STORAGE ON----'storage-path'-+--+-+-----------><
           |                  .-,--------------. |     
           |                  V                | |     
           '-DROP STORAGE ON----'storage-path'-+-'     

Notes:
  1. Each clause can be specified only once.

Description

database-name
An optional value specifying the name of the database that is to be altered. If specified, the value must match the name of the database to which the application is currently connected (not the alias that the client might have cataloged); otherwise, an error is returned (SQLSTATE 42961).
ADD STORAGE ON
Specifies that one or more new storage paths are to be added to the collection of storage paths that are used for automatic storage table spaces.
'storage-path'
A string constant that specifies either an absolute path or the letter name of a drive (Windows operating systems only) on which containers for automatic storage table spaces are to be created.
DROP STORAGE ON
Specifies that one or more storage paths are to be removed from the collection of storage paths that are used for automatic storage table spaces. If table spaces are actively using a storage path being dropped, then the state of the storage path is changed from "In Use" to "Drop Pending" and future use of the storage path will be prevented.
'storage-path'
A string constant that specifies either an absolute path or the letter name of a drive (Windows operating systems only).

Rules

Notes

Examples