Db owner as a group member not user

  • I have a problem where one of my Db's is failing procedures against it and is coming up with the following error.

    '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'

    I have noticed that the Database Owner is not a SQL user but has rights via the BUILTIN\Administrators group is this what is causing the problem, and will adding the user and running changdbowner solve this problem?

    I have a couple of days before I will have access to the machine to fix it but have had chance to have a look and diagnose the problem, is my diagnosis correct?

    By the way I am using Win 2003 and SQL 2005

    Thanks in advance

  • It sounds like it...your error message cannot find a valid SQL id to become the db_owner.

    In most cases unless a vendor app asks for it but the database owner is usually 'sa'

    I would do a sp_changeowner and make 'sa' the owner then retry your procedure.

  • Problem Solved.

    We narrowed our problem down to triggers. We had triggers that were not being run from the username that was created for our database. They must have been run as "dbo" which worked on the development server, but on the live server, we had to go change a couple triggers to run as the user which was created for our database.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply