Question & Answer
Question
Rebuilding a brand new TEMADB database without re-installing ILMT v9.0.x - v9.2.x application.
Cause
Sometimes, the data in the TEMADB database could be corrupted beyond the repair. Then it would be better off to rebuild a brand new TEMADB database to gather fresh data.
Answer
The following steps have been tested in the lab running ILMT v9.1 - v9.2.5.x on Linux.
1) Stop the LMT sever service (/opt/IBM/LMT/cli/srvstop.sh script).
2) Login to DB2 server with db2 instance owner ID (default is db2inst1) and run "db2 list db directory" command to verify the TEMADB is listed.
Number of entries in the directory = 1
Database 1 entry:
Database alias = TEMADB
Database name = TEMADB
Local database directory = /TEMADB
Database release level = 10.00
Comment = IEM for ILMT database
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =
Note: Default database name can be called TEMADB. For this exercise, it will be using TEMADB database.
3) Optional step - backing up the existing TEMADB database if there is a need as follow:
* run "db2 connect to TEMADB"
* run "db2 force application all"
* run "db2 backup database TEMADB to <destination-folder>"
There is a chance seeing such error below:
SQL1035N The operation failed because the specified database cannot be connected to in the mode requested.
To fix it, run "db2 deactivate db TEMADB" command. Then repeat the last DB2 command above to ensure it executed successfully.
9) Proceed the initial datasource setup page until the TEMADB database is recreated and until the Import page is displaying. Click on the Import Now button.

10) The initial import task will most likely fail due to existing software catalog file existed on the LMT server. Then proceed step 11 - 12 below.
However, with latest release of LMT v9.2.5.x installed, the initial import task should run successfully without issue with the catalog file. Then jump to step 13 below.
11) Go to BES Console and look up for this fixlet ID 48 below as example from the LMT site.
48 Software Catalog Update (Version: 2016-10-17)
Note: the version will change from each update.
Verify if this fixlet is relevant to LMT server as it should. Take action and ensure this task runs successfully. Review the Description tab of this fixlet for instructions on uploading the catalog to the server.
12) It is important to go to Management | Data Import page and click on Import Now button to import the software catalog (after uploaded the software catalog from the previous step) in order to fix up the initial import task failure. This import task might take up to an hour to complete.
13) When the import task is completed successfully as it should, verify all the information in the LMT console to ensure everything looks fine.
Now a new TEMADB database should contain new data gathered from the IEM Server including the VM Manager data, HW and SW scan data, etc... Recommend to manually run another import task just to be sure everything looks ok.
Check the following log files for more information if a failure occurs.
/opt/IBM/LMT/wlp/usr/servers/server1/logs/tema.log
/opt/IBM/LMT/wlp/usr/servers/server1/logs/imports\*.log (ETL - actual import task log)
/home/db2inst1/sqllib/db2dump/db2diag.log
If the above steps don't help, reinstall the ILMT product again using steps documented in the product installation guide.
Note: steps described in this technote are not officially supported and documented in the product documentation.
1) Stop the LMT sever service (/opt/IBM/LMT/cli/srvstop.sh script).
2) Login to DB2 server with db2 instance owner ID (default is db2inst1) and run "db2 list db directory" command to verify the TEMADB is listed.
Sample:
System Database Directory
Number of entries in the directory = 1
Database 1 entry:
Database alias = TEMADB
Database name = TEMADB
Local database directory = /TEMADB
Database release level = 10.00
Comment = IEM for ILMT database
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =
Note: Default database name can be called TEMADB. For this exercise, it will be using TEMADB database.
3) Optional step - backing up the existing TEMADB database if there is a need as follow:
* run "db2 connect to TEMADB"
* run "db2 force application all"
* run "db2 backup database TEMADB to <destination-folder>"
There is a chance seeing such error below:
SQL1035N The operation failed because the specified database cannot be connected to in the mode requested.
To fix it, run "db2 deactivate db TEMADB" command. Then repeat the last DB2 command above to ensure it executed successfully.
4) Run "db2 drop db TEMADB" to drop the TEMADB database.
5) Run "db2 list db directory" command to verify the TEMADB is no longer listed.
6) Go back to LMT server and rename this /opt/IBM/LMT/wlp/usr/servers/server1/config/database.yml to old-database.yml.bak.
7) Restart LMT server service (/opt/IBM/LMT/cli/srvstart.sh script).
8) Open a web browser and enter the following URL link:
![]()
where hostname is your LMT server's hostname. It should bring up the initial datasource setup page.

9) Proceed the initial datasource setup page until the TEMADB database is recreated and until the Import page is displaying. Click on the Import Now button.
10) The initial import task will most likely fail due to existing software catalog file existed on the LMT server. Then proceed step 11 - 12 below.
However, with latest release of LMT v9.2.5.x installed, the initial import task should run successfully without issue with the catalog file. Then jump to step 13 below.
11) Go to BES Console and look up for this fixlet ID 48 below as example from the LMT site.
48 Software Catalog Update (Version: 2016-10-17)
Note: the version will change from each update.
Verify if this fixlet is relevant to LMT server as it should. Take action and ensure this task runs successfully. Review the Description tab of this fixlet for instructions on uploading the catalog to the server.
12) It is important to go to Management | Data Import page and click on Import Now button to import the software catalog (after uploaded the software catalog from the previous step) in order to fix up the initial import task failure. This import task might take up to an hour to complete.
13) When the import task is completed successfully as it should, verify all the information in the LMT console to ensure everything looks fine.
Now a new TEMADB database should contain new data gathered from the IEM Server including the VM Manager data, HW and SW scan data, etc... Recommend to manually run another import task just to be sure everything looks ok.
Check the following log files for more information if a failure occurs.
/opt/IBM/LMT/wlp/usr/servers/server1/logs/tema.log
/opt/IBM/LMT/wlp/usr/servers/server1/logs/imports\*.log (ETL - actual import task log)
/home/db2inst1/sqllib/db2dump/db2diag.log
If the above steps don't help, reinstall the ILMT product again using steps documented in the product installation guide.
Note: steps described in this technote are not officially supported and documented in the product documentation.
[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SS8JFY","label":"IBM License Metric Tool"},"Component":"--","Platform":[{"code":"PF016","label":"Linux"}],"Version":"9.0, 9.1 and 9.2","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]
Was this topic helpful?
Document Information
Modified date:
26 April 2021
UID
swg21681941