Friday, February 24, 2012

Execute Permission

Hi,
How do I give user execute permission on the complete
db. I gave them db_datareader, db_datawriter and
db_ddladmin and they still get access denied. Is making
them dbo the only way? I don't realy want to give them
permission one sproc at a time
thanks in advance<anonymous@.discussions.microsoft.com> wrote in message
news:4bed01c3e438$70ad8f70$a601280a@.phx.gbl...
quote:

> How do I give user execute permission on the complete
> db. I gave them db_datareader, db_datawriter and
> db_ddladmin and they still get access denied. Is making
> them dbo the only way? I don't realy want to give them
> permission one sproc at a time

Basically you need to issue the
GRANT EXEC ON <sp_name> TO <username>
For each stored procedure, a cursor could be used to enumerate all tables.
Steve|||Hi,
Use the below script from Query analyzer, replace dbname with actual dbname
and username with actual user name
use dbname
go
declare @.x varchar(8000)
set @.x=''
select @.x = @.x + ' grant exec on ' + name+ ' to username'
from sysobjects where type='p'
exec (@.x)
Thanks
Hari
MCDBA
<anonymous@.discussions.microsoft.com> wrote in message
news:4bed01c3e438$70ad8f70$a601280a@.phx.gbl...
quote:

> Hi,
> How do I give user execute permission on the complete
> db. I gave them db_datareader, db_datawriter and
> db_ddladmin and they still get access denied. Is making
> them dbo the only way? I don't realy want to give them
> permission one sproc at a time
> thanks in advance

No comments:

Post a Comment