When we install SmartCloud Control Desk in a Unix/Linux box using middleware installer, it only asks for db instance user. (If we accept the default value, it’s ctginst1)
The installer then creates the user, and places the db in it’s home directory.
In lots of cases there is a dedicated filesystem to hold business critical data, ( and usually it’s not /home) so we have to move database to that location.
db2relocatedb is the tool to use. First, copy/move /home/ctginst1/ctginst1 directory to the new location (for eg.: /data/ctginst1 ), then create a config file for db2relocatedb. ( Keep in mind that we have to move tablespace containers as well )
so the command is:
db2relocatedb -f relocate.cfg
relocate.cfg is :
(don’t forget, the instance should be stopped ! )