Hi,
is there a easy way of grantinng Execute-privilegies to user ABC for all
procedures named 'MTS*' in a database?
regards,
Bent S. Lund
System Developer
MCP VB
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!Hi,
In Query Analyzer execute the below script with Text result.
Use <dbname>
go
select 'grant execute on '+name +' to ABC' from sysobjects where name like
'MTS%' and type='P'
-- The above script will generate a script to grant execute previlage to ABC
user for all procedures start with MTS%.
Copy the result window and paste in a new Query analyzer window and execute
it.
Thanks
Hari
MCDBA
"Bent Lund" <bstlu@.online.no> wrote in message
news:ucjryKQYEHA.3012@.tk2msftngp13.phx.gbl...
> Hi,
> is there a easy way of grantinng Execute-privilegies to user ABC for all
> procedures named 'MTS*' in a database?
>
> regards,
> Bent S. Lund
> System Developer
> MCP VB
> *** Sent via Devdex http://www.devdex.com ***
> Don't just participate in USENET...get rewarded for it!|||Have a look at
Granting execute permissions to all stored procedures in a database
http://www.sqldbatips.com/showarticle.asp?ID=8
and sp_grantexec
http://www.sqldbatips.com/showcode.asp?ID=2
You can use this like
exec sp_grantexec 'ABC','MTS%'
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Bent Lund" <bstlu@.online.no> wrote in message
news:ucjryKQYEHA.3012@.tk2msftngp13.phx.gbl...
> Hi,
> is there a easy way of grantinng Execute-privilegies to user ABC for all
> procedures named 'MTS*' in a database?
>
> regards,
> Bent S. Lund
> System Developer
> MCP VB
> *** Sent via Devdex http://www.devdex.com ***
> Don't just participate in USENET...get rewarded for it!
Showing posts with label mts. Show all posts
Showing posts with label mts. Show all posts
Monday, March 26, 2012
Grant Execute to user on procedures
Labels:
abc,
allprocedures,
bent,
database,
databaseregards,
execute,
execute-privilegies,
grant,
grantinng,
lundsystem,
microsoft,
mts,
mysql,
named,
oracle,
procedures,
server,
sql,
user
Subscribe to:
Posts (Atom)