Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

sp default permissions

0 views
Skip to first unread message

DavidC

unread,
Dec 24, 2009, 12:24:12 PM12/24/09
to
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


Russell Fields

unread,
Dec 24, 2009, 2:05:38 PM12/24/09
to
For example:GRANT EXECUTE ON DATABASE :: databasename TO public;ORGRANT
EXECUTE ON SCHEMA :: dbo TO public;-- RLF"DavidC" <dlc...@lifetimeinc.com>
wrote in message news:%23KRaz4L...@TK2MSFTNGP04.phx.gbl...

Erland Sommarskog

unread,
Dec 24, 2009, 2:11:59 PM12/24/09
to
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, esq...@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

Russell Fields

unread,
Dec 24, 2009, 2:10:59 PM12/24/09
to
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" <Russel...@nomail.com> wrote in message
news:umAFWwMh...@TK2MSFTNGP04.phx.gbl...

DavidC

unread,
Dec 24, 2009, 5:45:30 PM12/24/09
to
That is perfect, thank you.

David
"Erland Sommarskog" <esq...@sommarskog.se> wrote in message
news:Xns9CEBCD83F...@127.0.0.1...

0 new messages