Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
Does granting VIEW DEFINITION work? I have the same issue but it's an outside vendor's database and it will be a BIG DEAL to get a permission changed. Most tables script successfully, btw. There are only a few where I get either: Property Text is not available for Check or Property Text is not available for DefaultConstraint –  user110958 Feb 16 '12 at 18:44

2 Answers 2

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.

share|improve this answer

Take a look at the VIEW DEFINITION permission.

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.