Mass-Update All UDPs
search cancel

Mass-Update All UDPs

book

Article ID: 388545

calendar_today

Updated On:

Products

CA Harvest Software Change Manager CA Harvest Software Change Manager - OpenMake Meister

Issue/Introduction

My previous version of Harvest was installed to the folder "C:\Program Files (x86)\CA\SCM".  My hsmtp.arg configuration file and my folder containing all UDP scripts were positioned inside the Harvest Home folder.  The location of the UDP scripts was "C:\Program Files (x86)\CA\SCM\UDP".  When I upgraded to Harvest 14.5 on a new server, I changed the installation location to "E:\Program Files\CA\SCM".  Even after copying my hsmtp.arg file to the new Harvest Home folder and moving the UDP folder, notifications and UDPs still don't work.  

Environment

Harvest Software Change Manager all versions

Cause

Harvest stores in its database the details about each UDP and Notify process defined in all projects and states.  You can see this by looking at the "Program" field for a UDP:

Or execute this SQL to get a quick list of the contents of the "Program" field for all UDPs defined in the Harvest database:

SELECT PROGRAMNAME FROM HARUDP;

For the Notificaton processes, you should check the "Mail Utility" field to see if a specific path has been specified for the hsmtp or mailx command:

Or execute this SQL to get a quick list of the contents of the "Mail Utility" field for all Notify processes defined in the Harvest database:

SELECT MAILFACILITY FROM HARNOTIFY;

Resolution

There are three options for resolving this problem.  They are:

  1. In the Harvest Administrator Tool you can edit the properties for each UDP and Notify process in every project and state, making the update manually on a case by case basis.

    -or-

  2. In the Harvest Administrator Tool you can use the Harvest Bulk Update utility to mass-change UDPs and Notify processes.Execute the SQL in this article (137209)  to get a listing of every UDP in the database.  This will help when selecting which UDPs to update with the Bulk Update Utility

    -or-

  3. You can use Oracle or SQL Server UPDATE statements to make the change quickly across all affected records in the database.  First, execute the SQL in this article (137209) to get a listing of every UDP in the database.  This will help when selecting which UDPs to update with direct SQL.

    To update UDP processes with SQL

    1. Take a backup of the HARUDP table when updating UDP processes

      (SQL Server) SELECT * INTO BACKUP_HARUDP FROM HARUDP
      (Oracle) CREATE TABLE BACKUP_HARUDP AS SELECT * FROM HARUDP;

    2. Update all the records with an SQL update statements

      UPDATE HARUDP
         SET PROGRAMNAME = REPLACE(PROGRAMNAME, 'C:\Program Files (x86)\CA\SCM', 'E:\Program Files\CA\SCM')
       WHERE PROGRAMNAME LIKE 'C:\Program Files (x86)\CA\SCM%'

To update Notify processes with SQL

    1. Take a backup of the HARNOTIFY table when updating the Notify processes

      (SQL Server) SELECT * INTO BACKUP_HARNOTIFY FROM HARNOTIFY
      (Oracle) CREATE TABLE BACKUP_HARNOTIFY AS SELECT * FROM HARNOTIFY;

    2. Update all the records with an SQL update statements 

      UPDATE HARNOTIFY
         SET MAILFACILITY = REPLACE(MAILFACILITY, 'C:\Program Files (x86)\CA\SCM', 'E:\Program Files\CA\SCM')
       WHERE MAILFACILITY LIKE 'C:\Program Files (x86)\CA\SCM%'

Note: These SQL statements are offered as an example.  You should make the necessary adjustments to fit your situation.  It is highly recommended to perform these steps on a test system before applying the changes in the production environment.

Additional Information

This article, How to find all the UDP scripts as part of moving the Harvest Broker, has a SQL that can list out the details about every UDP defined for every project and state.

This page in the Harvest documentation, Bulk Update Projects and Lifecycles, provides information about how to use the Bulk Update utility.