<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>BizTalk Musings</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/biztalkmusings/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/biztalkmusings/feed.xml</link>
    <description>A blog to record Microsoft BizTalk related topics.</description>
    <lastBuildDate>Tue, 16 Apr 2019 04:47:08 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Collecting EventLogs with Powershell</title>
      <link>https://docs.microsoft.com/archive/blogs/biztalkmusings/collecting-eventlogs-with-powershell</link>
      <pubDate>Tue, 04 Dec 2012 00:29:00 GMT</pubDate>
      <dc:creator><![CDATA[Norman Gillis]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/biztalkmusings/2012/12/04/collecting-eventlogs-with-powershell/</guid>
      <description><![CDATA[Hi all,
&nbsp;
I often have to go onsite and go through a customers' eventlogs looking for errors....]]></description>
      <content:encoded><![CDATA[<p>Hi all,</p>
<p>&nbsp;</p>
<p>I often have to go onsite and go through a customers' eventlogs looking for errors. While the eventvwr does provide for nice filtering it doesn't allow me to sort. I like to use Excel for sorting and making a nice table format. In order to do this however I need to be able to format the eventlogs output in a nice delimited format. Powershell provides the ability (ConvertTo-CSV &amp; Export_CSV)&nbsp;to pipe data out to a&nbsp;CSV file however it 'keeps' the carriage returns and line feeds so that ultimately my delimited csv is a mess when I import it into Excel.</p>
<p>I created the following Powershell script to help me collect&nbsp;<em>x</em> <em>number of days</em> worth of data and have it exported nicely to delimited format.</p>
<p>&nbsp;</p>
<p>&lt;#</p>
<p>Required data</p>
<p>$logPath : which folder to write the collected data to, may also be in the format "\\fileshare"</p>
<p>$computers : semi-colon delimited list of computers to retreive logs for</p>
<p>$days : how many days worth of logs to collect</p>
<p>#&gt;</p>
<p>$logPath = "C:\Temp" # "\\fileshare" <br />$log = "Application;System" <br />$computers = "CNTSQL" <br />$days = 5 <br /> <br />$date = get-date -format M.d.yyyy <br />$now = get-date <br />$subtractDays = New-Object System.TimeSpan $days,0,0,0,0 <br />$then = $Now.Subtract($subtractDays) <br /># Error,Information,FailureAudit,SuccessAudit,Warning <br />[string] $logName = "" <br />[string] $eventID = "" <br />[string] $MachineName = "" <br />[string] $entryTime = "" <br />[string] $message = "" <br />[string] $source = "" <br />[string] $timeGenerated = "" <br />[string] $fullentry = "" <br /> <br />Function ExecutePerComputer <br />{ param ([string] $computers) <br /> # a list of servers for the eventlog collection in semi-colon delimited list <br /> #$compArray <br /> $compArray = $computers.Split(";") <br /> [string] $c = "" <br /> foreach ($c in $compArray) <br /> { <br /> # call GetLog with the servername and the logs to get <br /> Write-Host $c <br /> GetLog $c $log <br /> } <br />} <br />Function GetLog <br />{ param ([string] $server, [string] $logs) <br /> # a list of the logs to return <br /> #$logArray <br /> $logArray = $logs.Split(";") <br /> [string] $l = "" <br /> foreach ($l in $logArray) <br /> { <br /> $systemErrors = Get-EventLog -Computername $server -LogName $l -After $then -Before $now -EntryType Error | select LogName,EventID,MachineName,EntryType,Message,Source,TimeGenerated <br /> #Write-Host $l <br /> foreach ($obj in $systemErrors) <br /> { <br /> $logName = $l <br /> $eventID = $obj.EventID.ToString() <br /> $MachineName = $obj.MachineName <br /> $entryTime = $obj.EntryType <br /> $message = $obj.Message.Replace("`r`n", ",").Replace("`n", ",").Replace("`r", ",") <br /> $source = $obj.Source <br /> $timeGenerated = $obj.TimeGenerated.ToString() <br /> <br /> $fullentry = $logName + ";" + $eventID + ";" + $MachineName + ";" + $entryTime + ";" + $message + ";" + $source + ";" + $timeGenerated <br /> <br /> WriteToCSV "$logPath\$computers-$log-$date.csv" $fullentry <br /> } <br /> } <br />} <br />Function WriteToCSV <br />{ param ([string] $filePath, [string] $content) <br /> <br /> $content | Out-File -FilePath $filePath -Append <br />} <br /> <br />$File = "LogName;EventID;MachineName;EntryType;Message;Source;TimeGenerated" <br />WriteToCSV "$logPath\$computers-$log-$date.csv" $File <br />ExecutePerComputer $computers</p>
<p>&nbsp;</p>
<p>&nbsp;Excelsior!</p>
<p>Norman</p>]]></content:encoded>
    </item>
    <item>
      <title>Powershell &amp; Extended Events</title>
      <link>https://docs.microsoft.com/archive/blogs/biztalkmusings/powershell-extended-events</link>
      <pubDate>Wed, 21 Nov 2012 02:58:34 GMT</pubDate>
      <dc:creator><![CDATA[Norman Gillis]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/biztalkmusings/2012/11/21/powershell-extended-events/</guid>
      <description><![CDATA[I have been doing a lot of work with SQL Server lately. Over on www.sqlskills.com Jonathan Kehayias...]]></description>
      <content:encoded><![CDATA[<p>I have been doing a lot of work with SQL Server lately. Over on <a href="https://www.sqlskills.com">www.sqlskills.com</a> Jonathan Kehayias has written a series of very good blog posts regarding working with Extended Events. I could not however find very much information around Powershell and Extended Events. After some searching on MSDN and TechNet I was able to piece together how to make a stand alone script to create an extended event session. This link was invaluable: <a href="https://technet.microsoft.com/en-us/library/ff877887.aspx">https://technet.microsoft.com/en-us/library/ff877887.aspx</a></p>
<p>&nbsp;</p>
<p>#$Instance = "SQLALL\NOGISQL2012" <br />$InstServiceName = "NOGISQL2012" <br />#$NodeName = "SQLALL"</p>
<p>Function CreateXEventSession()<br />{<br />&nbsp;&nbsp;&nbsp; # PATH&nbsp; SQLSERVER:\XEvent\SQLALL\NOGISQL2012<br />&nbsp;&nbsp;&nbsp; <br />&nbsp;&nbsp;&nbsp; Set-Location SQLSERVER:\XEvent<br />&nbsp;&nbsp;&nbsp; $h = hostname<br />&nbsp;&nbsp;&nbsp; cd $h<br />&nbsp;&nbsp;&nbsp; $store = dir | where {$_.DisplayName -ieq $InstServiceName}<br />&nbsp;&nbsp;&nbsp; $session = new-object Microsoft.SqlServer.Management.XEvent.Session -argumentlist $store, "TestSession"<br />&nbsp;&nbsp;&nbsp; $event = $session.AddEvent("sqlserver.sql_statement_completed")<br />&nbsp;&nbsp;&nbsp; $event.AddAction("sqlserver.sql_text")<br />&nbsp;&nbsp;&nbsp; $session.AddTarget("package0.ring_buffer")<br />&nbsp;&nbsp;&nbsp; $session.Create()<br />}</p>
<p>write-host "--&lt;&gt;------&nbsp; start&nbsp; ------&lt;&gt;--" <br />Import-Module -Name SQLPS <br />CreateXEventSession <br />write-host "--&lt;&gt;------&nbsp; end&nbsp; ------&lt;&gt;--" <br /># todo --&gt; start the session</p>
<p>&nbsp;</p>
<p>good luck and have fun,</p>
<p>Norman</p>]]></content:encoded>
    </item>
    <item>
      <title>Windows 7 search returns nothing (again)</title>
      <link>https://docs.microsoft.com/archive/blogs/biztalkmusings/windows-7-search-returns-nothing-again</link>
      <pubDate>Tue, 22 Nov 2011 01:01:29 GMT</pubDate>
      <dc:creator><![CDATA[Norman Gillis]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/biztalkmusings/2011/11/22/windows-7-search-returns-nothing-again/</guid>
      <description><![CDATA[I have been stumped by this a few times and it drives me crazy. The new windows OS's are supposed to...]]></description>
      <content:encoded><![CDATA[<p>I have been stumped by this a few times and it drives me crazy. The new windows OS's are supposed to have the speediest search capability so far and yet when I search for files that I know exist, they cannot be found.</p>
<p>The other day I was trying to clean up my harddrive and I wanted to find all the files with extension BLG. Once found I wanted to delete them all. The search tool could find no files of that type at all. I was using the *.blg wildcard.</p>
<p>Solution:</p>
<ol>
<li>select the folder in the windows explorer</li>
<li>hit the ALT key which should bring up the TOOLS menu</li>
<li>select Tools &gt; Folder Options</li>
<li>a pop-up window appears with 3 tabs</li>
<li>select the SEARCH tab</li>
<li>selec the option "Always search file names and contents (this might take several minutes)</li>
</ol>
<p>Your searches will now be slower but yes you will be able to find what your are looking for. I can't quite figure out what the point of having a search solution that is fast but can't anything!</p>
<p>&nbsp;</p>
<p>gr,</p>
<p>Norman</p>]]></content:encoded>
    </item>
    <item>
      <title>Windows Azure - DSInit fails - solution</title>
      <link>https://docs.microsoft.com/archive/blogs/biztalkmusings/windows-azure-dsinit-fails-solution</link>
      <pubDate>Wed, 09 Nov 2011 02:03:41 GMT</pubDate>
      <dc:creator><![CDATA[Norman Gillis]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/biztalkmusings/2011/11/09/windows-azure-dsinit-fails-solution/</guid>
      <description><![CDATA[Hi all,
I hit an interesting undocumented hidden feature when using DSInit to set up the storage...]]></description>
      <content:encoded><![CDATA[<p>Hi all,</p>
<p>I hit an interesting undocumented hidden feature when using DSInit to set up the storage emulator database for my VS2010 projects.The documentation assumes that you have installed SQLExpress and indeed if you have the setup of the emulator will work fine. What however if you have your own SQL Server instance running? What if that instance is a named instance and not a default instance?&nbsp; As I found the creation will fail.</p>
<p>The command line that should work is: &gt; DSInit /sqlinstance:myinstance /user:domain\user /forcecreate</p>
<p>when: myinstance is in the format of &lt;server&gt;\&lt;instance&gt; the creation will fail.</p>
<p>the solution is to use only the &lt;instance&gt; name thus instead of <strong>&gt; DSInit /sqlinstance:&lt;server&gt;\&lt;instance&gt;&nbsp;&nbsp;&nbsp;&nbsp;</strong> USE&nbsp;&nbsp;&nbsp;&nbsp;<strong> &gt; DSInit /sqlinstance:&lt;instance&gt; </strong></p>
<p>Don't forget to run the command prompt as administrator and you can use <strong>/user:domain\user /forcecreate</strong>&nbsp;as required.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Tutorial: Creating a Windows Azure Hello World Application Using ASP.NET MVC 3: <a href="https://www.microsoft.com/windowsazure/learn/tutorials/getting-started-web-tutorial/">https://www.microsoft.com/windowsazure/learn/tutorials/getting-started-web-tutorial/</a></p>
<p>Tutorial: Deploying a Windows Azure Sample Application: <a href="https://www.microsoft.com/windowsazure/learn/tutorials/deploy-tutorial/">https://www.microsoft.com/windowsazure/learn/tutorials/deploy-tutorial/</a></p>]]></content:encoded>
    </item>
    <item>
      <title>What startup stored procedures are we running?</title>
      <link>https://docs.microsoft.com/archive/blogs/biztalkmusings/what-startup-stored-procedures-are-we-running</link>
      <pubDate>Sun, 17 Jul 2011 12:34:00 GMT</pubDate>
      <dc:creator><![CDATA[Norman Gillis]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/biztalkmusings/2011/07/17/what-startup-stored-procedures-are-we-running/</guid>
      <description><![CDATA[For some environments certain actions must be taken when SQL Server starts up. For some customers...]]></description>
      <content:encoded><![CDATA[<p>For some environments certain actions must be taken when SQL Server starts up. For some customers temporary tables or other types of transient objects&nbsp;must be present in the Tempdb. Developers or DBAs will then create "start up stored procedures" to ensure that when SQL Server starts up these procedures will execute.</p>
<p>What happens if the original developers/DBAs leave and there is no documentation? How can we find out which objects are being executed at startup?&nbsp;I recently had this question so I thought I would post the answer here as it is interesting.</p>
<p>&nbsp;</p>
<p><span style="font-family: arial,helvetica,sans-serif; font-size: small;">SELECT <span style="color: #ff00ff;"><span style="color: #ff00ff;">ObjectProperty</span></span><span style="color: #808080;"><span style="color: #808080;">(</span></span><span style="color: #ff00ff;"><span style="color: #ff00ff;">object_id</span></span><span style="color: #808080;"><span style="color: #808080;">,</span></span><span style="color: #ff0000;"><span style="color: #ff0000;">'ExecIsStartup'</span></span><span style="color: #808080;"><span style="color: #808080;">),*</span></span></span></p>
<p><span style="font-family: arial,helvetica,sans-serif; font-size: small;"><span style="color: #0000ff;"><span style="color: #0000ff;">FROM </span></span><span style="color: #008000;"><span style="color: #008000;">sys</span></span><span style="color: #808080;"><span style="color: #808080;">.</span></span><span style="color: #008000;"><span style="color: #008000;">objects</span></span></span></p>
<p><span style="font-family: arial,helvetica,sans-serif; font-size: small;"><span style="color: #0000ff;"><span style="color: #0000ff;">WHERE</span></span><span>&nbsp;</span><span style="color: #0000ff;"><span style="color: #0000ff;">TYPE</span></span><span>&nbsp;</span><span style="color: #808080;"><span style="color: #808080;">IN</span></span><span style="color: #808080;"><span style="color: #808080;">(</span></span><span style="color: #ff0000;"><span style="color: #ff0000;">'X'</span></span><span style="color: #808080;"><span style="color: #808080;">,</span></span><span style="color: #ff0000;"><span style="color: #ff0000;">'P'</span></span><span style="color: #808080;"><span style="color: #808080;">,</span></span><span style="color: #ff0000;"><span style="color: #ff0000;">'PC'</span></span><span style="color: #808080;"><span style="color: #808080;">)</span></span></span></p>
<p><span style="font-family: arial,helvetica,sans-serif; font-size: small;">AND <span style="color: #ff00ff;"><span style="color: #ff00ff;">ObjectProperty</span></span><span style="color: #808080;"><span style="color: #808080;">(</span></span><span style="color: #ff00ff;"><span style="color: #ff00ff;">object_id</span></span><span style="color: #808080;"><span style="color: #808080;">,</span></span><span style="color: #ff0000;"><span style="color: #ff0000;">'ExecIsStartup'</span></span><span style="color: #808080;"><span style="color: #808080;">) = 1</span></span></span></p>
<p><br />&nbsp;</p>
<p>regards,</p>
<p>Norman</p>]]></content:encoded>
    </item>
    <item>
      <title>SQL Server: Move a Table from the Primary Partition to a Secondary Partition</title>
      <link>https://docs.microsoft.com/archive/blogs/biztalkmusings/sql-server-move-a-table-from-the-primary-partition-to-a-secondary-partition</link>
      <pubDate>Mon, 13 Jun 2011 13:55:18 GMT</pubDate>
      <dc:creator><![CDATA[Norman Gillis]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/biztalkmusings/2011/06/13/sql-server-move-a-table-from-the-primary-partition-to-a-secondary-partition/</guid>
      <description><![CDATA[I get often&nbsp;asked by customers how they can best move data from their primary partition to a...]]></description>
      <content:encoded><![CDATA[<p><br /><br />I get often&nbsp;asked by customers how they can best move data from their primary partition to a secondary partion. Often databases are created with a simple MDF &amp; LDF set up and the data is on the Primary Default partition. One of the easiest ways to accomplish this task is to use the Create Index while using the With Move To option. I have included the script here: <br />&nbsp; <br /><span style="font-size: x-small;"><span style="color: #008000; font-size: x-small;"><span style="color: #008000; font-size: x-small;">/* -- clean up <br />EXEC msdb.dbo.sp_delete_database_backuphistory @database_name = N'TestMoveTableToPartition' <br />GO <br />USE [master] <br />GO <br />ALTER DATABASE [TestMoveTableToPartition] SET SINGLE_USER WITH ROLLBACK IMMEDIATE <br />GO <br />USE [master] <br />GO <br />DROP DATABASE [TestMoveTableToPartition] <br />GO <br />*/ </span></span><br /></span><br /><span style="font-size: x-small;"></span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;"><br />CREATE </span></span></span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">DATABASE</span></span><span style="font-size: x-small;"> [TestMoveTableToPartition] </span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">ON</span></span><span style="font-size: x-small;"> </span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">PRIMARY</span></span><span style="font-size: x-small;"> </span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;"><br />(</span></span></span><span style="font-size: x-small;">NAME </span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">=</span></span><span style="font-size: x-small;"> </span><span style="color: #ff0000; font-size: x-small;"><span style="color: #ff0000; font-size: x-small;">N'TestMoveTableToPartition'</span></span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">,</span></span><span style="font-size: x-small;"> </span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">FILENAME</span></span><span style="font-size: x-small;"> </span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">=</span></span><span style="font-size: x-small;"> </span><span style="color: #ff0000; font-size: x-small;"><span style="color: #ff0000; font-size: x-small;">N'C:\DATA\SQL\TestMoveTableToPartition.mdf'</span></span><span style="font-size: x-small;"> </span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">,</span></span><span style="font-size: x-small;"> SIZE </span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">=</span></span><span style="font-size: x-small;"> 3072KB </span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">,</span></span><span style="font-size: x-small;"> FILEGROWTH </span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">=</span></span><span style="font-size: x-small;"> 1024KB </span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">)</span>&nbsp;</span><span style="font-size: x-small;"><span style="font-size: x-small;"><br />&nbsp; </span><span style="color: #ff00ff; font-size: x-small;"><span style="color: #ff00ff; font-size: x-small;">LOG</span></span><span style="font-size: x-small;"> </span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">ON</span></span><span style="font-size: x-small;"> </span></span><span style="font-size: x-small;"></span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;"><br />( </span></span></span><span style="font-size: x-small;">NAME </span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">=</span></span><span style="font-size: x-small;"> </span><span style="color: #ff0000; font-size: x-small;"><span style="color: #ff0000; font-size: x-small;">N'TestMoveTableToPartition_log'</span></span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">,</span></span><span style="font-size: x-small;"> </span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">FILENAME</span></span><span style="font-size: x-small;"> </span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">=</span></span><span style="font-size: x-small;"> </span><span style="color: #ff0000; font-size: x-small;"><span style="color: #ff0000; font-size: x-small;">N'C:\DATA\SQL\TestMoveTableToPartition_log.ldf'</span></span><span style="font-size: x-small;"> </span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">,</span></span><span style="font-size: x-small;"> SIZE </span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">=</span></span><span style="font-size: x-small;"> 1024KB </span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">,</span></span><span style="font-size: x-small;"> FILEGROWTH </span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">=</span></span><span style="font-size: x-small;"> 10</span><span style="color: #808080; font-size: x-small;"> <span style="color: #808080; font-size: x-small;">%)</span> </span><br /><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;"><br />GO <span style="color: #0000ff; font-size: x-small;"><br />use </span></span></span><br /><span style="font-size: x-small;">TestMoveTableToPartition</span> <br /><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;"><br />go </span></span><span style="color: #008000; font-size: x-small;"><span style="color: #008000; font-size: x-small;"><br />-- create a table on Primary (as default) </span></span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;"><br />drop </span></span></span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">table</span></span><span style="font-size: x-small;"> Table01</span> <span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;"><br />go </span></span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;"><br />create </span></span></span><br /><span style="font-size: x-small;"></span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">table</span></span><span style="font-size: x-small;"> Table01</span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">(</span></span><span style="font-size: x-small;">col1 </span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">int</span></span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">,</span></span><span style="font-size: x-small;"> col2 </span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">int</span></span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">,</span></span><span style="font-size: x-small;"> col3 </span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">binary</span></span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">(</span></span><span style="font-size: x-small;">6000</span><span style="color: #808080; font-size: x-small;"> <span style="color: #808080; font-size: x-small;">))</span> </span><br /><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;"><br />go </span></span><span style="color: #008000; font-size: x-small;"><span style="color: #008000; font-size: x-small;"><br />-- fill the table with some sample data </span></span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;"><br />declare </span></span></span><span style="font-size: x-small;">@i </span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">int<span style="color: #0000ff; font-size: x-small;"> <br />set </span></span></span><span style="font-size: x-small;">@i</span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">=</span></span><span style="font-size: x-small;">0</span> <span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;"><br />while </span></span></span><span style="font-size: x-small;">@i </span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">&lt;</span></span><span style="font-size: x-small;"> 10000</span> <span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;"><br />begin <span style="color: #0000ff; font-size: x-small;"><br />insert </span></span></span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">into</span></span><span style="font-size: x-small;"> Table01</span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">(</span></span><span style="font-size: x-small;">col1</span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">,</span></span><span style="font-size: x-small;"> col2</span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">)</span></span><span style="font-size: x-small;"> </span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">values </span></span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">(</span></span><span style="color: #ff00ff; font-size: x-small;"><span style="color: #ff00ff; font-size: x-small;">rand</span></span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">()*</span></span><span style="font-size: x-small;">1000</span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">,</span></span><span style="font-size: x-small;"> </span><span style="color: #ff00ff; font-size: x-small;"><span style="color: #ff00ff; font-size: x-small;">rand</span></span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">()*</span></span><span style="font-size: x-small;">1000</span><span style="color: #808080; font-size: x-small;"> <span style="color: #808080; font-size: x-small;">)</span> </span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;"><br />set </span></span></span><span style="font-size: x-small;">@i</span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">=</span></span><span style="font-size: x-small;">@i</span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">+</span></span><span style="font-size: x-small;">1</span> <span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;"><br />end <br />go </span></span><span style="color: #008000; font-size: x-small;"><span style="color: #008000; font-size: x-small;"><br />-- create a clustered index (needed for the move) </span></span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;"><br />create </span></span></span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">clustered</span></span><span style="font-size: x-small;"> </span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">index</span></span><span style="font-size: x-small;"> IX_Col1 </span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">on</span></span><span style="font-size: x-small;"> Table01</span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;"> </span></span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">(</span></span><span style="font-size: x-small;">col1</span><span style="color: #808080; font-size: x-small;"> <span style="color: #808080; font-size: x-small;">)</span> </span><br /><span style="color: #008000; font-size: x-small;"><span style="color: #008000; font-size: x-small;"><br />-- check the datafiles (mdf) to see how big it is, my test was 80 Mb <br />-- Now add a new Partition and a File (ndf) to it </span></span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;"><br />USE </span></span></span><br /><span style="font-size: x-small;">[master]</span> <br /><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;"><br />GO <span style="color: #0000ff; font-size: x-small;"><br />ALTER </span></span></span><br /><span style="font-size: x-small;"></span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">DATABASE</span></span><span style="font-size: x-small;"> [TestMoveTableToPartition] </span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">ADD</span></span><span style="font-size: x-small;"> FILEGROUP [TMTTP02]</span> <br /><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;"><br />GO <span style="color: #0000ff; font-size: x-small;"><br />USE </span></span></span><br /><span style="font-size: x-small;">[master]</span> <br /><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;"><br />GO <span style="color: #0000ff; font-size: x-small;"><br />ALTER </span></span></span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">DATABASE</span></span><span style="font-size: x-small;"> [TestMoveTableToPartition] </span><br /><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;"><br />ADD </span></span></span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">FILE </span></span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">(</span></span><span style="font-size: x-small;"> NAME </span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">=</span></span><span style="font-size: x-small;"> </span><span style="color: #ff0000; font-size: x-small;"><span style="color: #ff0000; font-size: x-small;">N'TestMoveTableToPartitionNew'</span></span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">,</span></span><span style="font-size: x-small;"> </span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">FILENAME</span></span><span style="font-size: x-small;"> </span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">=</span></span><span style="font-size: x-small;"> </span><span style="color: #ff0000; font-size: x-small;"><span style="color: #ff0000; font-size: x-small;">N'C:\DATA\SQL\TestMoveTableToPartitionNew.ndf'</span></span><span style="font-size: x-small;"> </span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">,</span></span><span style="font-size: x-small;"> SIZE </span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">=</span></span><span style="font-size: x-small;"> 3072KB </span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">,</span></span><span style="font-size: x-small;"> FILEGROWTH </span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">=</span></span><span style="font-size: x-small;"> 1024KB </span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">)</span></span><span style="font-size: x-small;"> </span><br /><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;"><br />TO </span></span></span><span style="font-size: x-small;">FILEGROUP [TMTTP02]</span> <br /><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;"><br />GO <span style="color: #0000ff; font-size: x-small;"><br />USE </span></span></span><br /><span style="font-size: x-small;">[TestMoveTableToPartition]</span> <br /><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;"><br />GO <span style="color: #0000ff; font-size: x-small;"><br />CREATE </span></span></span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">CLUSTERED</span></span><span style="font-size: x-small;"> </span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">INDEX</span></span><span style="font-size: x-small;"> [IX_Col1] </span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">ON</span></span><span style="font-size: x-small;"> [dbo]</span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">.</span></span><span style="font-size: x-small;">[Table01] </span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;"><br />( </span></span><span style="font-size: x-small;"><span style="font-size: x-small;"><br />[col1] </span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">ASC</span></span></span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;"></span></span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;"> <br />) </span></span></span><br /><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">WITH </span></span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">(</span></span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">DROP_EXISTING</span></span><span style="font-size: x-small;"> </span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">=</span></span><span style="font-size: x-small;"> </span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">ON</span></span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">,</span></span><span style="font-size: x-small;"> </span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">ONLINE</span></span><span style="font-size: x-small;"> </span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">=</span></span><span style="font-size: x-small;"> </span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">OFF</span></span><span style="color: #808080; font-size: x-small;"><span style="color: #808080; font-size: x-small;">)</span></span><span style="font-size: x-small;"> </span><span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;">ON</span></span><span style="font-size: x-small;"> [TMTTP02]</span> <span style="color: #0000ff; font-size: x-small;"><span style="color: #0000ff; font-size: x-small;"><br />GO </span></span></p>]]></content:encoded>
    </item>
    <item>
      <title>SSRS CLR deployment fails - VS 2010 &amp; SQL Server 2008 R2</title>
      <link>https://docs.microsoft.com/archive/blogs/biztalkmusings/ssrs-clr-deployment-fails-vs-2010-sql-server-2008-r2</link>
      <pubDate>Sun, 01 May 2011 12:22:26 GMT</pubDate>
      <dc:creator><![CDATA[Norman Gillis]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/biztalkmusings/2011/05/01/ssrs-clr-deployment-fails-vs-2010-sql-server-2008-r2/</guid>
      <description><![CDATA[Hi all,
You can deploy a CLR project to SQL Server 2008 R2 with Visual Studio 2010 however do not...]]></description>
      <content:encoded><![CDATA[<p>Hi all,</p>
<p>You can deploy a CLR project to SQL Server 2008 R2 with Visual Studio 2010 however do not forget to set the target .Net version to 3.5. The default for VS 2010 is .Net 4.0 and this will cause a deploy error, (fails to deploy). I lost a some time fiddling with this before I was able to get it to work.</p>
<p>&nbsp;</p>
<p>gr,</p>
<p>Norman</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Back online!</title>
      <link>https://docs.microsoft.com/archive/blogs/biztalkmusings/back-online</link>
      <pubDate>Sun, 01 May 2011 12:14:08 GMT</pubDate>
      <dc:creator><![CDATA[Norman Gillis]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/biztalkmusings/2011/05/01/back-online/</guid>
      <description><![CDATA[I am back online after a bit of a hiatus. Microsoft made some changes to the logon process and...]]></description>
      <content:encoded><![CDATA[<p>I am back online after a bit of a hiatus. Microsoft made some changes to the logon process and accounts in general. I was unable to sign in to my account for some time now. </p>
<p>According to Microsoft:<br />On January 27th, we have deployed Profile Integration to the MSDN &amp; TechNet Blogs (<a href="https://blogs.msdn.com/b/help/archive/2011/01/21/integration-of-msdn-blog-user-account-with-msdn-forums-profile.aspx">https://blogs.msdn.com/b/help/archive/2011/01/21/integration-of-msdn-blog-user-account-with-msdn-forums-profile.aspx</a> ).&nbsp; This is part of the larger STO Profile integration, which consolidate our users profile suites down to a single instance which will be used across all STO community platforms.</p>
<p>&nbsp;</p>
<p>regards, <br />Norman</p>]]></content:encoded>
    </item>
    <item>
      <title>Writing to the EventLog from an Orchestration</title>
      <link>https://docs.microsoft.com/archive/blogs/biztalkmusings/writing-to-the-eventlog-from-an-orchestration</link>
      <pubDate>Tue, 23 Mar 2010 10:44:00 GMT</pubDate>
      <dc:creator><![CDATA[Norman Gillis]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/biztalkmusings/2010/03/23/writing-to-the-eventlog-from-an-orchestration/</guid>
      <description><![CDATA[Please be very careful with how you do this. This can be a disaster in a production environment...]]></description>
      <content:encoded><![CDATA[<P>Please be very careful with how you do this. This can be a disaster in a production environment (Imagine writing millions of messages to an eventlog)! I once saw an environment that was writing customer information in the EventLog (there is a very bad idea as anyone with rights to read the log can get access to that information).</P>
<P>Writing Message Content<BR>Trace and debug messages are also useful for writing out the contents of messages and orchestration variables. This is useful for inspecting intermediate messages produced by multiple transforms and for determining the values of other transient values.</P>
<P>The first step is to add the appropriate variable declarations to the orchestration:</P>
<UL>
<LI>stringMessage of type string</LI>
<LI>xmlMessage of type System.Xml.XmlDocument</LI>
<LI>myMessage is the orchestration message whose contents are to be output</LI></UL>
<P>After these variables have been declared, add the following code to an Expression shape in your orchestration:</P>
<P><BR>xmlMessage = myMessage;<BR>stringMessage = xmlMessage.OuterXml;<BR>System.Diagnostics.EventLog.WriteEntry("MyBizTalkLogEntry", stringMessage);</P><BR>
<P>The is handy perhaps for you&nbsp;Dev environment but very dangerous for production.&nbsp;</P>
<P mce_keep="true">For more debugging tips please refer to: <A href="https://technet.microsoft.com/en-us/library/cc825581(BTS.10).aspx" mce_href="https://technet.microsoft.com/en-us/library/cc825581(BTS.10).aspx">https://technet.microsoft.com/en-us/library/cc825581(BTS.10).aspx</A></P>
<P mce_keep="true">&nbsp;</P>]]></content:encoded>
    </item>
    <item>
      <title>Running BizTalk Documentor on a 64bit machine</title>
      <link>https://docs.microsoft.com/archive/blogs/biztalkmusings/running-biztalk-documentor-on-a-64bit-machine</link>
      <pubDate>Tue, 23 Mar 2010 03:48:00 GMT</pubDate>
      <dc:creator><![CDATA[Norman Gillis]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/biztalkmusings/2010/03/23/running-biztalk-documentor-on-a-64bit-machine/</guid>
      <description><![CDATA[The BizTalk Documentor is a great tool for auto-generating documentation for your environment. 
The...]]></description>
      <content:encoded><![CDATA[<P>The<STRONG> BizTalk Documentor</STRONG> is a great tool for auto-generating documentation for your environment. </P>
<P>The tool can be downloaded here: <A href="https://biztalkdocumenter.codeplex.com/">https://biztalkdocumenter.codeplex.com/</A></P>
<P>If you have a 64bit environment then it will most likely not work for you. You can get around this by running with 32bit Coreflags on. You will need to have either the Win 2k? SDK installed or Visual Studio. Then you open a command prompt and execute the following: <STRONG>coreflags.exe Microsoft.Services.Tools.BiztalkDocumenter.exe /force /32Bit +</STRONG></P>
<P><STRONG></STRONG>&nbsp;</P>
<P>Happy documentoring!&nbsp;&nbsp;&nbsp; ;-p</P>
<P mce_keep="true">&nbsp;</P>]]></content:encoded>
    </item>
  </channel>
</rss>