Minimum access rights for generating schema creation scripts

In SQL Server 2008, it am running the "Generate SQL Server Scripts Wizard", attempting to create a script for all of the tables and views within a schema.

When I do this, I get an error:

Property Text is not available for DefaultConstraint '[DF__aspnet_Ap__Appli__2A4B4B5E]'. This property may not exist for this object, or may not be retrievable due to insufficient access rights. (Microsoft.SqlServer.Smo

What is the specific access right I need to complete this task?


Unfortunately the Generate Scripts Wizard looks at sys.sql_expression_dependencies to find out what columns reference other columns. It does so even if you disable the exporting of foreign key constraints. So you have to give the user that wants to use the wizard permissions to SELECT from sys.sql_expression_dependencies as well as VIEW (ANY) DEFINITION.


Take a look at the VIEW DEFINITION permission.

http://msdn.microsoft.com/en-us/library/ms175808.aspx