If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > corrupted DB2 database on AIX

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-28-03, 19:03
wayneb64 wayneb64 is offline
Registered User
 
Join Date: Aug 2003
Posts: 58
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.
Reply With Quote
  #2 (permalink)  
Old 10-28-03, 22:36
mixxalot mixxalot is offline
Registered User
 
Join Date: May 2003
Posts: 369
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.

Scott
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On