Ask the Expert

Creating and altering views on SQL Server

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?

    Requires Free Membership to View

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.

This was first published in March 2005

Join the conversationComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.