Re: Grant EXECUTE ALL?
From: Gerald Pena (gerald.pena@farmcreditbank.com)
Date: 03/18/03
- Next message: Hannes Wornig: "Re: Grant EXECUTE ALL?"
- Previous message: SQL Server Development Team [MSFT]: "Re: Grant EXECUTE ALL?"
- In reply to: SQL Server Development Team [MSFT]: "Re: Grant EXECUTE ALL?"
- Next in thread: Hannes Wornig: "Re: Grant EXECUTE ALL?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Gerald Pena" <gerald.pena@farmcreditbank.com> Date: Tue, 18 Mar 2003 11:35:00 -0800
I think you have given me exactly what I need. Thanks so
much! I may be able to get around the system SPs by using
a where category <> 2. If I rememeber right this is the
code for a system SP. Thanks again for the quick help.
>-----Original Message-----
>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: Hannes Wornig: "Re: Grant EXECUTE ALL?"
- Previous message: SQL Server Development Team [MSFT]: "Re: Grant EXECUTE ALL?"
- In reply to: SQL Server Development Team [MSFT]: "Re: Grant EXECUTE ALL?"
- Next in thread: Hannes Wornig: "Re: Grant EXECUTE ALL?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|