USE [DbNameHere]
SELECT 'GRANT EXECUTE ON ' + name + ' TO [NT AUTHORITY\NETWORK SERVICE]'
FROM sysobjects
WHERE type = 'P' AND name like 'sp_%'
Just some random development ramblings mostly related to the Microsoft .NET platform.
Monday, August 6, 2007
Set EXECUTE on SQL stored procedures
If you have created and restored a SQL database, the stored procedures may need to have EXECUTE privilege set on them. If there are lots of these procedures, it can be tedious to do it by hand. The query below will output the T-SQL command(s) to set EXECUTE on each procedure. You can then copy/paste the result and execute it.
Subscribe to:
Post Comments (Atom)
Can't RDP? How to enable / disable virtual machine firewall for Azure VM
Oh no! I accidentally blocked the RDP port on an Azure virtual machine which resulted in not being able to log into the VM anymore. I did ...
-
Oh no! I accidentally blocked the RDP port on an Azure virtual machine which resulted in not being able to log into the VM anymore. I did ...
-
Here is a full test program that demonstrates how to use SharpZipLib to zip an XElement into a byte array. This allows you to transfer larg...
No comments:
Post a Comment