Migrating TIBCO Security Server Database from Earlier Version to Version 2.4.2

TIBCO Enterprise Administrator 2.4.2 requires a database migration if you are upgrading from an earlier version. This is due to H2 database version upgrades in recent TEA releases: from 1.3.176 to 2.2.224 in TEA 2.4.1, and from 2.1.210 to 2.2.224 in TEA 2.4.2.

    Procedure
  1. Go to TSS lib folder where h2-2.1.210 jar resides.

  2. cd  <TEA_TIBCO_HOME>/tea/agents/tss/1.2.1/lib
  3. Migrate data from the existing database by extracting and converting the details into an SQL script. Save this script to a ZIP file named taagentDB.zip.
  4. java -cp h2-2.1.210.jar org.h2.tools.Script -url jdbc:h2:<TEA_TIBCO_HOME>/tibco/cfgmgmt/tss/data/teaAgentDb  -user "sa" -password "sa" -script taagentDB.zip -options compression zip
  5. Copy the existing database content and convert the details into an SQL script. Save this script to the file tssDB.zip.
  6. java -cp h2-2.1.210.jar org.h2.tools.Script -url jdbc:h2:<TEA_TIBCO_HOME>/tea/agents/tss/1.2.1/bin/tibco/cfgmgmt/data/tssDb  -user "sa" -password "sa" -script tssDB.zip -options compression zip
  7. Manually take backup of '<TSS_CONFIG_HOME>/data' folder and then delete the '<TSS_CONFIG_HOME>/data/teaAgentDb.mv.db' file. Now copy taagentDB.zip to the location where your h2-2.2.224.jar resides.

  8. Manually take backup of '<TEA_TIBCO_HOME>/tea/agents/tss/1.2.1/bin/tibco/cfgmgmt/data' folder and then delete the '~/TEA241HF3/tea/agents/tss/1.2.1/bin/tibco/cfgmgmt/data/tssDb.mv.db' file. Now copy tssDB.zip to the location where your h2-2.2.224.jar resides.
  9. Go to local lib folder where h2-2.2.224.jar resides.
  10. cd <TIBCO_HOME>/tea/agents/tss/1.2.2/lib
  11. Generate the new DB from taagentDB.zip file to location '<TSS_CONFIG_HOME>/data' folder.

  12. java -cp h2-2.2.224.jar org.h2.tools.RunScript -script taagentDB.zip -url "jdbc:h2:<TIBCO_HOME>/tibco/cfgmgmt/tss/data/teaAgentDb;NON_KEYWORDS=KEY,VALUE" -options compression zip variable_binary
  13. Generate the new DB from tssDB.zip file to location '<TEA_TIBCO_HOME>/tea/agents/tss/1.2.2/bin/tibco/cfgmgmt/data'.

  14. java -cp h2-2.2.224.jar org.h2.tools.RunScript -script tssDB.zip -url "jdbc:h2:<TEA_TIBCO_HOME>/tea/agents/tss/1.2.2/bin/tibco/cfgmgmt/data/tssDb;NON_KEYWORDS=KEY,VALUE" -options compression zip variable_binary