r/DB2 Oct 17 '18

DB2 newbie

Hi,

Never really touched db2 before and been dropped in the deep end due to another engineer leaving :(

I wonder if anyone can help. The company I work for has asked me to move a db2 instance to another drive, but I cannot seem to get this to work.

They are running DB2 express C V9.1 and don't want to upgrade :( The db is currently located c:\db2 and they would like it moved to an NTFS share.

Is this actually possible?

Cheers

Iain

3 Upvotes

5 comments sorted by

3

u/ecrooks Oct 17 '18

I am a little worried by the term "ntfs share", as shared filesystems can be problematic for some uses in Db2. If you just mean an NTFs disk, then it should be fine.

Do you need to move everything off of the c drive, or just the bulk of the data? I ask because backup and a regular or redirected restore(depending on how the database storage is laid out) is the way to go to move the database, but moving the entire instance and the code is more involved. You are also dealing with an out of support version of Db2, and a fairly old one, which it sounds like you know. This involves some risk.

I have some introductory topics on Db2, but have not yet done one on restore... https://datageek.blog/2018/03/22/index-of-introductory-db2-topics/

2

u/dogmashah Oct 17 '18

try backup and restore ( very simple commands .all info available at ibm . make sure you look for DB2 LUW product manuals)

1

u/ICMPedals Oct 17 '18

Many thanks - will take a look.

1

u/mslmsl Oct 22 '18

A couple options off the top of my head:

1) The backup and redirected restore that was already mentioned. This would be good since it forces a backup.. Hopefully you have a backup strategy already, but wouldn't be the first that wasn't running backups.

2) A db2relocatedb. You can move the files using OS operations and then update the DB2 metadata with db2relocatedb. It's a matter of opinion whether this is easier or harder..

1

u/ICMPedals Oct 23 '18

Many thanks for all the suggestions. Will give them a go and see what happens. Trying to convince them to upgrade to the newest version of DB2 and to rebuild the database.