Moving Database Diagram 2005

Hi everyone,in sql server 2005, can anyone please tell me how to move a database diagram between 2 databases on the same server . Both database have the same data structure.

I found this article on MS
http://support.microsoft.com/default.aspx scid=kb;en-us;320125 ... which works for SQL 2000 but in SQL 2005 the SQL line 'select * from dtproperties' is not recognised.

Thanks for any help


Answer this question

Moving Database Diagram 2005

  • BrettBrown

    Use the dtproperties with fully qualified name such as databasename.owner.objectname.Refer to SQL 2005 books online for more informatin.


  • erwinpogz

    Thanks for the reply, but I have a small problem, my server name contains a hyphen and the my SQL line fails with "incorrect syntax near '-' ", any idea how to fix this
  • Santito

    If the two databases are on the same server then why do you need the server name in the statement.

    However if you need the server name then try enclosing the offending names in square brackets:

    - e.g. [Server-1].[my-database].dbo.dtproperties


  • ggamble

    I'm still confused. As far as I can tell dtproperties table no longer exists in SQL 2005.

    http://www.codeproject.com/dotnet/ScriptDiagram2005.asp looks interesting. It is a tool to import and export SQL 2005 database diagrams. I have not used it yet. But the article does say:

    One of the first upgrading issues with SQL Server 2005 in our continuous integration process was the failure of the diagram scripts... Turns out there are a number of changes in SQL Server 2005 which break the code from 2000:

    • The diagram data is now stored in [sysdiagrams] and not [dtproperties]
    • [sysdiagrams] has only one row per diagram, whereas [dtproperties] has seven rows
    • SQL Server 2005 introduces the VARBINARY(MAX) data type

  • Tahir275

    In SQL 2005, I see in my System Tables folder a table called dbo.sysdiagrams. I do not see a dtproperties table in SQL 2005.

    Is there an updated KB that explains moving DB diagrams in SQL 2005


  • Moving Database Diagram 2005