IBM DB2 V9 introduces automatic storage management. The automatic storage function helps you simplify the Storage Management of tablespaces and create new tablespaces that use the automatic storage function, the container and space allocation are completely determined by the DB2 database manager. This article focuses on using DB2®V9 automatic storage function of the database how to restore non-incremental redirection.
Introduction
The database may be unavailable due to software or hardware faults, and may encounter various faults that require different recovery measures, such as storage problems, power outages, application faults, or misoperations. This article focuses on the use of DB2®The automatic storage function of V9 does not allow redirection and restoration of Incremental Backup databases. Because the restoration of databases using the automatic storage function is very different from that in the past, customers are prone to various problems in actual use, therefore, this article will elaborate on the automatic storage function in detail.
The Automatic Storage Feature was initially introduced in DB2 V8.2.2. DB2 V9 extends this feature and uses the automatic storage feature to help you simplify the Storage Management of tablespaces, the container and space allocation of the newly created tablespace that uses the automatic storage function are completely determined by the DB2 database manager.
Automatic Storage Management
Automatic Memory automatically increases the database size across disks and file systems. Therefore, you no longer need to manage memory containers while maintaining the performance and flexibility of the memory managed by the database. In DB2 V9.1, automatic storage support has been added for multi-partition databases. If you are using an Enterprise Server with DPF (Data Partitioning Feature, database Partitioning function), you can use a multi-partition database that supports the automatic storage function. When creating a database in DB2 V9, the automatic storage function is enabled by default to simplify the Storage Management of tablespaces, the database that uses the automatic storage function has one or more associated storage paths. When creating a tablespace, you do not need to specify the storage path or other features. For databases that use the automatic storage function, you can use automatic storage management for their tablespace, or do not use automatic storage management. For databases that do not use the automatic storage function, the tablespace cannot use automatic storage management.
Automatic Storage simplifies storage management, allowing you to specify the storage path used by the database manager to store tablespace data and allocate space for various purposes. In addition, DB2 manages the container and space allocation of these tablespaces when creating and filling tablespaces. If you do not need automatic storage, you must run the create database Command and set the automatic storage option to NO, or use the sqlecrea API and set the SQLEDBDESCEXT parameter to SQL _AUTOMATIC_STORAGE_NO to CREATE a DATABASE.
The automatic storage function can only be specified when you create a database. You cannot enable automatic storage for a database that has not used the automatic storage function. Similarly, automatic Storage cannot be disabled for databases that enable automatic storage when creating databases. The work und is to specify whether to use automatic storage when creating tablespaces. That is, although the automatic storage function is enabled for databases, however, you can create tablespaces that do not use the automatic storage function.
Because the automatic storage database is introduced for multi-partition configuration, the db2look command is changed. Before issuing the db2look command, make sure that all database partitions are active. If any database partition is inactive, a warning message is sent, indicating that table space DDL cannot be generated. This db2look command changes will affect all table space types.
Next, we will explain how to use the Automatic Storage Feature when creating a database through examples.
Example 1: Create a DB2 database DB2TEST1 that does not use automatic storage
Create database DB2TEST1 automatic storage no on/db2/databases/db2test1
If you do not need to use the automatic storage function in the actual process, you must set the automatic storage option to NO when creating the database. Otherwise, you will create a database that uses the automatic storage function.
Example 2: Create a DB2 database DB2TEST2 Using Automatic Storage
Create database DB2TEST2
Because the automatic storage function is enabled by default when you create a database in DB2 V9, we did not explicitly set the specified automatic storage option to NO when creating the database, therefore, the automatic storage function is automatically enabled for the newly created database DB2TEST2. The database path is determined by the dftdbpath Database Manager configuration parameters, and the storage path is determined by the dftdbpath Database Manager configuration parameters.
Three tablespaces are created by default: SYSCATSPACE, TEMPSPACE1, and USERSPACE1, both of which are managed using automatic storage. It should be noted that for USERSPACE1 tablespaces, the table space type in DB2 V8 is changed from conventional to large.