को पुनर्स्थापित करने के बाद ब्रोकर को सक्षम करना मेरे पास सक्षम सेवा ब्रोकर के साथ डेटाबेस है। तब मैं अन्य डेटाबेस के बैकअप से कार्यक्रम में मेरी डेटाबेस पुनर्स्थापित करना चाहते हैं, लेकिन बहाल (मैं मौजूदा डेटाबेस नाम पर बहाल) के बाद, मेरे विधि, whitch सेवा ब्रोकर सक्षम बनाता है, इस त्रुटि कहते हैं:एसक्यूएल सर्वर डेटाबेस
Msg 9772, Level 16, State 1, Line 1
The Service Broker in database "ServeDB2" cannot be enabled because there is already an enabled Service Broker with the same ID.
Msg 5069, Level 16, State 1, Line 1
ALTER DATABASE statement failed.
यह मेरा तरीका है :
public void TurnOnBroker()
{
if (!this.database.BrokerEnabled)
{
this.server.KillAllProcesses(this.database.Name);
this.database.BrokerEnabled = true;
this.database.Alter();
RefreshConnection();
}
}
मुझे यहां क्या तय करना चाहिए? कोई सुझाव?
प्रक्रियाओं हत्या कामोत्तेजक है और हत्या जरूरी तत्काल नहीं है। 'रोलबैक तत्काल' के साथ बेहतर उपयोग करें। – usr