How to delete blank groups and group lists via command prompt

Document ID : KB000031127
Last Modified Date : 14/02/2018
Show Technical Document Details

Groups:

  1. Login to sqlplus as the sysdba user

    sqlplus "NH_USER/NH_USER@NH_DB_CONNECT_STRING as sysdba"

    where NH_USER is the login name and password of the eHealth user and NH_DB_CONNECT_STRING is the value of the variable of the same name.

  2. Run the following query.

    SELECT name, group_id,machine_id
    FROM nh_group
    WHERE group_id > 1000000 and concat(group_id,machine_id) not in
    (SELECT concat(group_id,group_machine_id) FROM nh_group_members);

  3. Exit from sqlplus

    exit

  4. Get the list and then use the following command to delete the groups

    nhGroup -delete -groups "group1,group2,group3"

 

Group Lists:

  1. Login to sqlplus as the sysdba user

    sqlplus "NH_USER/NH_USER@NH_DB_CONNECT_STRING as sysdba"

    where NH_USER is the login name and password of the eHealth user and NH_DB_CONNECT_STRING is the value of the variable of the same name.

  2. Run the following query

    SELECT name, group_list_id,machine_id
    FROM nh_group_list
    WHERE group_list_id > 1000000 and concat(group_list_id,machine_id) not in
    (SELECT concat(group_list_id,group_machine_id) FROM nh_group_list_members);

  3. Exit from sqlplus
    exit

  4. Use the names from the output in step 2 in the following command.

    nhGroupList -delete -groupLists "groupList1,groupList2,groupList3"