Converting DMS tablespaces to use automatic storage
To
simplify storage management, you can convert to an existing DMS tablespace to
use automatic storage by using these steps:
Identify
the tablespace that you want to convert from DMS non-automatic storage to DMS
automatic storage. Then, identify the storage group that you want the
tablespace to use.
You
can use the MON_GET_TABLESPACE () table function to find the candidate for the
conversion. A sample SQL statement is as follows:
SELECT
SUBSTR (TBSP_NAME, 1, 12) AS TBSP_NAME,TBSP_ID, BSP_TYPE, TBSP_CONTENT_TYPE,TBSP_USING_AUTO_STORAGE
FROM TABLE (MON_GET_TABLESPACE ('', -2)) AS T WHERE TBSP_USING_AUTO_STORAGE=0;
You
can use the ADMIN_GET_STORAGE_PATHS () table function to find the most suitable
storage group to place the tablespace:
SELECT
SUBSTR(STORAGE_GROUP_NAME,1,15) AS STOGROUP,
SUBSTR(DB_STORAGE_PATH,1,20) AS STORAGE_PATH,
SUBSTR(DB_STORAGE_PATH_STATE,1,10) AS DB_STORAGE_PATH_STATE
FROM
TABLE (ADMIN_GET_STORAGE_PATHS ('',-1)) AS T;
Once
you have the data ready, you can convert the tablespace to use automatic
storage by executing the statement listed here:
ALTER
TABLESPACE TS_DMS_DATA MANAGED BY AUTOMATIC STORAGE USING STOGROUP
SG_HOT;
Move
the content from the old container to the new automatic storage path by
executing the REBALANCE statement:
ALTER
TABLESPACE TS_DMS_DATA REBALANCE;
Monitor
the progress of the rebalance operation by using the statement shown here:
SELECT VARCHAR (TBSP_NAME, 15) AS TBSP_NAME, rebalancer_mode, rebalancer_status,rebalancer_extents_remaining,rebalancer_extents_processed,rebalancer_start_time from table mon_get_rebalance_status (NULL,-2)) as t;
Comments
Post a Comment