Mass contact inactivation
search cancel

Mass contact inactivation

book

Article ID: 404498

calendar_today

Updated On:

Products

CA Service Management - Service Desk Manager CA Service Desk Manager

Issue/Introduction

This document describes an approach that one may use to inactivate a large number of contact records within Service Desk

Environment

All releases of CA Service Desk Manager

Resolution

  1. Backup the database table ca_contact

  2. On the SDM Server, in an Admin command prompt, run
    pdm_extract -f "Select inactive, id, userid from ca_contact where inactive = 0 and userid LIKE 'a%'" > contact-a.dat

    This will return a list of contacts whose userid starts with "a" and are also active state.  Example shown
    TABLE ca_contact

            inactive id userid
          { "0" ,"D1234567891234567891234567891234" ,"Asmith" }
          { "0" ,"72345678912345678912345678912345" ,"ahd" }
          { "0" ,"88912345678912345678912345678912" ,"AJones" }
  3. Edit the generated contact-a.dat file in Notepad and change all of the "0" values listed, and remove any entries which should be preserved.  The example would read like this:
    TABLE ca_contact
          inactive id userid
          { "1" ,"D1234567891234567891234567891234" ,"Asmith" }
          { "1" ,"88912345678912345678912345678912" ,"AJones" }


    In this scenario, we removed the "ahd" user, which is an essential internal user which should not be disabled.  The other contacts "Asmith" and "AJones" are to be disabled.

  4. Save the file, then run this command to make the change
    pdm_load -f contact-a.dat -a

 

Additional Information

The above is described as an example only.  Support is not permitted to assist you to further develop the above into a custom script, nor can Support assist you in tweaking the above in any way to suit a specific need.  Performing the change directly in the database itself is not advised.  

We also recommend that you test the above in a non-production instance and also start with a small scale set of users

If there is an existing LDAP integration being considered as part of the mass inactivation, if there is a user with existing data relationships present within SDM, inactivating the user and replacing it with a version from LDAP integration may result in some data anomalies.  For instance, disabling the above "Asmith" user in SDM, then importing a new "Asmith" user via LDAP integration may result in:

  • Two duplicate entries in SDM, both with the "Asmith" userid, but with different permissions within SDM.  One would be active and the other is inactive.  We do not support deleting a contact record within SDM.

  • Any existing Service Desk tickets may reference the original "Asmith" user, as assignee or customer or any other contact field that could name the user, and only new tickets moving forward will reference the new "Asmith" user.

Deletion of a contact record is not supported within Service Desk.  This is due to the number of areas within the database schema that involves the contact records.  Deletion may result in dangling persid errors reported in the stdlog.