BizTalk Server Interchange Throughput Analysis

Mak Rowshan
Microsoft Corporation

June 2002

Applies to:
Microsoft BizTalk Server 2002
Microsoft SQL Server 2000

Summary: This article illustrates how you can leverage SQL Server Analysis Services to analyze the BizTalk Server’s document processing. By creating a cube using the BizTalk Server’s document tracking database, you can aggregate the number and sizes of interchanges by source, destination, document type, transport type, and time. Using the PivotTable Office Web Component, you can easily browse this cube and analyze your BizTalk Server’s document throughput as well.

Introduction

To identify data transfer trends, patterns, and possible bottlenecks in BizTalk Server EAI and B2B solutions, it is important to know the volume, size, and type of submitted documents. Furthermore slicing and dicing these performance numbers by transport type, source and destination, time and other important criteria is valuable. BizTalk Document Tracking allows for queries against the interchanges and documents. As such it is very useful for tracking a given interchange and document. However to look at the big picture and aggregate the details, an OLAP solution is more suitable.

A View to a Cube

All of the data columns used for building this cube are stored in one table, namely dta_interchange_details in the Interchange_DTA database. However some of the columns in this table are foreign keys that refer to descriptive values in other tables. We can create a view that provides all the necessary data for building the cube, as shown in the following diagram.

The following SQL script creates the view in the Interchange_DTA database.

Click on Test Connection to make sure the data source is functional. Then click on OK to save the data source.

Create the Dimensions

Creation of the following shared dimensions allows you to slice and dice BizTalk Server’s throughput from different perspectives, namely from transport type to document type to source. Most of the dimensions presented below are simple one level dimension. The only exceptions are Time and Transport Type dimensions which have multiple levels.

Even though what is presented in this article limits the dimensions to the content of BizTalk Server tracking database, you may refine the dimension and measures by adding custom data to what BizTalk provides. For example, this article discusses a Source Organization dimension that contains one level. You may categorize the source organizations into suppliers, internal applications, external applications, etc. This will allow you to aggregate the throughput by source organization categories and then, as needed, drill down to each category for more detailed information.

Source Organization Dimension

Right click on Shared Dimensions, in Analysis Manager. Select New, and then click on Editor. This allows you to use the dimension editor to create a new shared dimension

In the “Choose a Dimension Table” dialog box, select the view that you created in step 1 (vBTSCube.)

In the Dimension Editor window right click on <new> and select New Level, then select the nvcSrcAliasId column from the “Insert Level” dialog box.

Rename the newly created level to “Source Organization” by right clicking on it and selecting Rename from the pop-up menu.

Save the dimension and enter “Source Organization” when prompted for its name.

Select Process Dimension from the Tools menu item to populate the dimension with data.

Destination Organization Dimension

Right click on Shared Dimensions, in Analysis Manager. Select New, and then click on Editor. This allows you to use the dimension editor to create a new shared dimension.

In the “Choose a Dimension Table” dialog box, select the view that you created in step 1 (vBTSCube.)

In the Dimension Editor window right click on <new> and select New Level, then select the nvcDestAliasId column from the “Insert Level” dialog box.

Rename the newly created level to “Destination Organization” by right clicking on it and selecting Rename from the pop-up menu.

Save the dimension and enter “Destination Organization” when prompted for its name.

Select Process Dimension from the Tools menu item to populate the dimension with data.

Source Application Dimension

This article takes the approach of defining separate dimensions for source and destination organizations and applications. Since organizations and applications are usually used differently in implementing business processes with BizTalk Server. However, an alternative approach may be to roll both organizations and applications in the same dimension. If the later approach is used, you may define two levels for the dimension, one being the source or organization type, and the other the actual source or destination.

Right click on Shared Dimensions, in Analysis Manager. Select New, and then click on Editor. This allows you to use the dimension editor to create a new shared dimension.

In the “Choose a Dimension Table” dialog box, select the view that you created in step 1 (vBTSCube.)

In the Dimension Editor window right click on <new> and select New Level, then select the nvcSrcAppName column from the “Insert Level” dialog box.

Rename the newly created level to “Source Application” by right clicking on it and selecting Rename from the pop-up menu.

Save the dimension and enter “Source Application” when prompted for its name.

Select Process Dimension from the Tools menu item to populate the dimension with data.

Destination Application Dimension

Right click on Shared Dimensions, in Analysis Manager. Select New, and then click on Editor. This allows you to use the dimension editor to create a new shared dimension.

In the “Choose a Dimension Table” dialog box, select the view that you created in step 1 (vBTSCube.)

In the Dimension Editor window right click on <new> and select New Level, then select the nvcDestAppName column from the “Insert Level” dialog box.

Rename the newly created level to “Destination Application” by right clicking on it and selecting Rename from the pop-up menu.

Save the dimension and enter “Destination Application” when prompted for its name.

Select Process Dimension from the Tools menu item to populate the dimension with data.

Direction Dimension

Direction is an attribute indicating whether the document is incoming or outgoing.

Right click on Shared Dimensions, in Analysis Manager. Select New, and then click on Editor. This allows you to use the dimension editor to create a new shared dimension.

In the “Choose a Dimension Table” dialog box, select the view that you created in step 1 (vBTSCube.)

In the Dimension Editor window right click on <new> and select New Level, then select the nvcDirectionName column from the “Insert Level” dialog box.

Rename the newly created level to “Direction” by right clicking on it and selecting Rename from the pop-up menu.

Save the dimension and enter “Direction” when prompted for its name.

Select Process Dimension from the Tools menu item to populate the dimension with data.

Transport Dimension

Right click on Shared Dimensions, in Analysis Manager. Select New, and then click on Editor. This allows you to use the dimension editor to create a new shared dimension.

In the “Choose a Dimension Table” dialog box, select the view that you created in step 1 (vBTSCube.)

In the Dimension Editor window right click on <new> and select New Level, then select the nvcTransportTypeName column from the “Insert Level” dialog box.

Rename the newly created level to “Transport Type” by right clicking on it and selecting Rename from the pop-up menu.

In the Dimension Editor window right click on <new> and select New Level, then select the nvcTransportAddress column from the “Insert Level” dialog box. This will create the second level in the dimension.

Rename the newly created level to “Transport Address” by right clicking on it and selecting Rename from the pop-up menu.

Save the dimension and enter “Transport” when prompted for its name.

Select Process Dimension from the Tools menu item to populate the dimension with data.

Time Dimension

The following steps, unlike to ones used so far, use the Dimension Wizard to create the Time dimension. The Dimension Wizard provides additional built-in functionality for creation of time dimensions.

Right click on Shared Dimensions, in Analysis Manager. Select New, and then click on Wizard.

Select Star Schema in response to “How you want to create the dimension”, and click on Next.

On the “Choose a Dimension Table” dialog box, select the view that you created in step 1 (vBTSCube.) Then click on Next.

Select “Time Dimension” as the dimension type. A drop down list box allows you to select the column. This list box is populated with the existing date fields. Select dtTimeSent as the Date column. Then click on Next.

The “Create time dimension levels” dialog box allows to define the granularity of the time dimension. Accept the default as Year, Quarter, Month, Day. If you’d like to drill down to more granular levels, you may add Hour and Minute to your levels.

Click Next on the Advanced Options page, and enter “Time” for the name of the dimension. Click on Finish to generate the Time dimension. Finally select Process from the Tools menu item to populate the dimension.

This article uses the dtTimeSent date field from the BizTalk Server Tracking Database as the source for building the time dimension. However, this field will not have entries for the dates when no interchanges occurred. So to have a complete time dimension, you may use an existing time dimension such as the one provided with the Foodmart sample database, or use a stored procedure to create a complete time table to be used as the source for your Time dimension.

The following table provides a summary of the dimensions and their sources.

Dimension

Name

Dimension

Table

Dimension

Column

Level(s) Name

Time

vIntAnalysis

dtTimeSent

Year
Quarter
Month
Day

Source Organization

vIntAnalysis

nvcSrcAliasId

Source Organization

Destination Organization

vIntAnalysis

nvcDestAliasId

Destination Organization

Source Application

vIntAnalysis

nvcSrcAppName

Source Application

Destination Application

vIntAnalysis

nvcDestAppName

Destination Application

Direction

vIntAnalysis

nvcDirectionName

Direction

Transport

vIntAnalysis

NvcTransportTypeName
nvcTransportAddress

Transport Type
Transport Address

Creating the above dimensions as shared dimensions allows you to use the dimensions in multiple cubes. This is especially useful for a clustered BizTalk Server environment in where more than one SQL Server databases are actively tracking documents. So you will need to create more than one cube.

Build the Cube

Create the cube by right clicking on Cubes in Analysis Manager, and then clicking on New and selecting Editor. This will allow you to create a new cube using the Cube Editor.

Select the view created in Step 2 (vBTSCube) as the fact table.

Dimensions: Right click on Dimensions and select Existing Dimensions. In the “Dimension Manager” dialog box select all of the dimensions that you created in Step 3.

Measures: You can easily add two measures to the cube, the number of documents, and the size of documents.

To create the Count measure, right click on the Measures, select New Measure, and then select the nInterchangeKey from the “Insert Measure” dialog box. Change the measure name to Count by entering the name in the Properties under the Basic tab. Also change the Aggregate Function to Count in the Properties under the Basic tab. This will tell the Analysis Services to count the number of records rather than adding their values.

To create the Size measure, right click on the Measures, select New Measure, and then select the nNumberOfBytes from the “Insert Measure” dialog box. Change the measure name to Size by entering the name in the Properties under the Basic tab. This measure shows the size of the document in bytes.

You may create a calculated measure to show the size of the document in KB instead of bytes. To create this measure, right click on Calculated Members in the Cube Editor and select New Calculated Member. Enter the following in the Value Expression text box: [Measures].[Size] / 1024

Also change the Member name to “Size KB”. If you want to only show the size in KB, click on Size under Measures, and change its Visible property under Advanced Properties to False.

Save the cube as “BTS Throughput”.

Click on Tools from the menu bar and select Process Cube to populate the cube with data.

Refreshing the Cube

You can create a DTS package and schedule it to refresh the cube’s data.

Use the SQL Server Enterprise Manager to open the database in which you want to create the DTS package.

Right click on Local Packages under the Data Transformation Services and select New Package.

Select the Analysis Services Processing Task from the task pane and drag it to the package window.

Select the BTS Throughput cube in the tree view.

Select Refresh Data as the processing option.

Save and close the package.

To schedule the package, right click on it, and select Schedule. In the Schedule dialog box, select the occurrence, frequency, and duration, and click on OK to save the schedule.

Creating the User Interface for the Browsing the Cube

You may use Microsoft Excel, or create a form with Visual Basic, or write an ASP page to browse the cube. Following are the instructions for browsing the cube in Excel.

Using Excel

You can create a PivotTable in Excel and link it to the BTS Throughput cube which you generated in the previous steps.

Open an Excel Workbook. Select Data from the menu bar, then select Import External Data, and then Import Data.

Enter the server name where the BTS Throughput resides and the Logon credentials. Click on Next.

Select the OLAP database from the combo box and select the BTS Throughput cube. Click on Next. Click on OK and then Finish. This step creates the data source. Click on Open to open the new data source.

Accept the selected range for the PivotTable. This creates the PivotTable inside your Excel Workbook.

You can drag the cube fields from the PivotTable Field List pop-up and drag them to the row, column, and data areas.

The following diagram shows the PivotTable where the Date is the column field, Transport Type is the row field, and Count and Size are the data items. This PivotTable allows you to aggregate, dice, and slice the number and sizes of the documents by transport type and address.

Figure 2. Pivot Table Example

You can also use the PivotTable control from the Office Web Components on an HTML page or a Visual Basic form to browse the cube.

Show:
Inherited
Protected

Was this page helpful?

Your feedback about this content is important.Let us know what you think.