Converting table spaces for a Db2 pureScale environment

Converting your environment to Db2 pureScale environment requires changes to table spaces.

Before you begin

About this task

In a Db2 pureScale environment, table spaces must be managed by automatic storage. Run the db2checkSD command as detailed in Verifying that your databases are ready for a Db2 pureScale environment. If db2checkSD reported any table spaces that are not managed by automatic storage, or that are not on Storage Scale, you must convert the table spaces and move the data to Storage Scale before converting. The process steps you take differ, depending on whether you want to have a Db2 managed Storage Scale or have a user managed Storage Scale.

Procedure

To convert table spaces to automatic storage table spaces, depending on how your existing table spaces are defined, choose one of the following options:
Option Description
Catalog table space is system managed space (SMS) Recreate the database on the Storage Scale file system created in the previous step and reload it. Use the COPY option of the db2move command to copy one or more schemas from the original database to the new database.
  • Catalog table space is not SMS
  • May have SMS user table spaces
  • May have some SMS temporary table spaces
  • Not all database managed (DMS) table spaces are managed by automatic storage
  • If the database is not enabled for automatic storage, use the ALTER DATABASE command with the ADD STORAGE ON <storage-path> option to enable it for automatic storage
  • If SMS table spaces exist:
    • drop them
    • re-create them as table spaces that are managed by automatic storage
    • reload them
  • If SMS user temporary table spaces exist:
    • drop them
    • re-create them as table spaces that are managed by automatic storage
    • re-create any global temporary tables in the new table space as dropping a user temporary table space will also drop any global temporary tables in that table space
  • Perform a redirected restore to create a new copy of the database on the Storage Scale storage path. During the redirected restore, specify SET TABLESPACE CONTAINERS FOR tablespace-id USING AUTOMATIC STORAGE for any DMS table spaces, to convert them to automatic storage.
All table spaces are managed by automatic storage but are not on Storage Scale Perform a redirected restore to create a new copy of the database on the Storage Scale storage path.

What to do next

Verify that your table spaces are ready for a Db2 pureScale environment.