Grant Execute to NT AUTHORITY\NETWORK SERVICE

Q. How can I 'spam' all the Stored Procedures in my own database using MSSQL 2005?

According to this link I'm on the right track, but...

http://www.sqldbatips.com/showarticle.asp?ID=8

This command completed successfully, but I didn't see any Execute permissions changed within my DB's SP's

Use MyDatabase

declare @u   sysname ; set @u = QUOTENAME('NT AUTHORITY\NETWORK SERVICE')

Grant Execute to QUOTENAME
LVL 1
kvnsdrAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Faiga DiegelSr Database EngineerCommented:
Are you trting to grant execution of all your SPs to 'NT AUTHORITY\NETWORK SERVICE'?
0
chapmandewCommented:
If you are using 2005, you can grant exec easily to all stored procs tied to a schema..which in your case is most likley DBO.  Here is how:


grant exec on schema::dbo to [NT AUTHORITY\NETWORK SERVICE]

that way you don't have to worry about individual permissions....

this is what you are asking, right?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kvnsdrAuthor Commented:
Yes, I just want to set Execute permissions for NT AUTHORITY\NETWORK SERVICE] on 1 database only, not the whole SQL Server......
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

kvnsdrAuthor Commented:
Well, I get the typical "Command Completed Successfully' , but nothing changes on any SP's...

Even tried this one too:  

Use MyDatabase
Grant Execute to [NT AUTHORITY\NETWORK SERVICE]
0
chapmandewCommented:
OK, cool.  Tthe code I attached will give the user execute access on all stored procedures/functions in the database that you run the code in.  It won't do it for all database on the server, unless you run it individually for each database.
0
kvnsdrAuthor Commented:
I ran it like this, but it didn't work. None of my SP's in MyDatabase are changed.

Use MyDatabase
grant exec on schema::dbo to [NT AUTHORITY\NETWORK SERVICE]
0
Faiga DiegelSr Database EngineerCommented:

What do you mean by "None of my SP's in MyDatabase are changed"? It woudnt really change anything. You are just granting persission to execute the schema group to a specific account.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.