Wednesday, January 9, 2008

Purge deleted user db in ClearQuest

In ClearQuest designer, admin user can delete one user database and undelete to use again. Sometimes, we do not want to see the deleted user db in CQ designer, for example, the user db is not used any more.Here is the steps to do

In Non-Multisite env

    1. In ClearQuest designer, click Delete Databases manu under Database and delete the db you want.
    2. Run below command
      Installutil purgedeleteduserdb dbsetname admin_user admin_pwd db_name
    3. Remove the physical db

After the command in step b is executed, the deleted userdb can not be viewed in the ClearQuest designer any more.


In Multisite env
Suppose we have one family named Test in sites Q3 (master site) and ZL with clan name OL. Now we want to purge the user db in both of the sites. Here are the steps,

    1. In the ZL site, change master ship of all entities from ZL to Q3 site with below command.
      Multiutil chmaster -cl ol -site ZL -family Test -u admin_user -p admin_pwd Q3 -all
    2. Synchronize the changes from ZL to Q3 site and other sites if any
    3. In the master site Q3, remove the Test replica in ZL with below command
      Multiutil rmreplica -cl ol -site Q3 -family Test - u admin_user -p admin_pwd ZL
    4. Synchronize the changes from Q3 to ZL site and other sites if any
    5. Delete the Test user db in ZL site with following command.(The step can not do in ClearQuest designer in ZL site since the manu is disabled)
      Installutil disconnectuserdb -dbset CQMS.OL.ZL admin_user admin_pwd Test
    6. Purge deleted Test user db in ZL site with following command
      Installutil purgedeleteduserdb CQMS.OL.ZL admin_user admin_pwd
    7. Synchronize the changes from ZL to Q3 site and other sites if any
    8. Deactivate the Tester user db in master site Q3 with following command
      Multiutil deactivate -cl ol -site Q3 -family Test -u admin_user -p admin_pwd
    9. Delete the Test user db in Q3 site in ClearQuest designer or below command
      Installutil disconnectuserdb -dbset CQMS.OL.Q3 admin_user admin_pwd Test
    10. Purge the delted Test userdb in Q3 with below command
      Installutil purgedelteduserdb  CQMS.OL.Q3 admin_user admin_pwd Test
    11. Remove the physical db

Somtimes, the step h and j will result error.  But it works well if delete the records related Test userdb from master_dbs, master_id_blocks, master_replicas directly in master db.