Skip to content

Instantly share code, notes, and snippets.

@tax
Last active December 17, 2015 15:59
Show Gist options
  • Select an option

  • Save tax/5635087 to your computer and use it in GitHub Desktop.

Select an option

Save tax/5635087 to your computer and use it in GitHub Desktop.
Role to be able to only execute stored procedure 1. Create login on server2. run code3. Add login with role to specific DB
USE [mydb]
GO
/****** Object: DatabaseRole [db_executestoredprocedures] Script Date: 05/23/2013 12:10:19 ******/
CREATE ROLE [db_executestoredprocedures] AUTHORIZATION [dbo]
GO
-- 1b - Grant permissions
GRANT EXECUTE TO db_executestoredprocedures
GO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment