Relocating the Instance Home Directory
I had a problem, I desperately needed to relocate where my instance was physically installed and move it from one filesystem to another. The only help I could find involved using a DB2MOVE and relocating everything from instance to database.
There had to be a better way. Learning from an experience with IBM support many years ago I applied a fix in a way not originally taught to me.
So, let me say that the method below is not blessed by IBM or Ember Crooks. I have done this successfully more than once but may be using commands as they were not intended. Use this at your own risk.
To move your instance directory in a few easy steps:
1. Backup database and instance information.
Database Filesystem, DB2SET parameters, Instance Filesystem
2. Shut down the database and instance cleanly, possibly using IPCLEAN.
3. Uncatalog the database.
4. Drop the existing instance.
5. Have your SA change the home directory of the instance ID to new location.
6. Create a new instance with the same ID, port settings, etc.
(It will auto-create the instance in a new home directory)
Double check your DBM and DB2SET parameters, recreate if needed.
7. Start DB2.
Notice when you switch to the instance your home directory is new and the instance binaries are now installed there.
8. Catalog database with original database name and path.
9. Activate database, check for clean error log.
10. Confirm instance is in new location and all is well.
This process, with SA availability, takes me less than five minutes. I’ve successfully used it to move roughly 5-10 instances with no impact after the fact. Hopefully this will provide you with a sneaky workaround to a unusual problem.
Michael Krafick is an occasional contributor to db2commerce.com. He has been a production support DBA for over 12 years in data warehousing and highly transactional OLTP environments. He was acknowledged as a top ten session speaker for “10 Minute Triage” at the 2012 IDUG Technical Conference. Michael also has extensive experience in setting up monitoring configurations for DB2 Databases as well as preparing for high availability failover, backup, and recovery. He can be reached at “Michael.Krafick (at) icloud (dot) com”. Linked-in Profile: http://www.linkedin.com/in/michaelkrafick. Twitter: mkrafick
Mike’s blog posts include:
10 Minute Triage: Assessing Problems Quickly (Part I)
10 Minute Triage: Assessing Problems Quickly (Part II)
Now, now you two play nice … DB2 and HACMP failover
Technical Conference – It’s a skill builder, not a trip to Vegas.
Why won’t you just die?! (Cleaning DB2 Process in Memory)
Attack of the Blob: Blobs in a Transaction Processing Environment
Automatic Storage Tablespaces (AST): Compare and Contrast to DMS
DB2 v10.1 Column Masking
Automatic Storage (AST) and DMS