Re: Grant EXECUTE ALL?
From: SQL Server Development Team [MSFT] (sqldev@microsoft.com)
Date: 03/18/03
- Next message: Gerald Pena: "Re: Grant EXECUTE ALL?"
- Previous message: Chris Hall: "SQL2000 SP3"
- In reply to: Gerald Pena: "Grant EXECUTE ALL?"
- Next in thread: Gerald Pena: "Re: Grant EXECUTE ALL?"
- Reply: Gerald Pena: "Re: Grant EXECUTE ALL?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "SQL Server Development Team [MSFT]" <sqldev@microsoft.com> Date: Tue, 18 Mar 2003 10:58:51 -0800
Hi Gerald
While the GRANT statment does not support ALL stored procedures, you can
work around the problem by runnning a query to generate the GRANT EXECUTE
statements. Using Query Analzyer, execute the following query in your
target database.
SELECT 'GRANT EXECUTE ON ' + sysobjects.name + ' TO <group_or_role>' +
CHAR(10) + CHAR(13) + 'GO' + CHAR(10) + CHAR(13)
FROM sysobjects
WHERE type = 'P'
Then copy and paste the result set of the query in a new query window.
Review the GRANT statements and execute again.
One caveat to this solution is that it will grant execute for ALL stored
procedures in your database to the given role including system stored
procedures. You need to review the grant statements very carefully.
Good luck,
Michael
-- SQL Server Development Team This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm. "Gerald Pena" <gerald.pena@farmcreditbank.com> wrote in message news:130501c2ed76$ba33dc80$a101280a@phx.gbl... > I would like to run a GRANT statement over a database that > will give a user/group EXECUTE permissions to ALL SPs. The > following is what I would like to do but the syntax is not > correct. Can someone help with this. Thanks in advance. > > GRANT EXECUTE on 'ALL' > TO dbname > >
- Next message: Gerald Pena: "Re: Grant EXECUTE ALL?"
- Previous message: Chris Hall: "SQL2000 SP3"
- In reply to: Gerald Pena: "Grant EXECUTE ALL?"
- Next in thread: Gerald Pena: "Re: Grant EXECUTE ALL?"
- Reply: Gerald Pena: "Re: Grant EXECUTE ALL?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|