sys.sp_addextendedproperty @name=N'MS_DiagramPane1'

Peter Schmitz

Administrator
Staff member
While trying to port a client's database objects from an incomplete test environment to a new copy of their production system, we came across a few views that had some odd-looking code in it:

SQL:
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[GUID VALUE, 1.00]… '

We tried coming up with ideas of what this code means or does, but when testing things out, all our theories turned out to be wrong.

Well, let me save you a lot of trial and error, and just explain that the code indicates that the object in question was designed using the GUI desginer within SQL Server, that allows you to create tables and views without actually writing the SQL code.

]In order to show you the same layout the next time you want to edit the object, SQL Server will add these extended properties to store the state of the window, as well as the location of the objects in it.

This prevents you from losing the time you spent carefully arranging objects and relations in the wizard.

Clever concept, but it did make for some interesting and wild ideas in our office for a while.
 
Top