| Login

Search this Blog


Links I like to keep around


Here are the most recent postings to this blog. Use the archive calendar or search to find other entries.
Mar31

Written by:R Teachout
3/31/2007 9:32 PM 

This allows you to set the permissions on all of the stored procedures (except the built-in ones) on a database.. great after a SQL Recovery

 DECLARE @Login varchar(50)
 SET @Login = '[websiteuserhere]'

 SELECT 'Grant exec on [' + [name] + '] To ' + @Login 
 FROM [sysobjects]
 WHERE [xtype] = 'P' AND [name] LIKE '%' and [name] not like 'dt_%' and [name] not like 'xp_%'

Update: (This should work for SQL2005 also)

Tags:

Your name:
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Title:
Comment:
Security Code
CAPTCHA image
Enter the code shown above in the box below
Add Comment  Cancel 


-QuoteDB.com

Inspired by Nina