question

surve_sk avatar image
surve_sk asked

SP Grant issues .................

Suppose I Create one public SP as sp_P which have public acess to all. This SP call another sp suppose sp_Y, which have grant of exec to user Y. Supppose X user call Public SP sp_P, then SSMS raise an error some thing like "you don't have authority to execute that sp (sp_Y)". So, is it possible that, while executing the sp_Y in sp_P I pass credentials because, I don't want to give special grant to any user. Thanks
stored-procedures
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Kev Riley avatar image
Kev Riley answered
You could use [EXECUTE AS][1] in your stored procedures. [1]: http://msdn.microsoft.com/en-us/library/ms188354.aspx
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Fatherjack avatar image Fatherjack ♦♦ commented ·
@surve_sk - all the syntax you need is in the link in the answer.
2 Likes 2 ·
surve_sk avatar image surve_sk commented ·
thnx Kev, but could u give me syntax plz
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.