Change the owner of an On-Demand Report
search cancel

Change the owner of an On-Demand Report

book

Article ID: 139470

calendar_today

Updated On:

Products

CA Performance Management - Usage and Administration DX NetOps

Issue/Introduction

How to re-assign the owner of an on-demand report

We had an operator leave recently that had created many custom 'on-demand-reports'.

How can I re-assign the 'owner' to another individual?

How do I change the owner of an on-demand report? 

Change owner of on-demand report templates

The On-Demand report page Owner field shows "--- None ---" instead of a real user. We can't edit or modify the report. How to fix this?

Environment

All supported DX NetOps Performance Management releases

Cause

Before release 22.2.2 when a user is deleted if it's items like On-Demand reports, Scheduled reports and Notifications, were left without an owner causing them to be unmanageable.

The Owner column "--- None ---" value is due to the UserID tied to the report. It's for a deleted user the UI can't find. Indicates the report is left behind from a user that's been removed.

Resolution

For all commands:

  • Enter MySql prompt using this command. Enter the password when prompted.
    • ./mysql -unetqos -p netqosportal
  • Default location for the mysql command is /opt/CA/MySql/bin. Change as needed.

Identify the UserID values to use in re-assignment of the On-Demand reports.

  • Change On-Demand Report ownership for all On-Demand reports owned by one user to another user. Use these steps before a user is removed from the system. We'll identify the old user ID, the ID for the new user that will own the report and make the change.
    • Enter a MySql prompt and run the following command.
      • select UserID,Name from user_definitions;
      • Use the data to find:
        • The UserID for the removed user, the <OLD_USERID>
        • The UserID the new owner we'll set, the <NEW_USERID>
  • Already removed the user? Report owner user not found in in user_definitions? Change On-Demand Report ownership for all On-Demand reports owned by one user to another user. Use these steps if the user was already removed from the system and is no longer found in the user_definitions table
    • Determine the reports with UserID values that don't relate to a user in the system, IE: users with no name defined.
      • Use this to see UserIDs and the number of reports they own, where the UserID isn't found or has no name in the system.
        • select rd.userid, count(*) from report_definitions rd left join user_definitions ud on rd.userid=ud.userid where ud.name is null group by 1 order by 1;
      • The list of UserIDs can be validated using this command to see users and their UserIDs that are still in the system.
        • select UserID,Name from user_definitions;
        • None of the UserIDs for removed users should be tied to a user still in the system.

Change the On-Demand Report ownership

  • After identifying the <OLD_USERID> and <NEW_USERID> values use them in the following commands.
  • NOTE: This will result in all reports owned by the <OLD_USERID> being re-assigned the existing user represented by the <NEW_USERID> value.
  • These must be run in the order listed.
    1. Update the model_properties table with new UserID value.
      • update model_properties set UserID=<NEW_USERID> where UserID=<OLD_USERID> and PageID in (select PageID from report_definitions where UserID=<OLD_USERID>);
    2. Update the page_info2 table with new UserID value.
      • update page_info2 set UserID=<NEW_USERID> where UserID=<OLD_USERID> and PageID in (select PageID from report_definitions where UserID=<OLD_USERID>);
    3. Update the report_definitions table with new UserID value.
      • update report_definitions set UserID=<NEW_USERID> where UserID=<OLD_USERID>;

Additional Information

Starting with NetOps release 22.2.2 there is the ability to Reassign Items from a Deleted User Account to Another User. Upgrade 22.2.2 or newer to obtain this feature and avoid manual reassignment when removing users in the future.

Looking to change ownership for Scheduled Reports? Use KB article: Need to change the owner of Scheduled Reports in NetOps