Frank wrote:
Hi,
I have two databases in DB2 v8.2 (Windows 2003 Server platform) and
right now both databases are on my c-drive.
Unfortunately space on this drive is becoming low and I want to
relocate the databases to my d-drive.
You can change properties of an instance (default database path), but
this applies to new databases.
Can somebody explain to me in detail how to get my databases and
logging files to the d-drive (same db2 folder) please? I am trying to
find this info all over the place, but I cannot find the exact info.
Already I tried to uncatalog one of the databases, copied folder
c:\db2 and its subfolders to the d-drive, but when I issue the
command catalog database X on d: I get an error that there was no
informatie or something in the config file and I cannot get the
database back online.
Generally speaking, I get the impression DB2 considers its database
files sacrosanct (it doesn't appreciate the files being tampered with
by anything other than its own tools :-)
I'm really not sure about this, but it's probably worth a shot:
1. Take a back up of the database (BACKUP DB dbname)
2. Drop the database (DROP DB dbname)
3. Create a new database (with the same name as the old one) on your D:
drive (CREATE DB dbname ... ON D ...)
4. Restore the backup into the new database (RESTORE DB dbname ... INTO
....)
HTH,
Dave.
--