Is the owner of the Stored Procedure the same as the owner of the table?
If not this could cause problems as access rights will be reassessed.
Regards
Brent
"Sukumar Krishnan" <[Email Address Removed] wrote on 30/04/2004
05:59:42 PM:
> 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!
>
>
> ---------------------------------------------------------------------
> TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
> Get today's cartoon: http://www.LazyDBA.com
> To unsubscribe, e-mail: mssqldba-[Email Address Removed] ,
> then respond to the confirmation email you get
> For additional commands, e-mail: mssqldba-[Email Address Removed]
******************************************************************************
- NOTICE FROM DIMENSION DATA AUSTRALIA
This message is confidential, and may contain proprietary or legally privileged information. If you have received this email in error, please notify the sender and delete it immediately.
Internet communications are not secure. You should scan this message and any attachments for viruses. Under no circumstances do we accept liability for any loss or damage which may result from your receipt of this message or any attachments.
******************************************************************************
MS Sql Server LazyDBA home page