Submit a ticketCall us

Have You Auto Renewed? If not, you're missing out.
The SolarWinds Renewal Program comes with a host of benefits including the most recent product updates, 24/7 technical support, virtual instructor-led training and more. Experience all of this with the convenience of Auto Renewal, and never worry about missing any of these great benefits. Learn More.

Home > Success Center > Patch Manager > 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.

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.

Created by Justin Rouviere, last modified by Machaelle LaRue on Jun 16, 2017

Views: 646 Votes: 1 Revisions: 11

Overview

This article provides information about the error message: 

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.

Environment

All current versions of Patch Manager

 

Cause 

You are unable to run Patch Manager reports because the ewreportuser user does not exist on the SQL server you are reporting against.

Resolution

Use the dbhelper application to recreate the user on the affected SQL server:

  1. Close the Patch Manager Console.
  2. Open a Command Prompt on the Patch Manager server, and then change directories to the Server folder in the Patch Manager installation folder. By default:%PROGRAMFILES%\SolarWinds\PatchManager\Server.
  3. Open SQL Management Studio so we can drop the Old ewreportuser
    1. Expand Both the EminentWare and the Security Users and delete the ewreportuser
      1. OR Delete from standard execution (at your own risk)
        1. USE EminentWare
          GO
          EXEC sp_change_users_login 'Report'
          GO
        2. USE EminentWare

          GO

          EXEC sp_dropuser 'ewreportuser'

          GO

 

  1. 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

  1. Restart the EminentWare Data Grid Server service.
  2. Open the Patch Manager Console
  3. Reset /confirm password in Credentials
  4. Rerun the report.

If the above does not resolve your issue please delete and recreate the user in SQL Server Management Studio (SSMS) for the server logins and the Eminentware logins.

  1. Open SSMS and navigate to the Eminentware db > Security > Logins and select the "ewreportuser"
  2. Right-click > Delete
  3. Open up the Server Security > Logins and select the "ewreportuser" 
  4. Right-click > Delete
  5. Right-click Logins > New Login
  6. Name it the "ewreportuser", there is no password needed, and set the default schema to Master
  7. Go to User Mappings and select the Eminentware db and give it public and db_owner permissions
    1. If you get this error make sure you drop the old user
  8. Go to the Eminentware db logins and make sure the account appeared and has the proper permissions
  9. Then you should be able to run the reports.

 

Last modified

Tags

Classifications

Public