In some ocassions, you may run into a runaway, long-running or stucked staging batch with Master Data Services in SQL Server 2008 R2. The issue happens most frequently when a fairly large batch of rows are being processed for update or deletion.
The issue has to do with Service Broker, either due to a timeout or notifications not being received or received incomplete. You can confirm the issue when you query the queue [mdm].[microsoft/mdm/queue/stagingbatch]. You will see one or more messages in this queue. After searching through a couple of forum threads I found the solution to be fairly simple: rollback transactions an re-enable Service Broker. The steps are as follows:
- Set the MDS database in single user mode and rollback uncommitted transactions.
ALTER DATABASE [MDS] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
- Re-enable Service Broker on the MDS database.
ALTER DATABASE [MDS] SET ENABLE_BROKER WITH NO_WAIT;
- Set the MDS database back in to “regular” multi-user mode.
ALTER DATABASE [MDS] SET MULTI_USER WITH ROLLBACK IMMEDIATE;
Once the MDS database is brought back online, all queued messages should be cleared out and MDS database will be able to communicate normally with Service Broker.
You can check Books on Line for more information on the difference between “NO WAIT” and “WITH ROLLBACK IMMEDIATE” options when issuing the ALTER DATABASE command here. Pinal Dave has a good post about the difference between these two options as well here.
Hope this post has helped you. Your feedback is greatly appreciated.
Filed under: Business Intelligence, Errors, How to, MDS, SQL Server, SQLServerPedia Syndication | Tagged: 2008, business intelligence, data warehouse, error, errors, master data services, MDS, processing, R2, Server, SQL |
This was very helpful for me. I came across this issue when I restored my SQL Server 2012 MDS database. I had to enable broker explicitly after the restore and before going back in to multi user. Thanks for posting this!
I’m glad this helped you.
Hello Jose,
Can you tell the name of tool that i can use to repair MDS in sql server 2012.
Mark,
My original understanding was that there was going to be a tool to repair these types of issues but the only repair tasks available in the MDS 2012 Repair Database option of the MDS Configuration Manager include: enable CLR, enable Service Broker, and enable other necessary services.
[…] Broker, either due to a timeout or notifications not being received or received incomplete. Jose Chinchilla has […]
can u please tell me how to automate the process of hirearchy details save in mds 2012.udpSecurityMemberProcessRebuildModel