Problem solve Get help with specific problems with your technologies, process and projects.

Creating and altering views on SQL Server

There is no advantage to allowing users to create and drop views, according to Development expert Andrew Novick. Here he explains.

I am wondering what the norm is in creating and altering views on SQL Server? Do you allow users to create their own views and then drop the view once their session is done, or allow a generic account with db_ddlowner permissions to alter the view? What are some performance issues? Is one better than the other?
I don't see any advantage in allowing users to create views and then drop them so I don't allow this practice. Nor would I grant users db_ddladmin permission. Views should be looked at as a permanent part of the database schema. If a user can write a view to get their job done, they can write the equivalent SQL, possibly using a subquery. After the optimizer works on the SQL, the performance should be the same as if part of the query had been encapsulated in a view.

Dig Deeper on Microsoft SQL Server Performance Monitoring and Tuning

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.