Re: How to give execute permissions to all stored procedures in the database?

From: David Browne (meat_at_hotmail.com)
Date: 11/24/03


Date: Mon, 24 Nov 2003 16:29:35 -0600


>"Abraham" <binu_ca@yahoo.com> wrote in message
news:u3uKWltsDHA.424@TK2MSFTNGP11.phx.gbl...
>How to give "execute" permissions to all stored procedures in the
database?( looking to give >permissions to all at a time )
>Is there any database roles in SQL server ( like db_ddladmin ..) other
than db_owner .

Here's what I do:

in QA, set results as text and run

set nocount on
select 'create procedure GRANT_PERMISSIONS as'
select 'grant execute on ' + name + ' to [user]' from sysobjects where type
in ('p') order by name

to output a script. Copy and run it. Then run the new GRANT_PERMISSIONS
procedure.

David



Relevant Pages

  • Re: Knowledge Base Article - 815154 Configure SQL Server Security for .NET Applications
    ... db_ roles were inclusive in this context and I'll find the script very ... >> Do I as the admin have to check each and every object one at a time? ... > your application references nor what permissions ... > the user to the fixed db_datareader database role. ...
    (microsoft.public.sqlserver.security)
  • Re: Same Server and DB - Copy users and roles
    ... > The script generator worked great with one exception. ... The permissions set ... > the roles were not transferred along with the role to the new database. ... >> Dejan Sarka, SQL Server MVP ...
    (microsoft.public.sqlserver.security)
  • Re: Same Server and DB - Copy users and roles
    ... The script generator worked great with one exception. ... The permissions set on ... the roles were not transferred along with the role to the new database. ...
    (microsoft.public.sqlserver.security)
  • Re: Testing Table Existence - DB name as variable ?
    ... Other than a client tool parameter, ... incorrectly assign permissions to the wrong database. ... > David Portas ...
    (microsoft.public.sqlserver.programming)
  • Re: Permission denied
    ... Server), for example, installs by default without network support, meaning ... attempt to connect to the database. ... then it must be permissions. ... script manually and not as a scheduled task. ...
    (microsoft.public.windows.server.scripting)