<feed xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
    <title>Rob Bowman</title>
    <link rel="self" type="application/xml" href="http://geekswithblogs.net/RobBowman/Atom.aspx" />
    <subtitle type="html"> Battling with BizTalk</subtitle>
    <id>http://geekswithblogs.net/RobBowman/Default.aspx</id>
    <author>
        <name>RobBowman</name>
        <uri>http://geekswithblogs.net/RobBowman/Default.aspx</uri>
    </author>
    <generator uri="http://subtextproject.com" version="Subtext Version 0.0.0.0">Subtext</generator>
    <updated>2012-04-04T05:33:38Z</updated>
    <entry>
        <title>Generate SQL Server Test Data</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/RobBowman/archive/2011/10/11/generate-sql-server-test-data.aspx" />
        <id>http://geekswithblogs.net/RobBowman/archive/2011/10/11/generate-sql-server-test-data.aspx</id>
        <published>2011-10-11T11:50:23-05:00:00</published>
        <updated>2011-10-11T13:38:57Z</updated>
        <content type="html">&lt;p&gt;
        &lt;span class="style1" style="color: rgb(51, 51, 51); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(229, 229, 229); font-size: medium;"&gt;
        I came across (thanks Paul) a great way to quickly generate test data for SQL 
        Server today.&lt;/span&gt;&lt;/p&gt;
    &lt;p class="style1"&gt;
        DECLARE @rows INT, @a int&lt;/p&gt;
    &lt;p class="style1"&gt;
 SET @rows = 50&lt;/p&gt;
    &lt;p class="style1"&gt;
 SELECT * INTO dbo.RobTest FROM
    &lt;/p&gt;
    &lt;p class="style1"&gt;
        (SELECT TOP (@rows)
    &lt;/p&gt;
    &lt;p class="style1"&gt;
        Rownumber = ROW_NUMBER() OVER (ORDER BY (SELECT 1)),&lt;/p&gt;
    &lt;p class="style1"&gt;
 SomeInt = ABS(CHECKSUM(NEWID())) % 50000 + 1 ,&lt;/p&gt;
    &lt;p class="style1"&gt;
 SomeLetters2 = CHAR(ABS(CHECKSUM(NEWID())) % 26 + 65) + 
        CHAR(ABS(CHECKSUM(NEWID())) % 26 + 65) ,&lt;/p&gt;
    &lt;p class="style1"&gt;
 SomeMoney = CAST(ABS(CHECKSUM(NEWID())) % 10000 / 100.0 AS MONEY) ,&lt;/p&gt;
    &lt;p class="style1"&gt;
 SomeDate = CAST(RAND(CHECKSUM(NEWID())) * 3653.0 + 36524.0 AS DATETIME) ,&lt;/p&gt;
    &lt;p class="style1"&gt;
 SomeHex12 = RIGHT(NEWID(), 12),&lt;/p&gt;
    &lt;p class="style1"&gt;
 TrueRandomZerotoOne = RAND(CHECKSUM(NEWID()))&lt;/p&gt;
    &lt;p class="style1"&gt;
 FROM sys.all_columns ac1 CROSS JOIN sys.all_columns ac2 CROSS JOIN sys.all_columns 
        ac3&lt;/p&gt;
    &lt;p class="style1"&gt;
 ) AS a&lt;/p&gt;&lt;img src="http://geekswithblogs.net/RobBowman/aggbug/147257.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/RobBowman/comments/147257.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/RobBowman/comments/commentRss/147257.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/RobBowman/services/trackbacks/147257.aspx</trackback:ping>
    </entry>
    <entry>
        <title>XML Namespaces</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/RobBowman/archive/2009/11/24/xml-namespaces.aspx" />
        <id>http://geekswithblogs.net/RobBowman/archive/2009/11/24/xml-namespaces.aspx</id>
        <published>2009-11-24T16:43:47-06:00:00</published>
        <updated>2012-04-04T05:33:38Z</updated>
        <content type="html">&lt;p&gt; &lt;/p&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt;I've been working with XML for several years now but I've never been entirely sure that I fully understand all there is to know about namespaces. Of course namespaces are central to how document instances are defined by BizTalk, so I certainly had some understanding. However, it's quite easy to just "get by" without a complete understanding because of the inteli-sense and other helpful features provided by tools like Visual Studio and XML Spy. If I'd had only notepad in which to create the XSDs and XML documents then I'm sure I would have been stuck.&lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt;Anyhow, this has been bothering me for a while, so today I decided I was going to learn all there is to know about XML namespaces - and make it stick! This learning involved reading sections from the excellent book "The XML Schema Companion" by Neil Bradley, and otherwise messing around with XSDs and XML documents in Visual Studio.&lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt; font-weight: bold"&gt;Key Points&lt;/div&gt;
&lt;ul type="disc" style="margin-top: 0in; unicode-bidi: embed; direction: ltr; margin-bottom: 0in; margin-left: 0.375in"&gt;
    &lt;li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle"&gt;&lt;span style="font-size: 11pt"&gt;It is possible to create an XSD that does not define a namespace. Such schemas can be used to validate unqualified XML documents. Below I have pasted a simple XSD that does not define a namespace:&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt;&amp;lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt;&amp;lt;xs:element name="RootNode"&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.75in; font-size: 11pt"&gt;&amp;lt;xs:annotation&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 1.125in; font-size: 11pt"&gt;&amp;lt;xs:documentation&amp;gt;Comment describing your root element&amp;lt;/xs:documentation&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.75in; font-size: 11pt"&gt;&amp;lt;/xs:annotation&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.75in; font-size: 11pt"&gt;&amp;lt;xs:complexType&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 1.125in; font-size: 11pt"&gt;&amp;lt;xs:sequence&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 1.5in; font-size: 11pt"&gt;&amp;lt;xs:element name="Name"/&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 1.5in; font-size: 11pt"&gt;&amp;lt;xs:element name="Age"/&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 1.125in; font-size: 11pt"&gt;&amp;lt;/xs:sequence&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.75in; font-size: 11pt"&gt;&amp;lt;/xs:complexType&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt;&amp;lt;/xs:element&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt;&amp;lt;/xs:schema&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt;I then used XML spy to create an XML document instance from the above XSD, this is what it came up with:&lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt;&amp;lt;RootNode xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="D:\Rob\LearnXMLNamespaces\Person.xsd"&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt;&amp;lt;Name/&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt;&amp;lt;Age/&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt;&amp;lt;/RootNode&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt;Note, the root node has the attribute "xmlns:xsi", this is simply defining a prefix for a namespace - it is not setting the document level namespace. In effect it is saying that elements, attributes etc from the namespace &lt;a href="http://www.w3.org/2001/XMLSchema-instance"&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/a&gt; can be used by prefixing XSI, however where there is no prefix then the element, attribute etc does not belong to a namespace - &lt;span style="font-weight: bold"&gt;it is unqualified. &lt;/span&gt;The attribute noNamespaceSchemaLocation is interesting. This gives the URL reference to the XSD that will be used when validating the XML document. It also infers that the XSD does not define a namespace - and that this document is not "namespace qualified" at document level.&lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt; font-weight: bold"&gt; &lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt;I then went back to the XSD and defined a namespace for it by adding a "TargetNamespace" attribute to the root node as follows:&lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt;&amp;lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" &lt;span style="font-weight: bold"&gt;targetNamespace="&lt;/span&gt;&lt;a href="http://samplenamespace/"&gt;&lt;span style="font-weight: bold"&gt;http://samplenamespace&lt;/span&gt;&lt;/a&gt;&lt;span style="font-weight: bold"&gt;"&lt;/span&gt;&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt;&amp;lt;xs:element name="RootNode"&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt;Etc...&lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt;I then used XML spy to generate a new sample XML instance document from this, updated XSD - this is what it came up with:&lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt;&amp;lt;!--Sample XML file generated by XMLSpy v2005 rel. 3 U (&lt;a href="http://www.altova.com/"&gt;http://www.altova.com&lt;/a&gt;)--&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt;&amp;lt;RootNode &lt;span style="font-weight: bold"&gt;xmlns="&lt;/span&gt;&lt;a href="http://samplenamespace/"&gt;&lt;span style="font-weight: bold"&gt;http://samplenamespace&lt;/span&gt;&lt;/a&gt;&lt;span style="font-weight: bold"&gt;"&lt;/span&gt; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" &lt;span style="font-weight: bold"&gt;xsi:schemaLocation="http://samplenamespace&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt;&lt;span style="font-weight: bold"&gt;D:\Rob\LearnXMLNamespaces\Person.xsd"&lt;/span&gt;&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt;&amp;lt;Name/&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt;&amp;lt;Age/&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt;&amp;lt;/RootNode&amp;gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt;A couple of things have changed:&lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt; &lt;/div&gt;
&lt;ol type="1" style="margin-top: 0in; unicode-bidi: embed; direction: ltr; margin-bottom: 0in; margin-left: 0.375in; font-size: 11pt"&gt;
    &lt;li value="1" style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle"&gt;&lt;span style="font-size: 11pt"&gt;The attribute xmlns has been added to the root node and assigned the value "&lt;/span&gt;&lt;a href="http://samplenamespace/"&gt;&lt;span style="font-size: 11pt"&gt;http://samplenamespace&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 11pt"&gt;". This specifies that, unless explicitly qualified with a different namespace, all elements and attributes defined with the XML instance belong to the namespace "&lt;/span&gt;&lt;a href="http://samplenamespace/"&gt;&lt;span style="font-size: 11pt"&gt;http://samplenamespace&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 11pt"&gt;"&lt;/span&gt;&lt;/li&gt;
    &lt;li value="2" style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle"&gt;&lt;span style="font-size: 11pt"&gt;The attribute schemaLocation (which happens to belong to the xsi schema instance namespace) has been added to the root node. The attribute contains a pair of values, the name of the namespace defined by the schema followed by a space then a URL reference to the XSD that defines the namespace&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt; &lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt;The above just skims the surface of what can be done with namespaces but in does provide the basics. There are many cases where an XML document will contain items defined in multiple namespaces. However, understanding such a document is straight-forward once you are aware of the key concepts and implementation as described above.&lt;/div&gt;&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt;Update: 4th April 2012, had some more fun with XSDs today. Must remember, adding xmlns="x" to an XSD sets the namespace for that XSD; setting targetNamespace for an XSD gives the namespace for which other XSDs and XML can reference with an Import.&lt;/div&gt;&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt;While creating the new schemas I came across a problem when trying to validate what seemed to be valid XML. Under the root element was &amp;lt;Invoice&amp;gt; , on attempting a validate from within XML Spy I received the message: "Unexpected element 'Invoice' in element 'InvoiceBatch'. Expected: Invoice". It turned out that this was because I had removed "elementFormDefault='qualified'", once I added this back in then it validated OK. &lt;/div&gt;&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0in 0.375in; font-size: 11pt"&gt; &lt;/div&gt;
&lt;p style="margin: 0in"&gt;&lt;span style="font-family: Calibri; font-size: 11pt"&gt;&lt;a href="http://www.biztalkers.co.uk/"&gt;www.biztalkers.c&lt;/a&gt;om&lt;/span&gt;&lt;/p&gt;&lt;img src="http://geekswithblogs.net/RobBowman/aggbug/136515.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/RobBowman/comments/136515.aspx</wfw:comment>
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/RobBowman/comments/commentRss/136515.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/RobBowman/services/trackbacks/136515.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Scripting Perfmon</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/RobBowman/archive/2009/07/08/scripting-perfmon.aspx" />
        <id>http://geekswithblogs.net/RobBowman/archive/2009/07/08/scripting-perfmon.aspx</id>
        <published>2009-07-08T15:17:05-05:00:00</published>
        <updated>2011-10-11T11:45:25Z</updated>
        <content type="html">&lt;p&gt; &lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;&lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type" /&gt;
&lt;meta content="OneNote.File" name="ProgId" /&gt;
&lt;meta content="Microsoft OneNote 12" name="Generator" /&gt;
&lt;p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt; text-decoration: underline"&gt;Scripting Perfmon&lt;/p&gt;
&lt;p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt; &lt;/p&gt;
&lt;p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt;We have a test team in India that I would like to run some load and performance testing. They have access to the required test server and load tools but limited experience using tools such as perfmon.&lt;/p&gt;
&lt;p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt; &lt;/p&gt;
&lt;p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt;I have previously only used Perfmon to take a real-time view of performance counters, or used the ui to configure logging to a data file for later evaluation. In this particular case I didn't have access to the test server to enable me to manually configure the logging, and I know that trying to walk someone through this on the phone would be painful. After a little searching the web I discovered that it's possible to script the perfmon counter logging - exactly what I needed!&lt;/p&gt;
&lt;p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt; &lt;/p&gt;
&lt;p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt;I started by creating a config file containing the counters that I wished to monitor. I called this &lt;span style="font-weight: bold"&gt;baseling.cfg&lt;/span&gt; . It simply contains a unique line for each counter to be logged, as follows:&lt;/p&gt;
&lt;p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt; &lt;/p&gt;
&lt;p style="font-style: italic; margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt;"\Memory\Available MBytes"&lt;/p&gt;
&lt;p style="font-style: italic; margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt;"\Memory\Pool Nonpaged Bytes"&lt;/p&gt;
&lt;p style="font-style: italic; margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt;"\Memory\Pool Paged Bytes"&lt;/p&gt;
&lt;p style="font-style: italic; margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt;"\PhysicalDisk(*)\Current Disk Queue Length"&lt;/p&gt;
&lt;p style="font-style: italic; margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt;"\PhysicalDisk(*)\Disk Reads/sec"&lt;/p&gt;
&lt;p style="font-style: italic; margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt;"\PhysicalDisk(*)\Disk Reads Bytes/sec"&lt;/p&gt;
&lt;p style="font-style: italic; margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt;"\PhysicalDisk(*)\Disk Writes/sec"&lt;/p&gt;
&lt;p style="font-style: italic; margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt;"\PhysicalDisk(*)\Disk Writes Bytes/sec"&lt;/p&gt;
&lt;p style="font-style: italic; margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt;"\Process(*)\% Processor Time"&lt;/p&gt;
&lt;p style="font-style: italic; margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt;"\Process(*)\Private Bytes&lt;/p&gt;
&lt;p style="font-style: italic; margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt;"\Process(*)\Virtual Bytes"&lt;/p&gt;
&lt;p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt; &lt;/p&gt;
&lt;p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt;I then created a batch file containing the required command line to setup the data capture. I called the file &lt;span style="font-weight: bold"&gt;create_data_collector.bat&lt;/span&gt;, it contains the following:&lt;/p&gt;
&lt;p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt; &lt;/p&gt;
&lt;p style="font-style: italic; margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt;logman create counter BASELINE -f bincirc -max 200 -si 00:00:05 --v -o "c:\perfmon\serverbaseline" -cf "c:\perfmon\baseline.config"&lt;/p&gt;
&lt;p style="font-style: italic; margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt; &lt;/p&gt;
&lt;p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt;To find out what the various parameters mean and other options available just run a quick google for 'logman'. In my particular case:&lt;/p&gt;
&lt;p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt; &lt;/p&gt;
&lt;ul type="disc" style="margin-top: 0in; unicode-bidi: embed; direction: ltr; margin-bottom: 0in; margin-left: 0.375in"&gt;
    &lt;li style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle"&gt;&lt;span style="font-family: Calibri; font-size: 11pt"&gt;&lt;span&gt; &lt;/span&gt;I am creating a data collector called 'BASELINE', logging to file up to a max size of 200mb&lt;/span&gt;&lt;/li&gt;
    &lt;li style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle"&gt;&lt;span style="font-family: Calibri; font-size: 11pt"&gt;The file is binary circular file, meaning that once it reaches maximum size it will begin overwriting the oldest records within the file&lt;/span&gt;&lt;/li&gt;
    &lt;li style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle"&gt;&lt;span style="font-family: Calibri; font-size: 11pt"&gt;&lt;span&gt; &lt;/span&gt;The log is to be updated every 5 seconds&lt;/span&gt;&lt;/li&gt;
    &lt;li style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle"&gt;&lt;span style="font-family: Calibri; font-size: 11pt"&gt;The file will be output to the folder c:\perfmon\serverbaseline&lt;/span&gt;&lt;/li&gt;
    &lt;li style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle"&gt;&lt;span style="font-family: Calibri; font-size: 11pt"&gt;Counters to include in the log are contained within the previously mentioned configuration file: "c:\perfmon\baseline.config&lt;/span&gt;&lt;span style="font-style: italic; font-family: Calibri; font-size: 11pt"&gt;"&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="font-style: italic; margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt; &lt;/p&gt;
&lt;p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; color: red; font-size: 11pt"&gt;On first running the batch file locally (to test it) I received a message telling me that the data capture vehicle couldn't be created because of a permissions issue. I adjusted the permissions to the logging folder "c:\perfmon\serverbaseline" and all was good.&lt;/p&gt;
&lt;p style="font-style: italic; margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt; &lt;/p&gt;
&lt;p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt;All that remained was to script to start the data collection. For this I created the batch file &lt;span style="font-weight: bold"&gt;start_collector.bat&lt;/span&gt;, containing the following single line:&lt;/p&gt;
&lt;p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt; &lt;/p&gt;
&lt;ul type="disc" style="margin-top: 0in; unicode-bidi: embed; direction: ltr; margin-bottom: 0in; margin-left: 0.375in"&gt;
    &lt;li style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle"&gt;&lt;span style="font-family: Calibri; font-size: 11pt"&gt;logman.exe start baseline&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt; &lt;/p&gt;
&lt;p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt;A few minutes after starting the logging I could see the log file beginning to grow. Great, I thought! I went back to the perfmon ui, clicked the 'view log data' button (looks like a db drum) and selected my new and continually growing log file. It didn't complain, and the current data view was cleared - but where was the historic data that should be been logged? I opened the log file in notepad - just binary data. I wanted to check that it was logging the data I expected so I deleted the BASELINE data collector, then re-created, choosing to log to text file, rather than binary. I then started logging, gave it a few minutes and opened the newly logged data in notepad. It appeared just as I expected, with column headers for my counters and lots of data for each subsequent row.&lt;/p&gt;
&lt;p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt; &lt;/p&gt;
&lt;p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt;Great - I was logging the data but couldn't get it to appear in the perfmon graph! Then it struck me, in addition to choosing the data file as the data source for the perfmon graph I needed to add the counters to the graph. I hit the add button on the toolbar (+ symbol) and was presented with a dialog offering a limited set of counters - just the ones I'd specified in the baseline.cfg file. After selecting the counters, my historic data was displayed in the graph. Such a result called for celebratory cup of tea!&lt;/p&gt;
&lt;p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt; &lt;/p&gt;
&lt;p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt;&lt;u&gt;Addition&lt;/u&gt;&lt;/p&gt;
&lt;p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt; &lt;/p&gt;
&lt;p style="margin: 0in; font-family: Calibri; font-size: 11pt"&gt;I've now also started working on a script to run a SQL profiler trace. My initial results were disappointing, the trace file was generated but my filters were not applied.&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Calibri; font-size: 11pt"&gt; &lt;/p&gt;
&lt;p style="margin: 0in; font-family: Calibri; font-size: 11pt"&gt;I had used the profiler UI to generate the script: file\export\script trace definition. Unfortunately, it seems that there's a bug in SQL 2005 which means that the script generated by this option will OR each of your filters. For details see &lt;a href="http://www.devnewsgroups.net/group/microsoft.public.sqlserver.tools/topic60213.aspx"&gt;http://www.devnewsgroups.net/group/microsoft.public.sqlserver.tools/topic60213.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Calibri; font-size: 11pt"&gt;Or&lt;/p&gt;
&lt;p style="margin: 0in"&gt;&lt;a href="https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=258393"&gt;&lt;span style="font-family: Tahoma; color: black; font-size: 9.75pt"&gt;https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=258393&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Calibri; font-size: 11pt"&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in"&gt; &lt;/p&gt;
&lt;p style="margin: 0in"&gt;&lt;span style="font-family: Calibri; font-size: 11pt"&gt;&lt;a href="http://www.biztalkers.com"&gt;www.biztalkers.com&lt;/a&gt; &lt;/span&gt;&lt;/p&gt;&lt;img src="http://geekswithblogs.net/RobBowman/aggbug/133361.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/RobBowman/comments/133361.aspx</wfw:comment>
        <slash:comments>10</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/RobBowman/comments/commentRss/133361.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/RobBowman/services/trackbacks/133361.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Slow File Receive</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/RobBowman/archive/2009/06/02/slow-file-receive.aspx" />
        <id>http://geekswithblogs.net/RobBowman/archive/2009/06/02/slow-file-receive.aspx</id>
        <published>2009-06-02T18:08:28-05:00:00</published>
        <updated>2010-04-01T10:41:51Z</updated>
        <content type="html">&lt;p&gt; &lt;/p&gt;
&lt;p style="margin: 0in; font-family: Calibri; font-size: 11pt"&gt;I encountered a problem a few days ago with files not being picked from a receive location. The configuration was very simple, a two node group with a file receive location pointing at a share on a windows 2003 server in a different domain. The volume of files being dropped for collection by BizTalk wasn't high - about ten per minute. The behaviour was; files collected very slowly - say one file every five minutes. If I re-started the host instance then all the remaining files would be collected very quickly but ten minutes later it would be back to slow mode.&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Calibri; font-size: 11pt"&gt; &lt;/p&gt;
&lt;p style="margin: 0in; font-family: Calibri; font-size: 11pt"&gt;After digging around the blogs, it occurred to me that the problem may be due to BizTalk throttling the receive host. One very helpful blog I used to determine this is at &lt;a href="http://blogs.msdn.com/biztalkcpr/default.aspx"&gt;http://blogs.msdn.com/biztalkcpr/default.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Calibri; font-size: 11pt"&gt; &lt;/p&gt;
&lt;p style="margin: 0in; font-family: Calibri; font-size: 11pt"&gt;It is quite simple to identify if throttling is being applied. Run perfmon on the BizTalk box and add counters for "BizTalk:Message Agent - Message publishing throttling state" (publish to msgbox) and "Message delivery throttling state" (delivery to endpoint) . Ensure that you select the host instance hosting your receive port.&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Calibri; font-size: 11pt"&gt; &lt;/p&gt;
&lt;p style="margin: 0in; font-family: Calibri; font-size: 11pt"&gt;The following tables describe what throttling, if any is active:&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Calibri; font-size: 11pt"&gt; &lt;/p&gt;
&lt;p style="margin: 0in; font-family: Calibri; font-size: 11pt; font-weight: bold"&gt;Message delivery throttling state&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Calibri; font-size: 11pt"&gt;A flag indicating whether the system is throttling message delivery (affecting XLANG message processing and outbound transports).&lt;/p&gt;
&lt;ul type="disc" style="margin-top: 0in; unicode-bidi: embed; direction: ltr; margin-bottom: 0in; margin-left: 0.75in"&gt;
    &lt;li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle"&gt;&lt;span style="font-family: Calibri; font-size: 11pt"&gt;0: Not throttling &lt;/span&gt;&lt;/li&gt;
    &lt;li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle"&gt;&lt;span style="font-family: Calibri; font-size: 11pt"&gt;1: Throttling due to imbalanced message delivery rate (input rate exceeds output rate) &lt;/span&gt;&lt;/li&gt;
    &lt;li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle"&gt;&lt;span style="font-family: Calibri; font-size: 11pt"&gt;3: Throttling due to high in-process message count &lt;/span&gt;&lt;/li&gt;
    &lt;li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle"&gt;&lt;span style="font-family: Calibri; font-size: 11pt"&gt;4: Throttling due to process memory pressure &lt;/span&gt;&lt;/li&gt;
    &lt;li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle"&gt;&lt;span style="font-family: Calibri; font-size: 11pt"&gt;5: Throttling due to system memory pressure &lt;/span&gt;&lt;/li&gt;
    &lt;li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle"&gt;&lt;span style="font-family: Calibri; font-size: 11pt"&gt;9: Throttling due to high thread count &lt;/span&gt;&lt;/li&gt;
    &lt;li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle"&gt;&lt;span style="font-family: Calibri; font-size: 11pt"&gt;10: Throttling due to user override on delivery &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="margin: 0in; font-family: Calibri; font-size: 11pt; font-weight: bold"&gt;Message publishing throttling state&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Calibri; font-size: 11pt"&gt;A flag indicating whether the system is throttling message publishing (affecting XLANG message processing and inbound transports).&lt;/p&gt;
&lt;ul type="disc" style="margin-top: 0in; unicode-bidi: embed; direction: ltr; margin-bottom: 0in; margin-left: 0.75in"&gt;
    &lt;li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle"&gt;&lt;span style="font-family: Calibri; font-size: 11pt"&gt;0: Not throttling &lt;/span&gt;&lt;/li&gt;
    &lt;li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle"&gt;&lt;span style="font-family: Calibri; font-size: 11pt"&gt;2: Throttling due to imbalanced message publishing rate (input rate exceeds output rate) &lt;/span&gt;&lt;/li&gt;
    &lt;li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle"&gt;&lt;span style="font-family: Calibri; font-size: 11pt"&gt;4: Throttling due to process memory pressure &lt;/span&gt;&lt;/li&gt;
    &lt;li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle"&gt;&lt;span style="font-family: Calibri; font-size: 11pt"&gt;5: Throttling due to system memory pressure &lt;/span&gt;&lt;/li&gt;
    &lt;li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle"&gt;&lt;span style="font-family: Calibri; font-size: 11pt"&gt;6: Throttling due to database growth &lt;/span&gt;&lt;/li&gt;
    &lt;li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle"&gt;&lt;span style="font-family: Calibri; font-size: 11pt"&gt;8: Throttling due to high session count &lt;/span&gt;&lt;/li&gt;
    &lt;li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle"&gt;&lt;span style="font-family: Calibri; font-size: 11pt"&gt;9: Throttling due to high thread count &lt;/span&gt;&lt;/li&gt;
    &lt;li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle"&gt;&lt;span style="font-family: Calibri; font-size: 11pt"&gt;11: Throttling due to user override on publishing&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="margin: 0in; font-family: Calibri; font-size: 11pt"&gt; &lt;/p&gt;
&lt;p style="margin: 0in; font-family: Calibri; font-size: 11pt"&gt;After configuring perfmon I could see that I had a counter value of 6 for the publish state - the receive host was being throttled due to database growth. I needed to take a look at the MsgBox!&lt;/p&gt;
&lt;p style="margin: 0in; font-family: Calibri; font-size: 11pt"&gt; &lt;/p&gt;
&lt;p style="margin: 0in; font-family: Calibri; font-size: 11pt"&gt;After posting the question on StackOverflow it was suggested that I run the MsgBox viewer application against the BizTalk db (thanks Chris). This is a great tool, it can be downloaded at&lt;/p&gt;
&lt;p style="margin: 0in"&gt;&lt;a href="http://blogs.technet.com/jpierauc/pages/msgboxviewer.aspx"&gt;&lt;span style="font-family: calibri; font-size: 10pt"&gt;http://blogs.technet.com/jpierauc/pages/msgboxviewer.aspx&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: calibri; font-size: 10pt"&gt;.&lt;/span&gt;&lt;span style="font-family: calibri; font-size: 11pt"&gt; After running the MsgBox viewer I was presented with a report which re-enforced the case that the BizTalk was running low on DB space.&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0in; font-family: calibri; font-size: 10pt"&gt; &lt;/p&gt;
&lt;p style="margin: 0in; font-family: calibri; font-size: 11pt"&gt;On checking the MsgBox db through SQL workbench I could see that it was just over 4gb in size and had 0 mb available! The db was set to autogrow and the disk hosting the db had plenty available space to grow. The problem was the rate at which the db would grow. This can be checked by right-clicking the db from the SQLWB object explorer selecting properties \ files. Both the data and log was set to grow by 1mb. This value is set based on the value of the model database at the time that the BizTalk databases are created. One to remember for the future - ensure the growth is set to a more reasonable chunk -10% would be good.&lt;/p&gt;
&lt;p style="margin: 0in; font-family: calibri; font-size: 11pt"&gt; &lt;/p&gt;
&lt;p style="margin: 0in"&gt;&lt;span style="font-family: Calibri; font-size: 11pt"&gt;&lt;a href="http://www.biztalkers.co.uk/"&gt;www.biztalkers.co.uk&lt;/a&gt; &lt;/span&gt;&lt;/p&gt;&lt;img src="http://geekswithblogs.net/RobBowman/aggbug/132569.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/RobBowman/comments/132569.aspx</wfw:comment>
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/RobBowman/comments/commentRss/132569.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/RobBowman/services/trackbacks/132569.aspx</trackback:ping>
    </entry>
    <entry>
        <title>BizTalk Assembly Viewer</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/RobBowman/archive/2009/05/19/biztalk-assembly-viewer.aspx" />
        <id>http://geekswithblogs.net/RobBowman/archive/2009/05/19/biztalk-assembly-viewer.aspx</id>
        <published>2009-05-19T12:22:44-05:00:00</published>
        <updated>2010-04-01T10:42:21Z</updated>
        <content type="html">&lt;p&gt; &lt;/p&gt;
&lt;p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt;I'm currently preparing to deliver Microsoft Course 2934A - Deploying and Managing Business Process and Integration Solutions Using Microsoft BizTalk Server 2006. &lt;/p&gt;
&lt;p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt;So far, I've been impressed with the content, it's well structured and I think the topic selection has been good.  &lt;/p&gt;
&lt;p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt;One benefit of delivering a course is that you're bound to run through every lab before-hand, there's&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;nothing worse that the trainer getting stuck on a lab! This is turn encourages reading on&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;a topic that you may otherwise skip, thinking that you already know about it or that's it's not relevant to your day job. I ran through such a lab today and learned of a feature of BizTalk that I'm sure will use in future. The feature is the BizTalk Assembly Viewer, here's the instructions for setup:&lt;/p&gt;
&lt;ul type="disc" style="margin-top: 0in; unicode-bidi: embed; direction: ltr; margin-bottom: 0in; margin-left: 0.375in"&gt;
    &lt;ul&gt;
        &lt;li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle"&gt;&lt;span style="font-family: Calibri; font-size: 11pt"&gt;Open a command prompt window, navigate to &lt;/span&gt;&lt;span style="font-style: italic; font-family: Calibri; font-size: 11pt"&gt;BizTalk Server Install Director\&lt;/span&gt;&lt;span style="font-family: Calibri; font-size: 11pt"&gt;Developer Tools\&lt;/span&gt;&lt;/li&gt;
        &lt;li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle"&gt;&lt;span style="font-family: Calibri; font-size: 11pt"&gt;Run regsvr32 BtsAsmExt.dll&lt;/span&gt;&lt;/li&gt;
    &lt;/ul&gt;
&lt;/ul&gt;
&lt;p style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle"&gt;  &lt;/p&gt;
&lt;p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt;After registering the dll, load windows explorer and double-click my computer. In the &lt;span style="font-style: italic"&gt;Other&lt;/span&gt; section, you'll see system folder called 'BizTalk Server Assemblies'. Open this up and you'll see all of the BizTalk assemblies which have been deployed to the local GAC. From here, you're able to drill into each assembly to display an entry for each artefact that it conatins. At the next level down you can double click the artefact to view the XML behind each schema, map or orchestration - nice!&lt;/p&gt;
&lt;p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt"&gt; &lt;/p&gt;
&lt;p style="margin: 0in"&gt;&lt;span style="font-family: Calibri; font-size: 11pt"&gt;&lt;a href="http://www.biztalkers.co.uk/"&gt;www.biztalkers.co.uk&lt;/a&gt; &lt;/span&gt;&lt;/p&gt;&lt;img src="http://geekswithblogs.net/RobBowman/aggbug/132261.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/RobBowman/comments/132261.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/RobBowman/comments/commentRss/132261.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/RobBowman/services/trackbacks/132261.aspx</trackback:ping>
    </entry>
    <entry>
        <title>More Haste Less Speed - BizTalk Builds</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/RobBowman/archive/2009/04/29/more-haste-less-speed---biztalk-builds.aspx" />
        <id>http://geekswithblogs.net/RobBowman/archive/2009/04/29/more-haste-less-speed---biztalk-builds.aspx</id>
        <published>2009-04-29T20:23:47-05:00:00</published>
        <updated>2010-04-01T10:42:38Z</updated>
        <content type="html">&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt"&gt;I know it's never a good idea to try and "rush" a build but I did just that the other day and fell victim to unexpected behaviour on the part of the BizTalk admin console. A critical defect had been found in a BizTalk map and a new release had to be deployed ASAP. Ordinarily all of our BizTalk builds are run through a script - nothing fancy (yet!), just using batch files and BTSTask. However, because I only needed to deploy one of the BizTalk apps in a single MSI I chose to right-click and select ExportMSI from the BizTalk admin console, rather than wait for the scripts to run or edit them so that only the required app would be built. All looked fine; the MSI was exported, including the binding files that had been added previously using AddResource. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt"&gt;The problem came when I tried to import the MSI onto the test server. An error message was displayed complaining that a particular send port was attempting to use a host that didn't exist. My first reaction was to rush back to my dev machine and check the binding file for the particular environment I had selected when importing the MSI. However, this looked fine, the send port in question should not be attempting to use the host that the error message was complaining about – or so I thought!&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt"&gt;After talking my colleague (thanks again Brad) through the process I saw a light bulb flash over his head. Thankfully he'd seen the same problem previously. The issue was caused by the fact that the send port had been manually created on the dev box within the admin console. This existed in addition to the setting for the port contained within the binding file of the application resources. So, it seems that on attempting the Import, BizTalk was first trying to apply settings for the send port that were pulled directly from the application on the build machine, despite the fact that the same send port was defined in the binding file resource. On reflection, I would say that this is to be expected. Taught me a valuable lesson, always use scripts to build you MSIs - humans make mistakes! &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'Arial','sans-serif'; font-size: 9pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;
&lt;/p&gt;&lt;p style="margin: 0in"&gt;&lt;span style="font-family: Calibri; font-size: 11pt"&gt;&lt;a href="http://www.biztalkers.co.uk/"&gt;www.biztalkers.co.uk&lt;/a&gt; &lt;/span&gt;&lt;/p&gt;
&lt;img src="http://geekswithblogs.net/RobBowman/aggbug/131583.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/RobBowman/comments/131583.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/RobBowman/comments/commentRss/131583.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/RobBowman/services/trackbacks/131583.aspx</trackback:ping>
    </entry>
    <entry>
        <title>BTSTask - Import Bindings</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/RobBowman/archive/2009/02/17/btstask---import-bindings.aspx" />
        <id>http://geekswithblogs.net/RobBowman/archive/2009/02/17/btstask---import-bindings.aspx</id>
        <published>2009-02-17T20:18:36-06:00:00</published>
        <updated>2010-04-01T10:42:57Z</updated>
        <content type="html">&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I have a simple batch file that executes BTSTask ImportBindings on a previously exported binding file. There don't seem to be any errors thrown. The send / receive ports and orchestrations are created ok. The problem is that the orchestrations are not bound and the hosts are not set.&lt;/p&gt;
&lt;p&gt;When importing the same binding file through BizTalk Admin Console it goes in no problem.&lt;/p&gt;
&lt;p&gt;My colleague (thanks Brad) found the answer to this - it relates to the &amp;lt;Filter&amp;gt; node in the binding file. I think the problem was caused by opening the binding file from XML Spy at some point, then hitting the "Pretty Print" button. This has inserted spaces within the filter node which BizTalk seems to be unhappy with. More details can be seen on the StackOverflow thread: &lt;font color="#0000ff" face="Arial"&gt;&lt;u&gt;http://stackoverflow.com/questions/483116/btstask-importbindings&lt;/u&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" face="Arial"&gt;&lt;u&gt;
&lt;p style="margin: 0in"&gt;&lt;span style="font-family: Calibri; font-size: 11pt"&gt;&lt;a href="http://www.biztalkers.co.uk/"&gt;www.biztalkers.co.uk&lt;/a&gt; &lt;/span&gt;&lt;/p&gt;
&lt;/u&gt;&lt;/font&gt;&lt;/p&gt;&lt;img src="http://geekswithblogs.net/RobBowman/aggbug/129470.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/RobBowman/comments/129470.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/RobBowman/comments/commentRss/129470.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/RobBowman/services/trackbacks/129470.aspx</trackback:ping>
    </entry>
    <entry>
        <title>BizTalk Orchestration Opens in Plain Text</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/RobBowman/archive/2008/12/29/biztalk-orchestration-opens-in-plain-text.aspx" />
        <id>http://geekswithblogs.net/RobBowman/archive/2008/12/29/biztalk-orchestration-opens-in-plain-text.aspx</id>
        <published>2008-12-29T17:48:47-06:00:00</published>
        <updated>2010-04-01T10:43:19Z</updated>
        <content type="html">&lt;p&gt;Had a strange problem this morning. I'd installed a BizTalk hotfix for the BizTalk Map TFS issue. All seemed to be ok until I tried opening an orchestration - VS displayed the plain text rather than the orchestration designer. When I right-clicked the odx file and selected 'open with', there was no option to select 'BizTalk Orchestration Designer'.&lt;/p&gt;
&lt;p&gt;To fix the problem I ran a repair from the BizTalk installation DVD.&lt;/p&gt;
&lt;p style="margin: 0in"&gt;&lt;span style="font-family: Calibri; font-size: 11pt"&gt;&lt;a href="http://www.biztalkers.co.uk/"&gt;www.biztalkers.co.uk&lt;/a&gt; &lt;/span&gt;&lt;/p&gt;&lt;img src="http://geekswithblogs.net/RobBowman/aggbug/128220.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/RobBowman/comments/128220.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/RobBowman/comments/commentRss/128220.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/RobBowman/services/trackbacks/128220.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Password in SOAP Ports</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/RobBowman/archive/2008/11/28/password-in-soap-ports.aspx" />
        <id>http://geekswithblogs.net/RobBowman/archive/2008/11/28/password-in-soap-ports.aspx</id>
        <published>2008-11-28T14:31:01-06:00:00</published>
        <updated>2010-04-01T10:43:37Z</updated>
        <content type="html">&lt;p&gt;I've inherited a BizTalk 2006 applicaton that uses serveral SOAP ports to request data from a 3rd party web service. The web service is secured by "basic" authentication - username / password. After making a few enhancements to the application I deployed to an integration test server which has access to the 3rd party web service. The BizTalk app was unable to retrieve the data and I soon realised that I had forgotten to set the username / password on the SOAP send ports. I wanted the make deployment of the BizTalk app as automated as possible because I may not be present when it is deployed to the live server. I opened up the binding file, located the 1st of the problem SOAP send ports and looked for the *** that BizTalk uses to replace the password - except that it doesn't! It seems that the password for SOAP ports is set to NULL rather than ***, see here for more details:&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;a target="_blank" href="https://mvi.ocset.net/exchweb/bin/redir.asp?URL=http://msdn.microsoft.com/en-us/library/aa547319.aspx"&gt;http://msdn.microsoft.com/en-us/library/aa547319.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;I proceeded to update the binding but when I came to test, after importing my amended binding file, I found that I had the same problem as before. I've double checked and can confim that the correct password is now present in the binding file but, although BizTalk doesn't complain during the import, when I run the app I get the following exception:&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;font face="Arial"&gt;&lt;em&gt;Details:"ArgumentNullException: String reference not set to an instance of a String.&lt;br /&gt;
Parameter name: s&lt;br /&gt;
 ".&lt;/em&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;If I then manually amend the password through the BizTalk admin console everything worked fine.&lt;/p&gt;
&lt;p class="MsoNormal"&gt;By this point, my binding file looked something like the following:&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;code jquery1228491151133="22"&gt;&lt;span class="pun"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag"&gt;TransportTypeData&lt;/span&gt;&lt;span class="pun"&gt;&amp;gt;&lt;/span&gt;&lt;span class="pln"&gt;&lt;br /&gt;
&amp;amp;lt;CustomProps&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;AuthenticationScheme vt="8"&amp;amp;gt;Basic&amp;amp;lt;/AuthenticationScheme&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;AssemblyName vt="8"&amp;amp;gt;WebService.ProxyClass, Version=1.0.0.0, &lt;br /&gt;
Culture=neutral, PublicKeyToken=xyz&amp;amp;lt;/AssemblyName&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;Username vt="8"&amp;amp;gt;soapUser&amp;amp;lt;/Username&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;UseProxy vt="11"&amp;amp;gt;0&amp;amp;lt;/UseProxy&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;UseSoap12 vt="11"&amp;amp;gt;0&amp;amp;lt;/UseSoap12&amp;amp;gt;&amp;amp;lt;UsingOrchestration vt="11"&amp;amp;gt;0&amp;amp;lt;/UsingOrchestration&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;UseSSO vt="11"&amp;amp;gt;0&amp;amp;lt;/UseSSO&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;Password vt="1"&amp;amp;gt;MYPASSWORD&amp;amp;lt;/Password&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;ProxyPort vt="3"&amp;amp;gt;80&amp;amp;lt;/ProxyPort&amp;amp;gt;&amp;amp;lt;AssemblyPath&lt;br /&gt;
vt="8"&amp;amp;gt;C:\ProxyClass\bin\Debug\ProxyClass.dll&amp;amp;lt;/AssemblyPath&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;TypeName vt="8"&amp;amp;gt;ProxyClass.Webservice.servicesService&amp;amp;lt;/TypeName&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;MethodName vt="8"&amp;amp;gt;PickupRequest&amp;amp;lt;/MethodName&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;UseHandlerSetting vt="11"&amp;amp;gt;-1&amp;amp;lt;/UseHandlerSetting&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;/CustomProps&amp;amp;gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class="pun"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag"&gt;TransportTypeData&lt;/span&gt;&lt;span class="pun"&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;After posting a question onto &lt;a href="http://www.stackoverflow.com"&gt;www.stackoverflow.com&lt;/a&gt; I thankfully received the answer from Chris Loris - thanks Chris. You see the vt attribute on the Password node? It turns out that vt=1 equates to NULL therefore BizTalk doesn't bother reading the value given for password. I changed the attribute to vt=8 and all worked fine!&lt;/p&gt;
&lt;p class="MsoNormal"&gt;ps at vt value of 8 equates to a BSTR&lt;/p&gt;
&lt;p style="margin: 0in"&gt;&lt;span style="font-family: Calibri; font-size: 11pt"&gt;&lt;a href="http://www.biztalkers.co.uk/"&gt;www.biztalkers.co.uk&lt;/a&gt; &lt;/span&gt;&lt;/p&gt;&lt;img src="http://geekswithblogs.net/RobBowman/aggbug/127434.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/RobBowman/comments/127434.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/RobBowman/comments/commentRss/127434.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/RobBowman/services/trackbacks/127434.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Parameters lost in SOAP Request</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/RobBowman/archive/2008/11/21/parameters-lost-in-soap-request.aspx" />
        <id>http://geekswithblogs.net/RobBowman/archive/2008/11/21/parameters-lost-in-soap-request.aspx</id>
        <published>2008-11-21T12:26:06-06:00:00</published>
        <updated>2010-04-01T10:43:52Z</updated>
        <content type="html">&lt;p&gt;I started testing a BizTalk application today which calls a 3rd party service, passing a couple of datetime parameters, to retrieve a dataset which is then persisted to a SQL Server database. This application had been running well in production for a while but enhancements were required to make use of web methods recently made available by the 3rd party. After making the changes I tested the BTS application on my dev box, calling a stubbed web service installed locally. I then deployed the BizTalk app to an integration test environment that has connectivity to the 3rd party web service. On running the application I started to receive exceptions such as the following:&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;SoapException: Server was unable to process request. ---&amp;gt; SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.&lt;br /&gt;
 &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;It seems that for some reason the send port was removing / nulling the web method parameters comprising datetimes. After a fair amount of work to try an resolve, a colleague suggested I delete the SOAP send port, re-create and re-bind to the parent orchestration. This worked a treat - thanks Fabio :)&lt;/p&gt;
&lt;p&gt;Not knowing why re-creating the send ports fixed the problem was keeping me awake at night. To find out what was going on, I exported the bindings from pre-fix and post-fix applications and ran a file compare. I could see that the only difference was in the element &amp;lt;PrimaryTransport&amp;gt;&amp;lt;TransportTypeData&amp;gt;&amp;lt;TypeName&amp;gt;. I then went back to the configuration page of the SOAP send port. On clicking the "web service" tab the problem became apparent. There's a "Type name: list box with two options; one to use the web reference for the live site and one for the test test stub site. The problem was caused by the fact that, on my integration test server, although I was calling the real 3rd party web service, the "type name" was still set to use the test web reference type. I guess this is an easy mistake to make; you set the target address on the "general" tab of the SOAP port configuration dialog box, whereas the web reference that the port will use for sending data to that address is located on the "web service" tab.&lt;/p&gt;
&lt;p style="margin: 0in"&gt;&lt;span style="font-family: Calibri; font-size: 11pt"&gt;&lt;a href="http://www.biztalkers.co.uk/"&gt;www.biztalkers.co.uk&lt;/a&gt; &lt;/span&gt;&lt;/p&gt;&lt;img src="http://geekswithblogs.net/RobBowman/aggbug/127271.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/RobBowman/comments/127271.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/RobBowman/comments/commentRss/127271.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/RobBowman/services/trackbacks/127271.aspx</trackback:ping>
    </entry>
</feed>
