He can use EXECUTE AS in order to avoid granting permissions on the
underlying tables.

Signature
Tom
----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
Hi
Who is an owner of this SP?
Avoid adding logins to the public role. Grant an execution permission to the
stored procedure ( be aware if you are using dynamic sql within this sp ,
you'll have to grant permissions on underlying tables as well)
> I've made a stored procedure stp_LogError which will be used to have a
> central errorhandling system.
[quoted text clipped - 24 lines]
>
> Can someone explain this to me
Uri Dimant - 28 Mar 2006 14:05 GMT
Tom
Yep ( I have just forgotten that he uses SQL Server 2005) , however I still
think it will be better to GRANT EXECUTE permissions rather using EXECUTE
AS command , (it is easy to forget REVERT and ect. )
> He can use EXECUTE AS in order to avoid granting permissions on the
> underlying tables.
[quoted text clipped - 35 lines]
>>
>> Can someone explain this to me
Tom Moreau - 28 Mar 2006 15:23 GMT
You don't need REVERT when you create a proc with the EXECUTE AS option.

Signature
Tom
----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
Tom
Yep ( I have just forgotten that he uses SQL Server 2005) , however I still
think it will be better to GRANT EXECUTE permissions rather using EXECUTE
AS command , (it is easy to forget REVERT and ect. )
> He can use EXECUTE AS in order to avoid granting permissions on the
> underlying tables.
[quoted text clipped - 35 lines]
>>
>> Can someone explain this to me
The owner of the stored procedures is dbo.
So I'v made a fe stp_insertEmp, and granted user Jefke execute rights on
stp_InsertEmp. I've also granted execute rights to public for stp_logerror.
In the catch block inside stp_InsertEmp, stp_LogError is called.
When user Jefke executes stp_InsertEmp and an error occurs, stp_LogError
should be called. But then we receive an execute permission denied on
sto_LogError.
> Hi
> Who is an owner of this SP?
[quoted text clipped - 30 lines]
> >
> > Can someone explain this to me