Uninstall on BizTalk Beta and SQL tables – Cannot drop database “BizTalkMsgBoxDb” because it is currently in use.

  • Sandro Pereira
  • Mar 2, 2010
  • 2 min read

Recently, I uninstalled the beta version of BizTalk 2009 Enterprise. I have to remove BizTalk SQL tables because they were not compatible with the development version, but when I try to remove BizTalkMsgBoxDb gives the following error:

TITLE: Microsoft SQL Server Management Studio
——————————
Drop failed for Database ‘BizTalkMsgBoxDb’. (Microsoft.SqlServer.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.0.1600.22+((SQL_PreRelease).080709-1414+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Drop+Database&LinkId=20476
——————————
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
——————————

Cannot drop database “BizTalkMsgBoxDb” because it is currently in use. (Microsoft SQL Server, Error: 3702)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.00.1600&EvtSrc=MSSQLServer&EvtID=3702&LinkId=20476

——————————

📝 One-Minute Brief

When uninstalling or reconfiguring BizTalk Server, you may encounter an error stating: “Cannot drop database BizTalkMsgBoxDb because it is currently in use.” This happens because active connections from BizTalk Host Instances, SQL Agent jobs, or monitoring tools prevent the drop operation. To fix this, you must manually stop all BizTalk services, stop the SQL Agent, and—if necessary—use a SQL script to “kill” active processes or set the database to Single User mode before retrying the configuration.

Cause

This happens because active connections from BizTalk Host Instances, SQL Agent jobs, or monitoring tools prevent the drop operation.

SQL Server requires exclusive access to drop a database. If even one connection remains—whether from a forgotten Host Instance or a background monitoring tool—the operation will fail.

Solution

  • I restarted the SQL server service, and it solved the problem.
Thanks for Buying me a coffe

Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

Leave a Reply

Your email address will not be published. Required fields are marked *

The Ultimate Cloud
Management Platform for Azure

Supercharge your Azure Cost Saving

Learn More
Turbo360 Widget

Back to Top