Tuesday, January 18, 2011

How to resolve container error in db2 database

Data corruption is one of the most difficult problem to resolve because there is no fixed cause of data corruption. Now a days users suffer with tons of data corruption issues.

Sometimes users suffer with problem- The table space will not work properly & receive an error message:

SQL0294N The container is already in use.

This error message occurs at the time of mounting the database which will make the database inaccessible.

Why This error occurs:

There are lots of cause of this issue but generally this error message occurs when user uses ‘DB2untag' command on a container which is being used by the DB2 database. In these circumstances both the database will get corrupted and data will become inaccessible.

To Resolve this issue:

Solution 1:

1. Do one of the following:
  • If the database previously existed, drop the database using the dropDBs command.
  • If the database did not previously exist, continue to Step 2.
2. If the database did not previously exist or you have successfully run the dropDBs command but continue to get the error, manually delete the following directory:
  • Windows :
  • Linux :

Solution 2:

To rectify this issue first you need to restore or copy the database backup which is done previously.

Solution 3:

If above both solutions fails to resolve this issue then use third party DB2 Recovery Software. DB2 Recovery Software are very easy to use & made for novice user as well as for technical expert.

1 comment:

  1. This issue may be caused because your DB2 database directory was not deleted when the dataabse was dropped. You can manually delete the directory and then create the database again. On Windows the directory is located here: \DB2\NodeName\DBName