Copy Scheduled Reports of one user to another
search cancel

Copy Scheduled Reports of one user to another

book

Article ID: 373451

calendar_today

Updated On:

Products

VMware Smart Assurance

Issue/Introduction

Copy scheduled report from one user to another user

Environment

MnR 10.1.5.1

Resolution

  1. Log into a Linux shell on the back end database Linux host where the master database is hosted under an account with root access privileges.
  2. Initiate a database shell on that host with the master database by running the following commands (where{APG}, including curly braces, is a placeholder that should be replaced by the path where M&R was installed before the commands are run):
    cd {APG}/bin
    ./mysql-client.sh
  3. At the login prompt, accept the default user [apg] by hitting enter, but directly specify the database name of master instead of the default [apg] before supplying the database password in your instance (default password is watch4net).
  4. Run the following query to identify the ID value associated with the old user account that is the current owner of the report schedules (where {user name}, including curly braces, is a placeholder that should be replaced by the user name used by the old user to log into the Web UI), then run the query again substituting the new user's user name to get that ID value as well:
    SELECT id, username FROM users WHERE username = '{user name}';
  5. Log into a Linux shell on the front end or report processing host where the user's dedicated path for report schedule task files is located under an account with root level access, then navigate to the below path (where {APG} is a placeholder as noted in Step 2 above and {ID#}, including curly braces, is a placeholder for the user ID value obtained for the old user account in Step 4 above):

    <APG>/Tools/Task-Scheduler/Default/data/task_repository/scheduled-reports/user<ID number>

  6. Make copies of all files having an extension *.task in the old user's path and move them to the new user's path in the parallel directory having a name ending in the new user's ID value obtained from Step 4 above.

  7. In the new user's path, open and edit each of the *.task files to substitute the new user's ID number in place of the old user's ID number in each of the following highlighted XML tag locations noted below, then save the files:
            <parameters>
                <param>{"ownerId":{ID#},"link":"0-t62ce62219462574b-h3be939af6a01bc09-62e6fb85-6a534c1f","storage":{"storedRecipients":"","storedOption":1},"type":"SingleReport"}</param>
                <param>conf/report-generation-config.xml</param>
            </parameters>
        </action>
        <execution-locks>
            <lock max-simultaneous="1">user_{ID#}</lock>
            <lock max-simultaneous="16">scheduled-report</lock>
        </execution-locks>
  8. Delete all of the old task files from the old user's dedicated path.
  9. Restart services on the front end to cause the changes to be read.

Additional Information

Please note that in the above instructions, no attempt is made to identify which report schedule belongs to which*.task file. The process moves all of the old user schedules over to the new user without regard to ownership of the report. Also, please note that even after the move, the schedules will only become visible if the new user has full permissions on all required objects that were held by the old user.