Removing Target Permissions in Bulk
search cancel

Removing Target Permissions in Bulk

book

Article ID: 374323

calendar_today

Updated On:

Products

CA Identity Suite

Issue/Introduction

Managing permissions in bulk can be a challenging task, especially when dealing with a large number of entries. This document provides a solution for removing target permissions in bulk from a database. Please note that this method is not officially tested, and it is crucial to back up your database before proceeding.

There is a need to delete over 6000 target permissions from a database. Performing this task manually is impractical and time-consuming. Therefore, an efficient method is required to remove these permissions in bulk

 

Environment

Identity Portal 14.4

Resolution

To delete target permissions in bulk, the following SQL command can be used. This command assumes that the target permissions have no associations.

DELETE FROM TARGETPERMISSION WHERE ID=528;

Example:

The above command will delete the target permission with the tag TP_CAIM_ATTRIBUTE_%imString116% that is associated with ID=528.

Steps to Follow

  1. Backup the Database: Ensure a complete backup of the database is made before executing any deletion commands.
  2. Identify Target Permissions: Verify that the target permissions intended for deletion have no associations.
  3. Execute SQL Command: Run the SQL command to delete the target permissions.

Sample Script

Below is a sample script that can be modified to delete multiple target permissions:

-- Backup the database before running this script
-- Example: DELETE FROM TARGETPERMISSION WHERE ID IN (528, 529, 530, ...);

DELETE FROM TARGETPERMISSION WHERE ID=528;
DELETE FROM TARGETPERMISSION WHERE ID=529;
DELETE FROM TARGETPERMISSION WHERE ID=530;
-- Add more IDs as needed


Additional Information

Important Notice

Before proceeding with the bulk deletion, ensure that a complete backup of the database is made. This solution has not been officially tested, and performing these actions without a backup could result in data loss

Conclusion

While there is no out-of-the-box solution for removing target permissions in bulk, the provided SQL command offers a practical approach. Always ensure a backup of the database is made before performing bulk deletions. This method is efficient but should be used with caution.

Disclaimer

This solution is provided as-is and has not been officially tested. The Broadcom and the author are not responsible for any data loss or issues that may arise from using this method. Always back up the database before performing any bulk operations.