One or more instances of the orchestration still exist
Lately I tried to redeploy a BizTalk 2006 solution from Visual Studio 2005. Unfortunately I was confronted with the following error message “Could not change the bindings for orchestration '
When I tried to Unenlist and delete the Orchestration from the BizTalk Administration tool, I received the same error.
I found out that I had a few suspended instances. These instances need to be terminated before you can undeploy/redeploy the orchestration.
Terminating instances can be done in several manners:
- the polite manner: by terminating the instances using the BizTalk Administration Tool
- the not so polite manner: by using a Stored Procedure to clean up the MessageBox
Removing instances using the BizTalk Administration Tool
In the BizTalk Administration Group click in the left pane on ‘BizTalk Group [Name of Computer/Name of Management database
Removing instances using a Stored Procedure
The less polite manner to remove suspended instances is by running a Stored Procedure which will clean up the MessageBox. Attention: this is NOT a recommended procedure on production environments!
Open the SQL Server Management Studio and connect to the database server. In the left pane expand the server-node and the Databases-node. Next, click on the MessageBox-database (BizTalkMsgDb) and hit the ‘New Query’-button in the toolbar. In the right pane you can enter SQL commands. Since you selected the MessageBox-database in the left pane, the commands are executed against that database. Now type: 'exec bts_CleanupMsgbox 0' (without the quotes) and hit the ‘! Execute’-button in the toolbar. All suspended instances will now be removed. You can now undeploy/redeploy the orchestration.