You can convert some or all of your database-managed space
(DMS) table spaces in a database to use automatic storage. Using automatic
storage simplifies your storage management tasks.
Before you begin
Ensure
that the database is enabled for automatic storage and has one or
more storage paths defined for use with automatic storage. To do so,
use the ALTER DATABASE statement.
Note: If
you are not using the automatic storage feature, you must not use
the storage paths and naming conventions that are used by automatic
storage. If you use the same storage paths and naming conventions
as automatic storage and you alter a database object to use automatic
storage, the container data for that object might be corrupted.
Procedure
To convert a DMS table space to use automatic storage,
use one of the following methods:
- Alter a single table space. This method keeps
the table space online but involves a rebalance operation that takes
time to move data from the non-automatic storage containers to the
new automatic storage containers.
- Issue the ALTER TABLESPACE statement, specifying the
MANAGED BY AUTOMATIC STORAGE clause for the table space that you want
to convert.
- Issue the ALTER TABLESPACE statement again, this time
specifying the REBALANCE option. This option removes the user-defined
containers so that all table space containers are managed by automatic
storage.
If you do not specify the REBALANCE option
now and issue the ALTER TABLESPACE statement later with the REDUCE
option, your automatic storage containers will be removed. To recover
from this problem, issue the ALTER TABLESPACE statement, specifying
the REBALANCE option.
- Use a redirected restore operation. When
the redirected restore operation is in progress, you cannot access
the table spaces being converted. For a full database redirected restore,
all table spaces are inaccessible until the recovery is completed.
- Run the RESTORE DATABASE command,
specifying the REDIRECT parameter. If you want to convert a single
table space, also specify the TABLESPACE parameter:
RESTORE DATABASE database_name TABLESPACE table_space_name REDIRECT
- Run the SET TABLESPACE CONTAINERS command, specifying
the USING AUTOMATIC STORAGE parameter, for each table space that you
want to convert:
SET TABLESPACE CONTAINERS FOR tablespace_id USING AUTOMATIC STORAGE
- Run the RESTORE DATABASE command
again, this time specifying the CONTINUE parameter:
RESTORE DATABASE database_name CONTINUE
- Run the ROLLFORWARD DATABASE command,
specifying the TO END OF LOGS and AND
STOP parameters:
ROLLFORWARD DATABASE database_name TO END OF LOGS AND STOP