Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2003

    Unanswered: corrupted DB2 database on AIX

    We recently moved a machine to a new lab and the rootvg
    got trashed and has to be rebuilt with a mksysb. DB2 was
    storing its databases on another volume group vg2. It
    appears something has broken in the internals of the
    DB2 configuration because when I attempt a simple
    query against a table I am getting weird errors:

    $ db2 select * from batdata.users
    SQL0104N An unexpected token "backup" was found following "ect BATDATA
    MSTRDAT2". Expected tokens may include: "FROM". SQLSTATE=42601

    "backup" happens to be a directory in the filesystem next to the
    BATDATA database. If I remove the backup directory the error message
    changes to show the next directory in the list.

    This morning, before I knew the rootvg was corrupted, I was
    trying to repair another database called MSTRDATA and ended
    up deleteing the User, Cat, and Temp containers from the
    MSTRDATA directory in an attempt to get rid of it. I have uncatalogged
    everything except BATDATA, but DB2 still wont let me create or
    drop the database called MSTRDATA. If I catalog and try and
    drop it, it tells me it does not exist. If I uncatalog it and try
    to create it, it tells me it already exists in the user or system
    directory. (This was why I deleted the old containers).

    I guess what I need is some DB2 command to rebuild its
    internal config data, as something has gotten clobbered.

  2. #2
    Join Date
    May 2003

    db2dart and restore are your friends

    Sorry to hear about your DB2 problem. Two things that might save you:

    1. the DB2DART utility can do wonders. IBM has info on using this most
    powerful tool

    2. RESTORE DB- you do have a good available clean backup of your
    DB2 database ?

    3. EXPORT/IMPORT and DB2MOVE can help migrate data over from another server in the unfortunate event that you dont have a good backup available.

    We recently moved onto new server hardware and the database had problems after we moved all of the filesystems, DB2 files, volumes, etc over to the new development server. DB2 croaked. Fortunately I had a clean fresh backup that allowed me to do a complete restore of the database onto the new hardware. Otherwise we would have lost our development environment. Also do you have an IBM DB2 support contract? If so contact IBM DB2 support asap! They can help salvage your database even if you dont have a backup. Good luck and hope that this helps.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts