PageRenderTime 13ms CodeModel.GetById 10ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/Kilimanjaro_November_CTP/ConversationPriority/Scripts/ServerCleanup.sql

#
SQL | 52 lines | 31 code | 5 blank | 16 comment | 0 complexity | fed6e1ff4252ab2c6ed535f4796f0213 MD5 | raw file
 1--------------------------------------------------------------------
 2-- Summary: Cleanup script for Server Service and database.
 3-- 
 4/*=====================================================================
 5  This file is part of a Microsoft SQL Server Shared Source Application.
 6  Copyright (C) Microsoft Corporation.  All rights reserved.
 7 
 8THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
 9KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
10IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
11PARTICULAR PURPOSE.
12======================================================= */
13
14use master ;
15GO
16
17SET NOCOUNT ON;
18GO
19
20IF EXISTS
21  (SELECT * FROM sys.databases
22   WHERE name = 'Ssb_Sample_Priority_Server')
23BEGIN
24  -- Drop the broker priorities.
25  -- In this sample, this is not really necessary since the database will be dropped.
26  exec ('USE Ssb_Sample_Priority_Server');
27  IF EXISTS 
28	(SELECT * FROM sys.conversation_priorities
29	 WHERE name = 'Client2Priority')
30	BEGIN
31	  DROP BROKER PRIORITY Client2Priority
32	END;
33  IF EXISTS 
34	(SELECT * FROM sys.conversation_priorities
35	 WHERE name = 'Client1LowPriority')
36	BEGIN
37	  DROP BROKER PRIORITY Client1LowPriority
38	END;
39  IF EXISTS 
40	(SELECT * FROM sys.conversation_priorities
41	 WHERE name = 'Client1MediumPriority')
42	BEGIN
43	  DROP BROKER PRIORITY Client1MediumPriority
44	END;
45  USE Master;
46  -- Drop the database.
47  DROP DATABASE Ssb_Sample_Priority_Server;
48END ;
49GO 
50
51
52--------------------------------------------------------------------