hi all,
we are using dynamic sql statement in stored procedure.
Like
create procedure getCustomer(
@strCustId as string
)
as
declare @sql as varcahr(100)
begin
select @sql=' select * from customer_master
where cust_id in ('+ @strCustId + ')'
Execute(@sql)
end
When a user was given only exceute permissions to the stored procedures
when he execute the procedure it shows error like select permission denied
on the table customer_master.
Note. We have given permission to execute the stored procedures
The database role of the user is public.
When we give the db_datareader permission it works fine. But unfortunately
we cann't give the permission to the user.
Please help me in this problem.....
Thanks in advance
regards
Sukumar Krishan
_________________________________________________________________
Let your desktop sizzle! Get the hottest wallpapers.
http://www.msn.co.in/entertainment/ Right here at MSN Entertainment!
MS Sql Server LazyDBA home page