Got error message in Event viewer

I am getting an error message in my Event viewer of windows server 2008 R2.

"Error Message is: An exception occurred while enqueueing a message in the target queue. Error: 15517, State: 1. Cannot execute as the database principal because the principal "dbo" does not exist, this type of principal cannot be impersonated, or you do not have permission. "

when i try to resolve this problem by changing the authorization using the query
"ALTER AUTHORIZATION ON DATABASE::[database name] TO sa;" ........it shows another error message "Msg 15110, Level 16, State 1, Line 1
The proposed new database owner is already a user or aliased in the database.".

After that I tried to drop that user so that I could add that particular user again..result of this experiment was like..."Msg 15008 , Level 16, State 1, procedure sp_dropuser, Line 12 user 'acsyssvc' does not exist in the current database. "

What would be the current db owner of that database? You can use this script to get the info:

select suser_sname(owner_sid) from sys.databases where name = '[databae name]'

That might give us some direction of how to resolve your issue.

yeah...thank you for replying...

..the result of that qurey which you gave is...."HI\acsyssvc"

that make sense now, so you will just need to change the DB owner.

you can run below under your DB: sp_changedbowner 'sa'

Then you can have the DB owner as sa, you can then give all necessary permission to user HI\acsyssvc if required.

Hope this helps

1 Like