 




<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SQL Server with Mr. Denny &#187; BIDS</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/sql-server/tag/bids/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/sql-server</link>
	<description></description>
	<lastBuildDate>Fri, 17 May 2013 17:04:01 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Using Event Viewer Logging for SSIS Performance Trouble Shooting</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/using-event-viewer-logging-for-ssis-performance-trouble-shooting/</link>
		<comments>http://itknowledgeexchange.techtarget.com/sql-server/using-event-viewer-logging-for-ssis-performance-trouble-shooting/#comments</comments>
		<pubDate>Wed, 27 Mar 2013 14:00:51 +0000</pubDate>
		<dc:creator>Denny Cherry</dc:creator>
				<category><![CDATA[BIDS]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server 2005]]></category>
		<category><![CDATA[SQL Server 2008]]></category>
		<category><![CDATA[SQL Server 2008 R2]]></category>
		<category><![CDATA[SQL Server 2012]]></category>
		<category><![CDATA[SSIS]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/?p=2131</guid>
		<description><![CDATA[So while working with a client recently I was going some performance tuning on SSIS for them.  While SSIS isn&#8217;t exactly my normal workload, the problem wasn&#8217;t really in SSIS, but just normal SQL Statements being called from SSIS. While attacking this problem, the first thing that I did was look into the SSIS package [...]]]></description>
				<content:encoded><![CDATA[<p>So while working with a client recently I was going some performance tuning on SSIS for them.  While SSIS isn&#8217;t exactly my normal workload, the problem wasn&#8217;t really in SSIS, but just normal SQL Statements being called from SSIS.</p>
<p>While attacking this problem, the first thing that I did was look into the SSIS package and see what I had gotten myself into.  There were hundreds of objects within SSIS, most of them T-SQL Scripts of Data Pump Tasks.  So simply going through them one by one wasn&#8217;t going to be all that helpful.  The client didn&#8217;t have any logging to SQL Server or to a text file setup, but they did have the SSIS package setup to log to the Windows event log.</p>
<p>Opening the Application log greated me with one event for the start of each task, and one for the completion of each task.  Not exactly the most useful information ever, but better than nothing, so I&#8217;ll take what I can get.  The first thing that I did was export the Application Event log to a CSV file and download it to my desktop so that I could do the processing on my local machine.  The CSV file has a few hundred thousand lines, so I needed to figure out what I had via scripting.  The first problem that I had was that for each SSIS event there were multiple lines within the csv when opened in Excel which you can see below.</p>
<p><img class="alignnone" src="http://mrdenny.com/wp-content/uploads/2012/07/excel.jpg" alt="" width="755" height="179" /></p>
<p>Thankfully this made the rows pretty unique looking, so an Excel Macro was able to clean this up pretty easily.  Before I got started I added some column headers into the excel sheet.  The default columns from Event Viewer are Date, Time, Source, Severity, Category, EventID, User, Computer, Description.  This covered columns A through I.  After that I put columns J through P as being Operator, SourceName, SourceID, Execution, StartTime, EndTime and DataCode as these are the specific items that SSIS is logging that you can see above.  Then it was time to bust out a little VBA and flatten out all this data.  The macro shown below looped through the data and flattened everything out so that all the data was on a single line.  Then is went through and removed all the white lines.  This macro took about 3 hours to run.</p>
<p><code>Sub CleanUpData()<br />
Dim Row As Long<br />
Dim DataRow As Long<br />
Row = 32768<br />
Do While Range("A" &amp; Row).Value = ""<br />
If Range("B" &amp; Row).Value = "" Then<br />
DataRow = Row<br />
Range("A" &amp; Row).Select<br />
Else<br />
If Left(Range("A" &amp; Row).Value, 4) = " Mes" Then<br />
Range("A" &amp; Row).Value = ""<br />
End If<br />
If Left(Range("A" &amp; Row).Value, 4) = " Ope" Then<br />
Range("J" &amp; DataRow).Value = Range("A" &amp; Row).Value<br />
Range("A" &amp; Row).Value = ""<br />
End If<br />
If Left(Range("A" &amp; Row).Value, 9) = " Source N" Then<br />
Range("K" &amp; DataRow).Value = Range("A" &amp; Row).Value<br />
Range("A" &amp; Row).Value = ""<br />
End If<br />
If Left(Range("A" &amp; Row).Value, 10) = " Source ID" Then<br />
Range("L" &amp; DataRow).Value = Range("A" &amp; Row).Value<br />
Range("A" &amp; Row).Value = ""<br />
End If<br />
If Left(Range("A" &amp; Row).Value, 4) = " Exe" Then<br />
Range("M" &amp; DataRow).Value = Range("A" &amp; Row).Value<br />
Range("A" &amp; Row).Value = ""<br />
End If<br />
If Left(Range("A" &amp; Row).Value, 4) = " Sta" Then<br />
Range("N" &amp; DataRow).Value = Range("A" &amp; Row).Value<br />
Range("A" &amp; Row).Value = ""<br />
End If<br />
If Left(Range("A" &amp; Row).Value, 4) = " End" Then<br />
Range("O" &amp; DataRow).Value = Range("A" &amp; Row).Value<br />
Range("A" &amp; Row).Value = ""<br />
End If<br />
If Left(Range("A" &amp; Row).Value, 4) = " Dat" Then<br />
Range("P" &amp; DataRow).Value = Range("A" &amp; Row).Value<br />
Range("A" &amp; Row).Value = ""<br />
End If<br />
End If<br />
Row = Row + 1<br />
Loop</code></p>
<p>Do While Row 2<br />
If Range(&#8220;A&#8221; &amp; Row).Value = &#8220;&#8221; Then<br />
Range(Row &amp; &#8220;:&#8221; &amp; Row).Select<br />
Selection.Delete<br />
End If<br />
Row = Row &#8211; 1<br />
Loop<br />
End Sub</p>
<p>Once that was done I needed to set the start times for each event on the same line as the end time for each event. That way I wasn&#8217;t scrolling through looking for stuff while trying to do my data analysis. This I was also able to do with a little Macro. In this case I started on row 14 as that was the first entry that had SSIS data. You may need to change the EndRow=14 line to what ever line your data starts on. This puts the start time and the end time into Columns R and S, but only on the line which is the OnPostExecute line.</p>
<p><code>Sub FindRunTimes()<br />
Dim EndRow As Long<br />
Dim StartRow As Long<br />
Dim SourceName As String<br />
EndRow = 14<br />
Do While Range("A" &amp; EndRow).Value = ""<br />
If Range("I" &amp; EndRow).Value = " Event Name: OnPostExecute" Then<br />
StartRow = EndRow + 1<br />
Do Until Range("K" &amp; EndRow).Value = Range("K" &amp; StartRow).Value And Range("I" &amp; StartRow).Value = " Event Name: OnPreExecute"<br />
If Range("I" &amp; StartRow).Value = "" Then<br />
MsgBox "Ran out of rows to process for ending row " &amp; EndRow<br />
Exit Sub<br />
End If<br />
StartRow = StartRow + 1<br />
Loop<br />
Range("S" &amp; EndRow).Value = Range("B" &amp; EndRow).Value<br />
Range("R" &amp; EndRow).Value = Range("B" &amp; StartRow).Value<br />
'Range("T" &amp; EndRow).Value = DateDiff("mi", Range("A" &amp; StartRow).Value &amp; " " &amp; Range("B" &amp; StartRow).Value, Range("A" &amp; EndRow).Value &amp; " " &amp; Range("B" &amp; EndRow).Value)<br />
Range("R" &amp; EndRow).Select<br />
End If<br />
EndRow = EndRow + 1<br />
Loop<br />
End Sub</code></p>
<p>Once that Macro was finished I needed to figure out which of the statements was taking to long to run. Putting a formula into the column Q marked the rows that I needed to look into a little more. In this case I was using anything with a run time of 20 minutes or longer as needing to be looked at.</p>
<p><code>=IF(HOUR(R595)=HOUR(S595)*60+MINUTE(S595),"", "X"), IF(HOUR(R595)*60+MINUTE(R595)+19&gt;=HOUR(S595)*60+MINUTE(S595)+1440,"", "X"))</code></p>
<p>Once that formula was in there all the rows that were SSIS objects that took a long time to run had an X next to them. Now I still needed to ignore the rows which were containers, but those were pretty easy to figure out from the names of the objects as most of them had container in them (in the SourceName column which was column K of my Worksheet). At this point I was able to move back to the SSIS package and start digging through the package finding the objects which had long runtimes and getting those looked at.</p>
<p>The whole reason I went through this process instead of just adding logging to the SSIS package was for a few different reasons.</p>
<ul>
<li>I didn&#8217;t want to make ANY changes to production if I didn&#8217;t have to. This SSIS package loads a production data warehouse which the business uses to run their company, so making changes to it wasn&#8217;t something I wanted to try.</li>
<li>If I had simply put logging into place I would have had to have waited another day to being looking at the problems as the ETL process only runs once a day.</li>
<li>The SSIS package takes 8+ hours to run, so sitting around waiting for it to run wasn&#8217;t exactly the best use of my time, or the clients money.</li>
</ul>
<p>If you get stuck in this same sort of problem, hopefully this approach will help you out.<br />
Denny</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/sql-server/using-event-viewer-logging-for-ssis-performance-trouble-shooting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Development of SQL 2008 SSIS Packages Requires SSIS Service</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/development-of-sql-2008-ssis-packages-requires-ssis-service/</link>
		<comments>http://itknowledgeexchange.techtarget.com/sql-server/development-of-sql-2008-ssis-packages-requires-ssis-service/#comments</comments>
		<pubDate>Mon, 22 Dec 2008 11:00:22 +0000</pubDate>
		<dc:creator>Denny Cherry</dc:creator>
				<category><![CDATA[BIDS]]></category>
		<category><![CDATA[SQL Server 2008]]></category>
		<category><![CDATA[SSIS]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/development-of-sql-2008-ssis-packages-requires-ssis-service/</guid>
		<description><![CDATA[Unlike in SQL 2005, when developing SSIS packages in SQL Server 2008 BIDS you must have the SSIS service installed on your workstation.]]></description>
				<content:encoded><![CDATA[<p>Unlike in SQL 2005, when developing SSIS packages in SQL Server 2008 BIDS you must have the SSIS service installed on your workstation.  This is a change from SQL Server 2005 where you did not have to have the actual SSIS service installed on your workstation.</p>
<p>It doesn&#8217;t appear that you actually need to have the service running.  I have stopped the SSIS service on my workstation and I am still able to run my SQL 2008 SSIS packages, however I would recommend setting it to manual rather then disabled just in case BIDS needs it running for some reason.</p>
<p>If you try and edit an existing package without the SSIS service installed an error message will be displayed saying that the service needs to be installed.</p>
<p>Denny</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/sql-server/development-of-sql-2008-ssis-packages-requires-ssis-service/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to setup SQL 2008 BIDS to use VB.NET as the default scripting language</title>
		<link>http://itknowledgeexchange.techtarget.com/sql-server/how-to-setup-sql-2008-bids-to-use-vbnet-as-the-default-scripting-language/</link>
		<comments>http://itknowledgeexchange.techtarget.com/sql-server/how-to-setup-sql-2008-bids-to-use-vbnet-as-the-default-scripting-language/#comments</comments>
		<pubDate>Thu, 24 Jul 2008 11:00:36 +0000</pubDate>
		<dc:creator>Denny Cherry</dc:creator>
				<category><![CDATA[BIDS]]></category>
		<category><![CDATA[Integration Services 2008]]></category>
		<category><![CDATA[SQL Server 2008]]></category>
		<category><![CDATA[SSIS]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/sql-server/how-to-setup-sql-2008-bids-to-use-vbnet-as-the-default-scripting-language/</guid>
		<description><![CDATA[If you are like me and don&#8217;t know anything about C#, and you don&#8217;t want to have to change the script language every time to create a .NET script from C#.NET to VB.NET you can change the default.  Open BIDS, and select Tools &#62; Options.  On the menu on the left select &#8220;Business Intelligence Designers&#8221; then &#8220;Integration [...]]]></description>
				<content:encoded><![CDATA[<p>If you are like me and don&#8217;t know anything about C#, and you don&#8217;t want to have to change the script language every time to create a .NET script from C#.NET to VB.NET you can change the default.</p>
<p> Open BIDS, and select Tools &gt; Options.  On the menu on the left select &#8220;Business Intelligence Designers&#8221; then &#8220;Integration Services Designers&#8221;.  In the Script box in the middle of the right pain change the option in the drop down from &#8220;Microsoft Visual C# 2008&#8243; to &#8220;Microsoft Visual Basic 2008&#8243;.</p>
<p>If you prefer C# you&#8217;ve got nothing to worry about as C# is the default option.</p>
<p>Denny</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/sql-server/how-to-setup-sql-2008-bids-to-use-vbnet-as-the-default-scripting-language/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
