Re: OBJECT Level Permissions

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Jacco Schalkwijk (NOSPAMjaccos_at_eurostop.co.uk)
Date: 03/02/04


Date: Tue, 2 Mar 2004 13:58:26 -0000

DECLARE @username SYSNAME

SET @username = '' -- Fill in here

SELECT 'GRANT EXECUTE ON [' + ROUTINE_NAME + '] TO ' + @username
FROM INFORMATION_SCHEMA.ROUTINES
 WHERE ROUTINE_NAME NOT LIKE 'dt%'

Run in Query Analyzer with Text output to generate a script, and run and
save the script at your convenience.

-- 
Jacco Schalkwijk
SQL Server MVP
"bokey" <mike_bohlken@hotmail.com> wrote in message
news:%23eVP8uFAEHA.3456@TK2MSFTNGP09.phx.gbl...
> I know how to GRANT permissions to one object at at time.
>
> But...  What is the best way to GRANT EXEC permissions on "all" my stored
> procs in the fewest lines possible?
>
> Thanks
>
>


Relevant Pages

  • Re: Automate DB update
    ... First of all there is nobody who can work with Query Analyzer. ... I just forgot that I can edit script in Query ... > correct database and specify dbo as the owner of objects. ... I send the script to my client as sql file. ...
    (microsoft.public.vb.general.discussion)
  • Re: Automate DB update
    ... First of all there is nobody who can work with Query Analyzer. ... I just forgot that I can edit script in Query ... > correct database and specify dbo as the owner of objects. ... I send the script to my client as sql file. ...
    (microsoft.public.sqlserver.programming)
  • Re: Automate DB update
    ... First of all there is nobody who can work with Query Analyzer. ... I just forgot that I can edit script in Query ... > correct database and specify dbo as the owner of objects. ... I send the script to my client as sql file. ...
    (microsoft.public.vb.database)
  • Re: Automate DB update
    ... First of all there is nobody who can work with Query Analyzer. ... I just forgot that I can edit script in Query ... > correct database and specify dbo as the owner of objects. ... I send the script to my client as sql file. ...
    (microsoft.public.vb.database.ado)
  • Re: sp_xml_preparedocument and OPENXML
    ... following script in Query Analyzer, you'll see that the "stuff at the ... your code in Query Analyzer, so you can be sure the problem isn't before ... EXEC sp_xml_preparedocument @idoc OUTPUT, ... I am not trying to read in a PLAY xml ...
    (microsoft.public.sqlserver.programming)