Microsoft KB Archive/319450

= BizTalk priority-based message processing improvement =

Article ID: 319450

Article Last Modified on 11/15/2007

-

APPLIES TO


 * Microsoft BizTalk Server 2002 Standard Edition

-



This article was previously published under Q319450



SYMPTOMS
BizTalk Server has added the ability for the BizTalk messaging engine to prioritize the processing of messages from the work queue. After you install the fix that is described in this article, you can set a priority level between 1 and 10 on a channel, so that BizTalk Server processing sorts the messages by priority. This is included in Service Pack 1.



CAUSE
BizTalk Server uses a single work queue to process inbound messages and has no message or channel priority. Because of this, messages that are submitted to a BizTalk Server are not prioritized. This may cause delays when BizTalk Server processes a BizTalk Server channel that may have a higher priority in terms of business logic.

After you install this fix, or upgrade to Service Pack 1 (SP1), the BizTalk Server 2002 messaging engine can prioritize the processing of messages from the work queue that is bound for one channel over the processing of messages that are destined for another channel. You can configure BizTalk Server channels with a priority level so that the BizTalk Messaging Services process messages in a channel in order of channel priority instead of in &quot;first in, first out&quot; (FIFO) order. Ten levels are available for channel priority. The default setting is a priority level of 5 for all channels, so when you use the default settings, all messages are processed in FIFO order (the current behavior of BizTalk Server).

NOTE: This is a change in channel priority. It is not a change in message priority.



Service pack information
For more information about the latest service pack for BizTalk Server 2002, click the following article number to view the article in the Microsoft Knowledge Base:

815781 How to obtain the latest BizTalk Server 2002 service pack

Hotfix information
A supported hotfix is now available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next service pack that contains this hotfix.

To resolve this problem, submit a request to Microsoft Online Customer Services to obtain the hotfix. To submit an online request to obtain the hotfix, visit the following Microsoft Web site:

http://go.microsoft.com/?linkid=6294451

Note If additional issues occur or any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. To create a separate service request, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=support

The English version of this fix should have the following file attributes or later:

  Date         Time   Version        Size  File name 11-Apr-2002 16:41               13,680  Btm_priorityupgrade.sql 29-Apr-2002 20:00  3.0.1511.0  508,176  Ciscore.dll 29-Apr-2002 20:00  3.0.1511.0  401,680  Cisengine.dll 29-Apr-2002 20:00  3.0.1511.0  327,952  Mscis.exe 11-Apr-2002 16:41               19,632  Sq_priorityupgrade.sql 11-Apr-2002 16:41                1,496  Updatechannel.vbs NOTE: This change is only available and supported on BizTalk 2002 Server.



MORE INFORMATION
This fix has no automated installation. To install the fix, you must manually remove and replace the Cisengine.dll, Ciscore.dll, and Mscis.exe files with the files that this fix includes.

For each computer that is running BizTalk Server and for each database group, Btm_priorityupgrade.sql must be executed against the BizTalk Interchange_BTM database, and Sq_priorityupgrade.sql must be executed against the BizTalk Interchange_SQ database. To do this, you must use the SQL Query Analyzer to execute the stored procedures against the affected BizTalk database.

To install this fix, follow these steps:  Use either the Services Microsoft Management Console (MMC) or the BizTalk Server Administrator to stop BizTalk Server. To use the Services MMC on Microsoft Windows 2000, follow these steps:

 Click Start, point to Settings, click Control Panel, and then double-click Administrative Tools. Click Services, double-click System services, and then double-click BizTalk Messaging services to stop or restart the BizTalk Messaging Service.

To use the Services MMC on Microsoft Windows XP, follow these steps:

 Click Start, click Control Panel, click Performance and Maintenance, and then click Administrative Tools.</li> Double-click System services, and then double-click BizTalk Messaging Services to stop and restart the BizTalk messaging service.</li></ol>

To use the BizTalk Server Administrator, right-click the BizTalk Server name in the BizTalk Server group to stop or start the services.

</li> In the BizTalk Server installation directory (\Program Files\Microsoft BizTalk Server\), delete Cisengine.dll, Ciscore.dll, and Mscis.exe.</li> Replace the deleted files with the files from this fix.</li> Use the SQL Query Analyzer to apply Btm_priorityupgrade.sql to the Interchange_BTM database.</li> Use the SQL Query Analyzer to apply Sq_priorityupgrade.sql to the Interchange_SQ database.</li> Use either the Services Microsoft Management Console (MMC) or the BizTalk Server Administrator to restart BizTalk Server.</li></ol>

NOTE: You must upgrade all servers that share the database. Any computers that are running BizTalk Server and that do not have the fix installed fail to start after the BizTalk Management (BTM) and Shared Queue (SQ) databases have been updated.

<div class="moreinformation_section">

To set channel priority, use the Updatechannel.vbs script. The Updatechannel.vbs script is included in this hotfix.

Note BizTalk Server 2002 SP1 does not include the Updatechannel.vbs script.

To create the Updatechannel.vbs script, follow these steps:  Create a new text file that is named Updatechannel.vbs.</li>  Paste the following code into the Updatechannel.vbs file. Dim WshShell : set WshShell = WScript.CreateObject(&quot;WScript.Shell&quot;) Dim objArgs : set objArgs = WScript.Arguments

Dim hKeyServer : hKeyServer = WshShell.RegRead(&quot;HKLM\Software\Microsoft\BizTalk Server\1.0\Administration\MgmtDbServer&quot;) Dim hKeyDB : hKeyDB = WshShell.RegRead(&quot;HKLM\Software\Microsoft\BizTalk Server\1.0\Administration\MgmtDbName&quot;)

if objArgs.Length <> 2 then wscript.echo &quot;Usage: UpdateChannel.vbs &quot; else dim channelname : channelname = objArgs(0) dim priority : priority = objArgs(1) 'Enforce constraints on priority range. if priority < 1 then priority = 1 end if

Dim str : str = &quot;Update bts_channel set datemodified = getdate, priority = &quot; & priority & &quot; where name = '&quot; & channelname & &quot;'&quot; ExecuteDBCommand hKeyServer, hKeyDB, str end if

Function GetConnection(cnString) dim conn : set conn = CreateObject(&quot;ADODB.Connection&quot;) conn.Mode = 2 ' adModeWrite conn.ConnectionTimeout = 30 conn.Provider = &quot;MSDASQL&quot; conn.Open cnString Set GetConnection = conn End Function

Sub ExecuteDBCommand(strServer, strDB, strCmd) dim cnString : cnString = &quot;Driver={SQL Server}; Trusted_Connection=yes; Server=&quot; & strServer & &quot; Initial Catalog=&quot; & strDB dim conn : set conn = GetConnection(cnString) dim cmd : set cmd = CreateObject(&quot;ADODB.Command&quot;) set cmd.ActiveConnection = conn cmd.CommandText = strCmd cmd.Execute Set cmd = Nothing Set conn = Nothing End Sub </li> Save the Updatechannel.vbs script.</li></ol>

To use the Updatechannel.vbs script, follow these steps:  Click Start, click Run, type cmd, and then click OK.</li> At the command prompt, use the cd command to change to the folder where you saved the Updatechannel.vbs script.</li> At the command prompt, type the following command:

Updatechannel

Note In this command,  is a placeholder for the name of the channel, and   is a placeholder for an integer between 1 and 10. When you set the channel priority, 1 is the highest priority, and 10 is the lowest priority.</li></ol>

<div class="references_section">