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.