Hi,
I programmed a Sp, which I gave permissions to some users to execute,
nevertheless, inside the code makes inserts and updates to tables where they
only have select permissions. So whenever they execute them a error message
is produced. How can i turnaround this. I want the sp to actually write in
some tables which they only have select permissions. Is there a solution.
Thanks
--
Carlos DiasHi,
Execute permission on the SP for that user should be fine to Insert or
Delete or Update.
GRANT EXEC ON SPNAME TO Username
Thanks
Hari
SQL Server MVP
"Carlos Dias" <CarlosDias@.discussions.microsoft.com> wrote in message
news:1801CAC0-5691-4146-B63C-7E2E99E87405@.microsoft.com...
> Hi,
> I programmed a Sp, which I gave permissions to some users to execute,
> nevertheless, inside the code makes inserts and updates to tables where
> they
> only have select permissions. So whenever they execute them a error
> message
> is produced. How can i turnaround this. I want the sp to actually write in
> some tables which they only have select permissions. Is there a solution.
> Thanks
> --
> Carlos Dias|||It would help us better assist you if you could include table DDL, and the
entire stored procedure code. Without this effort from you, we are just
playing guessing games.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"Carlos Dias" <CarlosDias@.discussions.microsoft.com> wrote in message
news:1801CAC0-5691-4146-B63C-7E2E99E87405@.microsoft.com...
> Hi,
> I programmed a Sp, which I gave permissions to some users to execute,
> nevertheless, inside the code makes inserts and updates to tables where
> they
> only have select permissions. So whenever they execute them a error
> message
> is produced. How can i turnaround this. I want the sp to actually write in
> some tables which they only have select permissions. Is there a solution.
> Thanks
> --
> Carlos Dias|||Users do not need any permissions on tables used in a stored procedure as
long as:
1) all objects are owned by the same user (SQL 2000) or have same schema
owner (SQL 2005)
2) you do not use dynamic SQL
This behavior is known as ownership chaining. See the Books Online for more
information.
Hope this helps.
Dan Guzman
SQL Server MVP
"Carlos Dias" <CarlosDias@.discussions.microsoft.com> wrote in message
news:1801CAC0-5691-4146-B63C-7E2E99E87405@.microsoft.com...
> Hi,
> I programmed a Sp, which I gave permissions to some users to execute,
> nevertheless, inside the code makes inserts and updates to tables where
> they
> only have select permissions. So whenever they execute them a error
> message
> is produced. How can i turnaround this. I want the sp to actually write in
> some tables which they only have select permissions. Is there a solution.
> Thanks
> --
> Carlos Dias
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment