How to remove diagramming support objects from SQL Server?

dmajkic picture dmajkic · Feb 8, 2009 · Viewed 15.9k times · Source

I need to remove diagramming support tables, stored procs, views, etc from SQL Servrer using TSQL script.

Is there such a script available?

SQL 2005 and 2008.

Answer

Jason Short picture Jason Short · May 27, 2011
DROP PROCEDURE dbo.sp_alterdiagram;  
DROP PROCEDURE dbo.sp_creatediagram;  
DROP PROCEDURE dbo.sp_dropdiagram; 
DROP PROCEDURE dbo.sp_helpdiagramdefinition; 
DROP PROCEDURE dbo.sp_renamediagram; 
DROP PROCEDURE dbo.sp_upgraddiagrams; 
DROP PROCEDURE dbo.sp_helpdiagrams;
DROP FUNCTION dbo.fn_diagramobjects;
DROP TABLE dbo.sysdiagrams;

That removes all of them. Would be nice if there was as remove diagrams references wizard like the add.