Created
April 25, 2019 17:12
Remove SQL Server Database diagram objects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- REMOVE DATABASE DIAGRAMS OBJECTS FROM DB | |
-- ***WARNING*** ANY EXISTING DIAGRAMS WILL GET DELETED IF YOU RUN THIS ***WARNING*** | |
IF OBJECT_ID('[dbo].[sp_upgraddiagrams]') IS NOT NULL BEGIN | |
DROP PROC [dbo].[sp_upgraddiagrams] | |
END | |
IF OBJECT_ID('[dbo].[sp_helpdiagrams]') IS NOT NULL BEGIN | |
DROP PROC [dbo].[sp_helpdiagrams] | |
END | |
IF OBJECT_ID('[dbo].[sp_helpdiagramdefinition]') IS NOT NULL BEGIN | |
DROP PROC [dbo].[sp_helpdiagramdefinition] | |
END | |
IF OBJECT_ID('[dbo].[sp_creatediagram]') IS NOT NULL BEGIN | |
DROP PROC [dbo].[sp_creatediagram] | |
END | |
IF OBJECT_ID('[dbo].[sp_renamediagram]') IS NOT NULL BEGIN | |
DROP PROC [dbo].[sp_renamediagram] | |
END | |
IF OBJECT_ID('[dbo].[sp_alterdiagram]') IS NOT NULL BEGIN | |
DROP PROC [dbo].[sp_alterdiagram] | |
END | |
IF OBJECT_ID('[dbo].[sp_dropdiagram]') IS NOT NULL BEGIN | |
DROP PROC [dbo].[sp_dropdiagram] | |
END | |
IF OBJECT_ID('[dbo].[fn_diagramobjects]') IS NOT NULL BEGIN | |
DROP FUNCTION [dbo].[fn_diagramobjects] | |
END | |
IF OBJECT_ID('[dbo].[sysdiagrams]') IS NOT NULL BEGIN | |
DROP TABLE [dbo].[sysdiagrams] | |
END | |
IF OBJECT_ID('[dbo].[dt_properties]') IS NOT NULL BEGIN | |
DROP TABLE [dbo].[dt_properties] | |
END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment