Absent Member.. Ana-Acosta Absent Member..
Absent Member..

UCMDB Support Tip: How to use dbtool

dbtool.bat file is located at following location …\\hp\UCMDB\UCMDBServer\tools\dbscripts
Its purpose - The dbtool.bat also known as dbtool, can be used in the following cases (Please note it needs to be run from command prompt. It is recommended to keep a copy of console text after dbtool finishes execution):

1. Consistency: Delete obsolete rows from db (that cause error “Primary key constraint error” in mam-autodiscovery log) Syntax: dbtool.bat consistency

2. Aging: Delete aged CIs (that aging might take longer time to remove CI depending on the amount of CIs. Its important to reviews point 1,2,3 and 4 below in important notes) Syntax: dbtool.bat aging

3. Delete CI by CIT: Delete CIs by classtype.  Syntax: dbtool.bat type software (the above command will delete all CIs of type “installed software”)


  1. Please review the readme.txt enclosed with the dbtool_consistency.zip attached below. It contain deployment information (UCMDB prior to 8.04 only)
  2. Running the tool requires complete UCMDB/BAC server shutdown.
  3. Before running the tool, a CMDB database backup should be performed
  4. In Aging or Delete CI by CIT mode - the tool deletes aged CIs and relationships without recording the deletion event in CMDB History.
  5. It is highly recommended to run the tool in the testing environment against a copy of the real CMDB database first, before applying it in production
  6. This tool supports Oracle and SQL Server 2005 databases.


  1. Most information related to execution of dbtool is logged in dbtool.log, this log file is present under log folder of the respective UCMDB/BAC machine.
  2. dbtool can be run in DEBUG mode to provide additional DEBUG information in dbtool.log. DEBUG can be enabled on dbtool logging by modifying dbtool.properties as shown below.  The dbtool.properties can be located under directory <BSM/UCMDB install>\conf\core\tools\log4j\PlainJava\ Find following two lines in dbtool.properties log4j.category.cmdb.db.tool=INFO, dbtool, stdout##log4j.category.com.mercury=DEBUG, debug_appender

    Modify the above line so they look like follows to enable DEBUG on dbtool.log##log4j.category.cmdb.db.tool=INFO, dbtool, stdout log4j.category.com.mercury=DEBUG, debug_appender

Note: When using windows authentication to connect to the MS SQL DB, the dbtool needs to be run with the appropriate user i.e. right click on the dbtool batch file, choose "Run as" and then choose the relevant user. The reason is that when running against MSSQL DB, dbtool does not specify a specific database. It assumes that the database the user has access to is the UCMDB database. When using Windows credentials to access MSSQL there is a possibility that the login user is not the UCMDB user. Thus, the dbtool will run against whatever DB that the login user has access. This creates tables in the wrong DB and causes dbtool to throw errors later on.

"HP Support
If you find this or any post resolves your issue, please be sure to mark it as an accepted solution."

Click the KUDOS star on the left to say 'Thanks'
Labels (1)
Tags (1)
2 Replies
Absent Member.. jowillia Absent Member..
Absent Member..

Re: UCMDB Support Tip: How to use dbtool

when running NEWdbtool gainst 10.10 database on SQL Server 2008, using database crfedentials, not NTLM authentication, I get errors about the user not having permissions to "perform this action" - which action is not specified.

The database user is the same one that uCMDB runs with. So, what additional permissions does the user need above th ones necessary to run uCMDB ?

The user has db_owner role 


Absent Member.. jowillia Absent Member..
Absent Member..

Re: UCMDB Support Tip: How to use dbtool

The answer was that the user needed to be sysadmin - which seems to be overkill but nothing else worked.

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.