Service Management DB Cleanup Utility Problems

book

Article ID: 143579

calendar_today

Updated On:

Products

CA IT Asset Manager CA IT Asset Manager Asset Portfolio Management CA Service Desk Manager CA Service Catalog CA Service Management - Asset Portfolio Management CA Service Management - Service Desk Manager

Issue/Introduction

In the Service Management Install Media, there is a "DBCleanupUtility" directory which contains a batch script to remove install server materials from a given MDB server.  One may be instructed to run the batch script to remove references to the previous server materials associated with the given product.  While the script appears to run successfully, a review of the generated UninstallCleanup.log file will present this message:

Could not find stored procedure 'DBCleanupUtility.sql'.

Cause

In file DBCleanupUtility.bat, line 200, the command reads as:

SQLCMD -b -S "%hostName%,%port%" -P "%pass%" -d "%dbName%" -U "%user%" -Q "EXEC DBCleanupUtility.sql " >> %tUslmLog%

This line will not work as the -Q argument is meant for running a stored procedure and not an input file.  The command appears to be trying to leverage file DBCleanupUtility.sql and is doing so incorrectly.  

Environment

Release : 17.1

Component : CA Service Management

Resolution

Support has raised a defect to address the given issue.  In the interim, end users are instructed to do the following:

  • Copy the entire "DBCleanupUtility" directory to a temporary location

  • Edit file DBCleanupUtility.bat and locate line 200, which reads as:
    SQLCMD -b -S "%hostName%,%port%" -P "%pass%" -d "%dbName%" -U "%user%" -Q "EXEC DBCleanupUtility.sql " >> %tUslmLog%

  • Change this line to read as:
    SQLCMD -b -S "%hostName%,%port%" -P "%pass%" -d "%dbName%" -U "%user%" -i DBCleanupUtility.sql >> %tUslmLog%

  • Save the DBCleanupUtility.bat and run the batch script.

Additional Information

The DBCleanupUtility only removes server and installation materials and not the actual content for the application.  Example:  it will remove the Service Desk Servers that were associated with the given MDB but the server's existing Call_Req, Contact, Activity Log, and other data content for Service Desk will remain untouched.