From: DavidC on
Is there a way on a SQL Server 2008 database to set default grant execute
permissions whenever a new stored procedure is created on that database?
Thanks.

David


From: Russell Fields on
For example:GRANT EXECUTE ON DATABASE :: databasename TO public;ORGRANT
EXECUTE ON SCHEMA :: dbo TO public;-- RLF"DavidC" <dlchase(a)lifetimeinc.com>
wrote in message news:%23KRaz4LhKHA.1824(a)TK2MSFTNGP04.phx.gbl...
> Is there a way on a SQL Server 2008 database to set default grant execute
> permissions whenever a new stored procedure is created on that database?
> Thanks.
>
> David
>


From: Russell Fields on
Sorry, some formatting problem on the first post. Repeat. For example:

GRANT EXECUTE ON DATABASE :: databasename TO public;
-- or --
GRANT EXECUTE ON SCHEMA :: dbo TO public;

RLF

"Russell Fields" <RussellFields(a)nomail.com> wrote in message
news:umAFWwMhKHA.1824(a)TK2MSFTNGP04.phx.gbl...
> For example:GRANT EXECUTE ON DATABASE :: databasename TO public;ORGRANT
> EXECUTE ON SCHEMA :: dbo TO public;-- RLF"DavidC"
> <dlchase(a)lifetimeinc.com> wrote in message
> news:%23KRaz4LhKHA.1824(a)TK2MSFTNGP04.phx.gbl...
>> Is there a way on a SQL Server 2008 database to set default grant execute
>> permissions whenever a new stored procedure is created on that database?
>> Thanks.
>>
>> David
>>
>
>


From: Erland Sommarskog on
DavidC (dlchase(a)lifetimeinc.com) writes:
> Is there a way on a SQL Server 2008 database to set default grant execute
> permissions whenever a new stored procedure is created on that database?
> Thanks.

GRANT EXECUTE TO Nisse

will give Nisse EXECUTE permissions on all stored procedures in the
database, including future procedures.

You can also say:

GRANT EXECUTE ON SCHEMA::sch TO Nisse

to restrict this permission to apply only withing a certain schema.


--
Erland Sommarskog, SQL Server MVP, esquel(a)sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

From: DavidC on
That is perfect, thank you.

David
"Erland Sommarskog" <esquel(a)sommarskog.se> wrote in message
news:Xns9CEBCD83FC137Yazorman(a)127.0.0.1...
> DavidC (dlchase(a)lifetimeinc.com) writes:
>> Is there a way on a SQL Server 2008 database to set default grant execute
>> permissions whenever a new stored procedure is created on that database?
>> Thanks.
>
> GRANT EXECUTE TO Nisse
>
> will give Nisse EXECUTE permissions on all stored procedures in the
> database, including future procedures.
>
> You can also say:
>
> GRANT EXECUTE ON SCHEMA::sch TO Nisse
>
> to restrict this permission to apply only withing a certain schema.
>
>
> --
> Erland Sommarskog, SQL Server MVP, esquel(a)sommarskog.se
>
> Links for SQL Server Books Online:
> SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
> SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
> SQL 2000:
> http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
>