Board logo

subject: Resolving bad Container Path Error In Db2 [print this page]


Are you unable to restore your DB2 database from one server to another? Does restore process fail with SQL0298N Bad container path error while restoring database from one server to another? Well, the problem may occur if either the DB2 database is corrupted or the destination server does not have sufficient disk space. In case of DB2 database corruption, you must have an absolute backup of your database to restore data from it. However, if the backup is either invalid or not updated, DB2 database recovery becomes need of hour.

What causes Bad container path error?

This DB2 database error may take place if table space is declared with fully-qualified container path, which points to a database directory. For instance:

CREATE TABLESPACE tbsp MANAGED BY SYSTEM USING ('/home/db2inst1/db2inst1/NODE0000/SQL00003/tbsp')

Although, it might be valid container path for particular database, presence of SQL00003/.. directory in path causes problems when you restore database from one system to another with varying set of databases.

At this point, log of DB2 database may report the following entries:

2005-12-29-10.42.12.195000-300 I16206637H356 LEVEL: Error

PID: 1688 TID: 3044 PROC: db2agent (SAMPLE)

INSTANCE: db2inst1 NODE : 000

FUNCTION: DB2 UDB, buffer pool services,

sqlbCheckContPathsForOtherDbDir, probe:10

RETCODE : ZRC=0x8002003C=-2147352516=SQLB_BAD_CONTAINER_PATH

Bad container path

When you restore a DB2 database to another system, next database number for system is given to it. This number may not be equal to original system. Restore process attempts to recreate the table space through fully-qualified container path. Thus, restore operation fails.

How to resolve this problem?

You can sort out this behavior of DB2 database and perform db2 recovery through the redirected restore. While using SET TABLESPACE CONTAINERS command for defining storage of affected table spaces, don't fully-qualify the path in database directory. After that, the table space is created under appropriate directory of DB2 database.

If the DB2 database is corrupted and application can not read it, the problem can not be fixed using the above method. In such situations, you need to repair and restore the database using third-party db2 database repair applications.

The applications recover DB2 database in all corruption scenarios. They use high-end scanning techniques to methodically scan entire database and extract all inaccessible data from it. Such repair tools have interactive and simple graphical user interface, and offer easy recovery, without demanding sound technical skills.

DB2 Recovery software repairs and restores corrupted DB2 database of all sizes. The software works well with DB2 (UDB) v8. It restores all DB2 database components, such as tables, views, containers, table spaces, schemas, and buffer pools.

by: Adishree Singh




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