Skip to main content
Tweeted twitter.com/StackDBAs/status/1138551712812339200
edited tags
Link
Solomon Rutzky
  • 69.5k
  • 8
  • 155
  • 300
Became Hot Network Question
edited tags
Link
Solomon Rutzky
  • 69.5k
  • 8
  • 155
  • 300
Source Link
JPVoogt
  • 223
  • 2
  • 10

Execute Permissions for a Store Procedure that creates databases

I have a Stored Procedure that creates a Database for a specific project which needs to run every month by one of our Data Analysts. The question is how do I structure this to enable the Analyst to run this Stored Procedure without granting them Create Database Permission.

I Tried WITH EXECUTE AS OWNER/USER_NAME

The Analysts still get the below error: Msg 262, Level 14, State 1, Line 67 CREATE DATABASE permission denied in database 'master'.

Any advice?