Security Compliance
Error displays when generating a Patch Manager report
This article addresses an error message that displays in the Patch Manager Administrator Console when you generate a report. Error: Cannot execute as the database principal because the principal ewreportuser does not exist, this type of principal cannot be impersonated, or you do not have permission.
First published date
Last published date
Overview
When you open the Patch Manager Administrator Console and generate a report, the following message displays:
Cannot execute as the database principal because the principal ewreportuser does not exist, this type of principal cannot be impersonated, or you do not have permission.
Product section
Cause
Resolution
Perform one of the following procedures:
- Recreate the user using dbhelper. Using this procedure, you can either delete the user from the directory (recommended) or delete the user from standard execution (at your own risk)
- Delete and recreate the user in SQL Server Management Studio.
Recreate the user using dbhelper
Use the dbhelper application to recreate the user on the affected SQL database server:
- Close the Patch Manager Administrator Console.
- Open a Command Prompt on the Patch Manager server.
- Change directories to the Server folder in the Patch Manager installation folder.
The default location is:
%PROGRAMFILES%\SolarWinds\PatchManager\Server
- Open SQL Server Management Studio.
- Drop the old ewreportuser by deleting the user or executing an SQL command to delete the user.
Delete the user from the directory (recommended)
Expand EminentWare > Security Users and delete ewreportuser.
Delete the user from standard execution (at your own risk)
In SQL Server Management Studio, execute:
-- Scripts are not supported under any SolarWinds support program or service.
-- Scripts are provided AS IS without warranty of any kind. SolarWinds further
-- disclaims all warranties including, without limitation, any implied warranties
-- of merchantability or of fitness for a particular purpose. The risk arising
-- out of the use or performance of the scripts and documentation stays with you.
-- In no event shall SolarWinds or anyone else involved in the creation,
-- production, or delivery of the scripts be liable for any damages whatsoever
-- (including, without limitation, damages for loss of business profits, business
-- interruption, loss of business information, or other pecuniary loss) arising
-- out of the use of or inability to use the scripts or documentation.
USE EminentWare GO EXEC sp_change_users_login 'Report' GO USE EminentWare GO EXEC sp_dropuser 'ewreportuser' GO
If you get an error while trying to delete the user "ewreportuser" both via GUI or SQL command, then rename the user and continue to next step.
Run dbhelper
Enter the following command, where sqlServer is the hostname or IP address of the affected SQL server, and serviceAcct is the Patch Manager service account:
dbhelper /s sqlServer /p createlogins /u serviceAcct /o c:\output.ini
Complete the procedure
- Restart the EminentWare Data Grid Server service.
- Open the Patch Manager Administrator Console.
- Reset the /confirm password in Credentials
- Rerun the report.
Delete and recreate the user in SQL Server Management Studio
If the previous procedure does not resolve your issue, delete and recreate the user in SQL Server Management Studio (SSMS) for the server and Eminentware logins.
- Open SSMS.
- Navigate to the Eminentware db > Security > Logins.
- Select ewreportuser.
- Right-click ewreportuser and click Delete.
- Navigate to Server Security > Logins.
- Select ewreportuser.
- Right-click ewreportuser and click Delete.
- Right-click Logins > New Login.
- Name the new login ewreportuser. No password is required.
- Set the default schema to Master.
- Go to User Mappings.
- Select the Eminentware db and give it public and db_owner permissions.
If the following message displays, drop the old user.
- Go to the EminentWare db logins.
- Make sure the account appeared and has the proper permissions
- If necessary for security compliance, you can remove the EminentWare db login > db_owner rights at the database level at this time.
- Rerun the reports.