| title | MSSQLSERVER_15517 | Microsoft Docs | |
|---|---|---|
| ms.custom | ||
| ms.date | 04/04/2017 | |
| ms.prod | sql | |
| ms.reviewer | ||
| ms.technology | supportability | |
| ms.topic | language-reference | |
| helpviewer_keywords |
|
|
| ms.assetid | f94287f5-129f-4c52-9d34-62b996088001 | |
| author | MashaMSFT | |
| ms.author | mathoma |
[!INCLUDEappliesto-ss-xxxx-xxxx-xxx-md]
| Product Name | [!INCLUDEssNoVersion] |
| Event ID | 15517 |
| Event Source | MSSQLSERVER |
| Component | SQLEngine |
| Symbolic Name | SEC_CANNOTEXECUTEASUSER |
| Message Text | Cannot execute as the database principal because the principal "principal" does not exist, this type of principal cannot be impersonated, or you do not have permission. |
Use the name of an existing principal or get the IMPERSONATE permission on that principal.
15517 can also occur after performing an attach and restore of a database by someone other than the original database owner. To resolve this error, change the db_owner to a login on your server, by running the following command:
ALTER AUTHORIZATION ON DATABASE:: DBName TO [NewLogin]