Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 exec perms on sprocs

Author  Topic 

influent
Constraint Violating Yak Guru

367 Posts

Posted - 2005-07-07 : 11:39:27
Is there a way to give a user exceute permissions on all stored procedures without going through and manually doing so on each and every sproc? The user should not be able to write to the db... we have quite a few sprocs simply for reporting that the user needs to be able to execute. Should I make the user dbadmin but do denydatawriter?

Thrasymachus
Constraint Violating Yak Guru

483 Posts

Posted - 2005-07-07 : 12:34:09
db_admin implies a lot of extra rights you may not want to grant.

Sean Roussy

Please backup all of your databases including master, msdb and model on a regular basis. I am tired of telling people they are screwed. The job you save may be your own.

I am available for consulting work. Just email me though the forum.
Go to Top of Page

influent
Constraint Violating Yak Guru

367 Posts

Posted - 2005-07-07 : 12:39:01
Thanks...so what should I do?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-07-07 : 13:06:18
Search the forums for isp_Grant_Permissions. It's a stored procedure that I wrote that grants execute permissions on stored procedures.

Tara
Go to Top of Page

influent
Constraint Violating Yak Guru

367 Posts

Posted - 2005-07-07 : 13:53:09
Thanks Tara, but I got "No matches found."
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2005-07-07 : 13:56:15
something like

declare @s varchar(128), @sql varchar(2000)
select @s = ''
while @s < (select max(name) from sysobjects where xtype = 'U')
begin
select @s = min(name) from sysobjects where xtype = 'U' and name > @s
select @sql = 'grant exec on ' + @s + ' to myuser'
exec (@sql)
end


==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -