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

9 Nov

SQL2008

This problem occurs (at least in our case) when a user which initially created the database have been deleted/deactivated through ldap – the database will be owned by an invalid user. This is what we did to solve it:

USE databasename

GO
sp_changedbowner sa

GO

Other articles on the same problem

http://imnettellect.blogspot.no/2010/12/cannot-execute-as-database-principal.html

http://ddkonline.blogspot.no/2011/07/fix-for-sql-2008-exception-20-items.html

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: