/*===================================================================== File: Cleanup.sql for ArrayParameter CLR integration example Summary: UnRegisters the assemblies, user defined type, and stored procedure used by the sample. Cleans up the data changes made by this sample. Date: December 14, 2004 --------------------------------------------------------------------- This file is part of the Microsoft SQL Server Code Samples. Copyright (C) Microsoft Corporation. All rights reserved. This source code is intended only as a supplement to Microsoft Development Tools and/or on-line documentation. See these other materials for detailed information regarding Microsoft code samples. THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. ======================================================= */ USE AdventureWorks GO DELETE Person.ContactType WHERE ContactTypeID > 20; GO -- Drop existing sprocs, type, and assemblies if any. IF EXISTS (SELECT * FROM sys.procedures WHERE [name] = 'usp_EnsureContactTypeNames') DROP PROCEDURE usp_EnsureContactTypeNames; GO IF EXISTS (SELECT * FROM sys.objects WHERE [name] = N'GetContactTypeNames' and (type = 'FS' or type = 'FT')) DROP FUNCTION [GetContactTypeNames]; GO IF EXISTS (SELECT * FROM sys.types WHERE [name] = 'ContactTypeNames') DROP TYPE ContactTypeNames; GO IF EXISTS (SELECT * FROM sys.assemblies WHERE [name] = 'ArrayParameter') DROP ASSEMBLY ArrayParameter; GO