You cannot run a statement or a module that includes the EXECUTE AS clause after you restore a database in SQL Server 2005
- You back up a database from an instance of SQL Server 2005. Then, you restore the database to an instance of SQL Server 2005 that is installed on another computer.
- The statement or the module is executed as the dbo (database owner) user.
- The owner of the database is a domain user or a SQL Server authorization login.
- If a domain user owns the database, the computer on which you restore the database cannot access the domain.
- If a SQL Server authorization login owns the database, the login does not exist in the new instance of SQL Server 2005.
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.
USE <DatabaseName>GOsp_changedbowner '<NewLogin>'
Article ID: 913423 - Last Review: 02/14/2006 07:39:11 - Revision: 1.2
- kbsql2005engine kbprb kbexpertiseadvanced KB913423