0

I want to reuse the structure of a database in a new project. So using SSMS I use Generate Script and in settings I set to generate schema only.

In the result there are too many queries about extendedproperty. Is there any important data or settings in these queries or I can completely igonre them and only reuse queries on database tables and fields to start a similar project?

And if they ar unnecessary how can I use "generate script" without them?

sample query:

EXEC sys.sp_dropextendedproperty @name=N'CollatingOrder' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'billboard', @level2type=N'COLUMN',@level2name=N'url'
0

You can modify this behaviour by changing the scripting options:

Tools -> Options -> SQL Server explorer -> Scripting -> Script extended properties

enter image description here

Is there any important data or settings in these queries or I can completely ignore them...

It depends.

DBA's and developers can use extended properties to save information about database objects. If you're scripting other dba's objects you could loose information about them.

Have a look at this articles on MSSQLTips:

Working with SQL Server Extended Properties

Quoted from doc

Extended Properties can be created for the below database objects, but in this tip, we are going to focus on column level Extended Properties.

  • Database
  • Stored Procedures
  • User-defined Functions
  • Table
  • Table Column
  • Table Index
  • Views
  • Rules
  • Triggers
  • Constraints

Extended Properties can be used to:

  • Specify a caption for a table, view, or column.
  • Specify a display mask for a column.
  • Display a format of a column, define edit mask for a date column, define number of decimals, etc.
  • Specify formatting rules for displaying the data in a column.
  • Describe a specific database objects for all users.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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