Article ID: 913423 - Last Review: February 14, 2006 - Revision: 1.2 You cannot run a statement or a module that includes the EXECUTE AS clause after you restore a database in SQL Server 2005Bug #: 397455 (SQLBUDT) SYMPTOMSWhen you run a statement or a module that includes the EXECUTE AS
clause in Microsoft SQL Server 2005, you may receive the following error message: 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.
CAUSEThis problem occurs because SQL Server 2005 cannot obtain the
information about the context when you try to impersonate a database user to
run a statement or a module. SQL Server cannot obtain the information about the context that you are trying to impersonate under the conditions that are listed in the "Symptoms" section. If you impersonate a SQL Server authorization login, SQL Server cannot find a login that matches the security identifier (SID) of the impersonated user. If you impersonate a domain user, the domain controller cannot find the information about the specific user who matches the SID of the impersonated user. WORKAROUND To work around this problem, change the database owner to a
valid login or domain user. To do this, run the following statements: STATUSMicrosoft
has confirmed that this is a problem in the Microsoft products that are listed
in the "Applies to" section. | Article Translations
|
Back to the top
