Board logo

subject: Recovering corrupt DB2 database when you are unable to create tablespace [print this page]


In the DB2 databases, there is the concept of 'automatic storage' database using which the database automatically grows whenever the need arises to do so. This feature can save you the hassles of managing the storage containers thereby improving the flexibility and performance of the database. However, you should define the automatic storage settings while creating the database. Having said that, at times you do face problems while creating a tablespace in the database container because of this feature. Also, database corruption can be a potential cause behind this purpose. You should try to find out the cause behind this and try to recover DB2 database. If it is database corruption, then you should use a third-party DB2 database recovery software to recover DB2 database.

Let us think of a situation in which you are working on IBM DB2 (UDB) v8 database. In this database, you are adding a tablespace, which you are unable to perform. An error message is displayed in this case, which is:

"db2 "create tablespace one managed by database using (file '/home/v95inst1/SAMPLE/v95inst1' 1000)"

DB221034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL0298N Bad container path. SQLSTATE=428B2"

Cause:

The most possible cause of this error is that the path that you have provided for creating the tablespace is already in use by AUTOMATIC STORAGE. This condition can be checked by listing the container paths for the tablespaces, and by checking if the automatic storage is in use. You can verify this by using the following command:

"db2pd -db -tablespaces"

Resolution:

To overcome this problem, you should use a different folder to use this command to create a new tablespace. This can be done by using either of the following methods:

You should create a sub-folder using the same path for which you tried creating the tablespace earlier.

You should create a new folder at a new location.

If the problem is still not solved and you are unable to create a tablespace, then there is quite a possibility that the database is corrupt. For this, you should use a third-party DB2 repair software to repair DB2 database. With the help of these read-only DB2 recovery tools, you can make sure that the recovery is safe and secure.

The most trusted name in the field of DB2 database recovery is Stellar Phoenix DB2 Recovery Software, which recovers DB2 database from IBM DB2 (UDB) v8 databases. Compatible with Windows Server 2003, XP, and 2000, this DB2 recovery utility recovers DB2 database by recovering various database components including tables, schemas, views, containers, triggers, buffer pools, etc.

Recovering corrupt DB2 database when you are unable to create tablespace

By: Mark Willium




welcome to loan (http://www.yloan.com/) Powered by Discuz! 5.5.0