BizTalk priority-based message processing improvement (319450)



The information in this article applies to:

  • Microsoft BizTalk Server 2002

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 "first in, first out" (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.

RESOLUTION

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, but it is only intended to correct the problem that is described in this article. Only apply it to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next BizTalk Server service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question. 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:
  1. 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:

    1. Click Start, point to Settings, click Control Panel, and then double-click Administrative Tools.
    2. 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:

    1. Click Start, click Control Panel, click Performance and Maintenance, and then click Administrative Tools.
    2. Double-click System services, and then double-click BizTalk Messaging Services to stop and restart the BizTalk messaging service.
    To use the BizTalk Server Administrator, right-click the BizTalk Server name in the BizTalk Server group to stop or start the services.

  2. In the BizTalk Server installation directory (\Program Files\Microsoft BizTalk Server\), delete Cisengine.dll, Ciscore.dll, and Mscis.exe.
  3. Replace the deleted files with the files from this fix.
  4. Use the SQL Query Analyzer to apply Btm_priorityupgrade.sql to the Interchange_BTM database.
  5. Use the SQL Query Analyzer to apply Sq_priorityupgrade.sql to the Interchange_SQ database.
  6. Use either the Services Microsoft Management Console (MMC) or the BizTalk Server Administrator to restart BizTalk Server.
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.
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:
  1. Create a new text file that is named Updatechannel.vbs.
  2. Paste the following code into the Updatechannel.vbs file.
    Dim WshShell : set WshShell = WScript.CreateObject("WScript.Shell")
    Dim objArgs : set objArgs = WScript.Arguments
    
    Dim hKeyServer : hKeyServer = WshShell.RegRead("HKLM\Software\Microsoft\BizTalk Server\1.0\Administration\MgmtDbServer")
    Dim hKeyDB : hKeyDB = WshShell.RegRead("HKLM\Software\Microsoft\BizTalk Server\1.0\Administration\MgmtDbName")
    
    if objArgs.Length <> 2 then
    wscript.echo "Usage: UpdateChannel.vbs <channel name> <priority>"
    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 = "Update bts_channel set datemodified = getdate(), priority = " & priority & " where name = '" & channelname & "'"
    ExecuteDBCommand hKeyServer, hKeyDB, str
    end if
    
    Function GetConnection(cnString)
    dim conn : set conn = CreateObject("ADODB.Connection")
    conn.Mode = 2 ' adModeWrite
    conn.ConnectionTimeout = 30
    conn.Provider = "MSDASQL"
    conn.Open cnString
    Set GetConnection = conn
    End Function
    
    Sub ExecuteDBCommand(strServer, strDB, strCmd)
    dim cnString : cnString = "Driver={SQL Server}; Trusted_Connection=yes; Server=" & strServer & " Initial Catalog=" & strDB
    dim conn : set conn = GetConnection(cnString)
    dim cmd : set cmd = CreateObject("ADODB.Command")
    set cmd.ActiveConnection = conn
    cmd.CommandText = strCmd
    cmd.Execute
    Set cmd = Nothing
    Set conn = Nothing
    End Sub
    
    
  3. Save the Updatechannel.vbs script.
To use the Updatechannel.vbs script, follow these steps:
  1. Click Start, click Run, type cmd, and then click OK.
  2. At the command prompt, use the cd command to change to the folder where you saved the Updatechannel.vbs script.
  3. At the command prompt, type the following command:

    Updatechannel channelnamepriority

    Note In this command, channelname is a placeholder for the name of the channel, and priority 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.

REFERENCES


For more information about how to use the SQL Query Analyzer, see the following Microsoft Developer Network (MSDN) Web site: 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


Modification Type:MajorLast Reviewed:1/20/2006
Keywords:kbHotfixServer kbQFE kbBizTalk2002SP1fix kbfix kbinfo KB319450