Активация Service Broker на msdb

Zioma
Дата: 22.01.2013 16:03:23
Версия:
Microsoft SQL Server 2008 (SP2) - 10.0.4000.0 (X64)   Sep 16 2010 19:43:16   Copyright (c) 1988-2008 Microsoft Corporation  Standard Edition (64-bit) on Windows NT 6.0 <X64> (Build 6002: Service Pack 2) 


Предистория следующая:
сбоил сервер, были ошибки в системных и рабочих БД. Восстановление системных БД происходило не с бэкапов, а с файлов mdf (каким-то образом они были сохранены до сбоя, очевидно бэкапился весь сервер, сервер не приоритетный).
Восстановление было успешным, все стартовало и работало.

Сейчас заметили, что не работает отправка почты (dbo.sp_send_dbmail). При попытке настройки почты оказалось, что на msdb не активирован Service Broker.

Выполнение
ALTER DATABASE msdb SET ENABLE_BROKER

просто подвисает. Ждал больше получаса - отменил.

При этом активация на тестовой бд проходит успешно.

Проверка msdb говорит:
dbcc checkdb('msdb')

DBCC results for 'msdb'.
Service Broker Msg 9675, State 1: Message Types analyzed: 16.
Service Broker Msg 9676, State 1: Service Contracts analyzed: 7.
Service Broker Msg 9667, State 1: Services analyzed: 6.
Service Broker Msg 9668, State 1: Service Queues analyzed: 6.
Service Broker Msg 9669, State 1: Conversation Endpoints analyzed: 0.
Service Broker Msg 9674, State 1: Conversation Groups analyzed: 0.
Service Broker Msg 9670, State 1: Remote Service Bindings analyzed: 0.
Service Broker Msg 9605, State 1: Conversation Priorities analyzed: 0.

*************

CHECKDB found 0 allocation errors and 0 consistency errors in database 'msdb'.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.


Буду очень благодарен за помощь по активации брокера, поскольку переустанавливать сервер не очень то и хочеться.
Гость333
Дата: 22.01.2013 16:16:11
Zioma
Выполнение
ALTER DATABASE msdb SET ENABLE_BROKER

просто подвисает. Ждал больше получаса - отменил.


BOL, ALTER DATABASE SET Options
ENABLE_BROKER requires an exclusive database lock. If other sessions have locked resources in the database, ENABLE_BROKER will wait until the other sessions release their locks. To enable Service Broker in a user database, ensure that no other sessions are using the database before you run the ALTER DATABASE SET ENABLE_BROKER statement, such as by putting the database in single user mode. To enable Service Broker in the msdb database, first stop SQL Server Agent so that Service Broker can obtain the necessary lock.
Glory
Дата: 22.01.2013 16:16:46
Zioma
просто подвисает. Ждал больше получаса - отменил.

Посмотреть на блокировки времени конечно не было ?
Zioma
Дата: 22.01.2013 17:24:16
Гость333
BOL, ALTER DATABASE SET Options
ENABLE_BROKER requires an exclusive database lock. If other sessions have locked resources in the database, ENABLE_BROKER will wait until the other sessions release their locks. To enable Service Broker in a user database, ensure that no other sessions are using the database before you run the ALTER DATABASE SET ENABLE_BROKER statement, such as by putting the database in single user mode. To enable Service Broker in the msdb database, first stop SQL Server Agent so that Service Broker can obtain the necessary lock.


О брокере вскользь прочитал, а вот на комманду активации и не посмотрел :| Самим брокером никогда не пользовался, не приходилось как-то ...
Но пока писал сообщение о проблеме, решение остановить агента само пришло в голову :)

В любом случае, всем спасибо за ответы.

Glory
Посмотреть на блокировки времени конечно не было ?


Конечно, что не было, своих заморочек хватает: мопед сервер не мой, попросили помочь ;)