Submit a ticketCall us

whitepaperYour VM Perplexities Called, and They Need You to Read This.

Virtualization can give you enormous flexibility with future workloads and can be a key enabler for other areas, like cloud computing and disaster recovery. So, how can you get a handle on the performance challenges in your virtual environment and manage deployments without erasing the potential upside? Learn the four key areas you need to be focusing on to help deliver a healthy and well-performing data center.

Get your free white paper.

Home > Success Center > Patch Manager > Patch Manager - Knowledgebase Articles > 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 Jared.Jackson on Dec 17, 2018

Views: 3,500 Votes: 1 Revisions: 12

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