How to use hdbsetup to upgrade multiple non-default databases?

Document ID : KB000020591
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

If SCM broker is setup for multiple server/database instances, with HBroker.arg file looks like below:

 //Default Version: Broker       
 -dirserver=/home/ scm-d/bin 
 -minserver=5
 -maxserver=50
 -queuesize=2
 // Version: Broker/version1
 -dirserver_version1=/home/scm-d/bin
 -minserver_version1=3
 -maxserver_version1=10
 -queuesize_version1=10
 -homeserver_version1=/home/scm-d/version1
 // Version: Broker/version2
 -dirserver_version2=/home/scm-d/bin
 -minserver_version2=3
 -maxserver_version2=10
 -queuesize_version2=10
 -homeserver_version2=/home/scm-d/version2

To upgrade this SCM broker instance, all three SCM server databases need to be upgraded. (default database, version1 database and version2 database). However, hdbsetup seems only able to recognize the default database DSN, therefore it only upgrades one database.

Solution:

Hdbsetup has a hidden option "-d HomeDirPath". This -d option together with -UR ( upgrade repository) option can upgrade the other two non-default databases. Using the above HBroker.arg file as reference, below is syntax example for hdbsetup -d option:

 $hdbsetup -ur -d /home/scm-d/version1
 $hdbsetup -ur -d /home/scm-d/version2

The above 2 commands will upgrade the version1 and version2 database separately.

With the -d option specified, hdbsetup will copy all the required files ( HServer.arg, hsvr.dfo etc.) to $CA_SCM_HOME for the upgrade. Then after the upgrade is completed, it will delete all of them from $CA_SCM_HOME directory.