Avatar of SpaceCoastLife
SpaceCoastLife
 asked on

SQL Server Database Role to Create Views

Can someone tell me the minimum database role that is required in order for a user to be able to create/edit views?  I'm trying to avoid db_owner is possible.
DatabasesMicrosoft SQL ServerMicrosoft SQL Server 2008SQL

Avatar of undefined
Last Comment
Vitor Montalvão

8/22/2022 - Mon
Pawan Kumar

There is no default role to  create/alter/delete views in sql server.

modifying/creating view requires Alter permission on the schema. You need to create a new schema and provide access to that. Also create DDL triggers so that people cannot drop accidentally these.
ASKER CERTIFIED SOLUTION
Deepak Chauhan

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SpaceCoastLife

ASKER
How do you create a database role, like ROLE-1?  I was going to call it db_createviews - would that be acceptable?
SOLUTION
Deepak Chauhan

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Vitor Montalvão

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Your help has saved me hundreds of hours of internet surfing.
fblack61