Scripting Views in Management Studio VS Enterprise Manager

  • Good Morning,

    We have upgraded one of our environments from SQL2000 to SQL2005. There are several users (Billing System and Reporting) that need the ability to view the code within views in a database...but we do not want them to be able to alter it. We're trying to keep the environment secure...but then need to be able to do their jobs.

    Is there a way to allow them to see the properties of views or script them (Create or Alter) to a new window or the clipboard without giving them ddl rights or more permissions than then need? They could then review the code to verify its accuracy and submit Change Requests through a controlled process.

    Thanks,

    Sean.

  • GRANT VIEW DEFINITION on Schema.ViewName TO RoleName

  • A safer approach would be to have them access the object definitions without accessing the database. Script all of your objects into a source control system (VSS, for example) and give the users access to the source control system.

    This will also ensure you keep a running change history and prevent two users from making conflicting changes.

  • Thanks to both Tommy and Michael. Both were great answers and much appreciated!

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply