Welcome to MSSQL Forum!
MSSQL Forum - Discussions about Microsoft SQL Server

You are currently viewing our community forums as a guest user. Sign up or
Having an account grants you additional privileges, such as creating and participating in discussions.

sys.sp_addextendedproperty @name=N'MS_DiagramPane1'

Discussion in 'General' started by Peter Schmitz, Oct 1, 2012.

  1. Peter Schmitz

    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:

    Code (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.

Share This Page