15

When I click on database diagrams in SQL Server Management Studio 2008 R2, some databases tell me the following message:

This database does not have one or more of the support objects required to use database diagramming. Do you wish to create them?

Are there any concerns (i.e. security?) in doing so? The databases aren't mine

Hoppe
  • 6,508
  • 17
  • 60
  • 114
  • 3
    Hi, Hoppe. I suppose security concerns are a bit subjective, but [this link](http://msdn.microsoft.com/en-us/library/ms189279(v=sql.105).aspx) will tell you what objects get created. Maybe you can make a judgment call now that you know what it intends to do. – Zec Aug 01 '13 at 01:56
  • 2
    Eight years ago I logged a suggestion to allow an easier method to *remove* the diagram components - so even if you did create them in a database you didn't control, you'd have the ability to clean up your tracks. Unfortunately, [Microsoft didn't think it was worth their time](http://connect.microsoft.com/SQLServer/feedback/details/125014/add-a-one-click-method-to-remove-diagram-components-from-a-database). – Aaron Bertrand Aug 01 '13 at 02:04
  • Knowing that it's difficult to 'undo' the operation is a good motivator not to do it @AaronBertrand – Hoppe Aug 01 '13 at 11:48
  • We'll I wouldn't call it "difficult" but it could be a little simpler. – Aaron Bertrand Aug 01 '13 at 11:50
  • 2
    It adds [dbo].[sysdiagrams] in the database's System Tables node, likewise some sp_---diagram System Stored Procedures. I don't seem to have a dbo.fn_diagramobjects function on my db though. See: How to remove diagramming support objects from SQL Server? http://stackoverflow.com/questions/525610/how-to-remove-diagramming-support-objects-from-sql-server – AjV Jsy Mar 31 '15 at 12:06

3 Answers3

4

Based on the comments, it adds [dbo].[sysdiagrams] to the database's system tables node. The objects below are also added to the database (source).

Please weigh the consequences. Is this a development or a production database? If you add these objects, with your current deployment model, do they get deployed to higher environments? Is the database in a secure location? Does the database contain sensitive information?

Objects:

  • sp_upgraddiagrams

  • sp_helpdiagrams

  • sp_helpdiagramdefinition

  • sp_creatediagram

  • sp_renamediagram

  • sp_alterdiagram

  • sp_dropdiagram

  • fn_diagramobjects (in question)

  • sysdiagrams dt_properties (?)

Hoppe
  • 6,508
  • 17
  • 60
  • 114
-3

Just create a table and it will be solved. There is no object in your database (It means the database is empty).

XAMT
  • 1,515
  • 2
  • 11
  • 31
-4

If these databases aren't yours, I am suggesting not to do any schema changes. it can be a very critical issue.

For instance: By adding a Foreign key to a table, can cause a massive error and bugs to the app, without any one to know why.

Any modifications or adding new things are real and taking effect immediately.

Jonathan Mee
  • 37,899
  • 23
  • 129
  • 288
itzik Paz
  • 403
  • 5
  • 14
  • 5
    -1 This is incorrect on so many levels, it adds NOTHING to the tables, just some procedures: https://msdn.microsoft.com/en-us/library/ms189279(v=sql.105).aspx – FrostyFire Feb 25 '15 at 17:20