Tuesday, March 27, 2012

Exec replacement

I have a large query that needs to run .
This query has a lot of dinamic parameters ( i.e. wich are send from
the aplicattion ie (1,2,3)).
There are NO select rights granted on the table for the application
role so i need to run a stored proc.
If I put exec in the stored proc i get a error message saying I do not
have the rights. How should I go around and replace exec. I need a
efficient solution.
Thank you,Perhasps you need to create a UDF . Or grant SELECT/UPDATE/INSERT/DELETE
permissions on underlying tables
<petcu.bogdan@.gmail.com> wrote in message
news:1127908009.777329.306010@.g14g2000cwa.googlegroups.com...
>I have a large query that needs to run .
> This query has a lot of dinamic parameters ( i.e. wich are send from
> the aplicattion ie (1,2,3)).
> There are NO select rights granted on the table for the application
> role so i need to run a stored proc.
> If I put exec in the stored proc i get a error message saying I do not
> have the rights. How should I go around and replace exec. I need a
> efficient solution.
> Thank you,
>|||On 28 Sep 2005 04:46:49 -0700, petcu.bogdan@.gmail.com wrote:

>I have a large query that needs to run .
>This query has a lot of dinamic parameters ( i.e. wich are send from
>the aplicattion ie (1,2,3)).
>There are NO select rights granted on the table for the application
>role so i need to run a stored proc.
>If I put exec in the stored proc i get a error message saying I do not
>have the rights. How should I go around and replace exec. I need a
>efficient solution.
>Thank you,
Hi petcu,
Check out the site below. It explains why you can't use dynamic SQL with
your security setup, and also gives alternatives for all common uses for
dynamic SQL.
http://www.sommarskog.se/dynamic_sql.html
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)

No comments:

Post a Comment