Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

Problem with 'execute as login' on running stored procedure

$
0
0
Hi Everyone.We have a sp1 which is being called by User1. In this SP there are some tables that User1 does not have access to them, so I have to create another user2 and give proper permission to that user. when I ran the sp1 while I am login by User1 with 'execute as login = 'User2'',I recieved below error message:Cannot execute as the server principal because the principal "User2" does not exist, this type of principal cannot be impersonated, or you do not have permission. But if I ran the same statment while I login as sysadmin , I dont have any problem.I would appreciate if someone help me on this.Thanks

Viewing all articles
Browse latest Browse all 3145

Trending Articles