PageRenderTime 39ms CodeModel.GetById 19ms 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. THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  8. KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  9. IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  10. PARTICULAR PURPOSE.
  11. ======================================================= */
  12. use master ;
  13. GO
  14. SET NOCOUNT ON;
  15. GO
  16. IF EXISTS
  17. (SELECT * FROM sys.databases
  18. WHERE name = 'Ssb_Sample_Priority_Server')
  19. BEGIN
  20. -- Drop the broker priorities.
  21. -- In this sample, this is not really necessary since the database will be dropped.
  22. exec ('USE Ssb_Sample_Priority_Server');
  23. IF EXISTS
  24. (SELECT * FROM sys.conversation_priorities
  25. WHERE name = 'Client2Priority')
  26. BEGIN
  27. DROP BROKER PRIORITY Client2Priority
  28. END;
  29. IF EXISTS
  30. (SELECT * FROM sys.conversation_priorities
  31. WHERE name = 'Client1LowPriority')
  32. BEGIN
  33. DROP BROKER PRIORITY Client1LowPriority
  34. END;
  35. IF EXISTS
  36. (SELECT * FROM sys.conversation_priorities
  37. WHERE name = 'Client1MediumPriority')
  38. BEGIN
  39. DROP BROKER PRIORITY Client1MediumPriority
  40. END;
  41. USE Master;
  42. -- Drop the database.
  43. DROP DATABASE Ssb_Sample_Priority_Server;
  44. END ;
  45. GO
  46. --------------------------------------------------------------------