Showing posts with label updates. Show all posts
Showing posts with label updates. Show all posts

Monday, March 26, 2012

Permissions with sp

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

Friday, March 23, 2012

permissions to run sp_configure

Is possible to run sp_configure 'allow updates',1 by user
who is not granted sysadmin role?Yes, the servadmin role also has permissions. Here's the check inside
sp_configure:
if (not is_srvrolemember('serveradmin') = 1)
begin
raiserror(15247,-1,-1)
return (1)
end
Also, for this to be in effect, you need to run RECONFIGURE as well, and
according to BOL:
RECONFIGURE permissions default to members of the sysadmin and serveradmin
fixed server roles, and are not transferable.
--
Tibor Karaszi
"kim" <anonymous@.discussions.microsoft.com> wrote in message
news:040c01c3a31d$56d95a90$a401280a@.phx.gbl...
> Is possible to run sp_configure 'allow updates',1 by user
> who is not granted sysadmin role?