<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>The DBA Blog by Tomer Lev</title>
	<atom:link href="http://tomerl.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://tomerl.wordpress.com</link>
	<description>SQL information, scripts, tricks and more...</description>
	<lastBuildDate>Tue, 24 Aug 2010 08:33:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='tomerl.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>The DBA Blog by Tomer Lev</title>
		<link>http://tomerl.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://tomerl.wordpress.com/osd.xml" title="The DBA Blog by Tomer Lev" />
	<atom:link rel='hub' href='http://tomerl.wordpress.com/?pushpress=hub'/>
		<item>
		<title>SSRS 2008 R2 PPT, as presented at BI MICROSOFT DATAPLATFORM, 30/05/2010, ISRAEL</title>
		<link>http://tomerl.wordpress.com/2010/08/24/122/</link>
		<comments>http://tomerl.wordpress.com/2010/08/24/122/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 08:31:28 +0000</pubDate>
		<dc:creator>tomerl</dc:creator>
				<category><![CDATA[BI]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[SQL SERVER]]></category>
		<category><![CDATA[SSRS]]></category>

		<guid isPermaLink="false">http://tomerl.wordpress.com/?p=122</guid>
		<description><![CDATA[SSRS 2008 R2 View more presentations from tomerl.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tomerl.wordpress.com&amp;blog=8132408&amp;post=122&amp;subd=tomerl&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="__ss_5037974" style="width:425px;"><strong><a title="SSRS 2008 R2" href="http://www.slideshare.net/tomerl/ssrs-2008-r2-ppt-by-datasite">SSRS 2008 R2</a></strong></p>
<div style="padding:5px 0 12px;">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/tomerl">tomerl</a>.</div>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tomerl.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tomerl.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tomerl.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tomerl.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tomerl.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tomerl.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tomerl.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tomerl.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tomerl.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tomerl.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tomerl.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tomerl.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tomerl.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tomerl.wordpress.com/122/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tomerl.wordpress.com&amp;blog=8132408&amp;post=122&amp;subd=tomerl&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tomerl.wordpress.com/2010/08/24/122/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/668f53f624d8b30be05651312505599e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tomerl</media:title>
		</media:content>
	</item>
		<item>
		<title>datasite company</title>
		<link>http://tomerl.wordpress.com/2010/08/23/datasite-company/</link>
		<comments>http://tomerl.wordpress.com/2010/08/23/datasite-company/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 16:42:00 +0000</pubDate>
		<dc:creator>tomerl</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[SQL SERVER]]></category>

		<guid isPermaLink="false">http://tomerl.wordpress.com/?p=117</guid>
		<description><![CDATA[Hi All, You are all welcome to check out our new website company at: www.datasite.co.il. it is currently in hebew &#8211; we will update to english soon. All the best, Tomer Lev<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tomerl.wordpress.com&amp;blog=8132408&amp;post=117&amp;subd=tomerl&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hi All,</p>
<p>You are all welcome to check out our new website company at: <a title="datasite company" href="http://www.datasite.co.il" target="_blank">www.datasite.co.il</a>.</p>
<p>it is currently in hebew &#8211; we will update to english soon.</p>
<p>All the best,</p>
<p>Tomer Lev</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tomerl.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tomerl.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tomerl.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tomerl.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tomerl.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tomerl.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tomerl.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tomerl.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tomerl.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tomerl.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tomerl.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tomerl.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tomerl.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tomerl.wordpress.com/117/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tomerl.wordpress.com&amp;blog=8132408&amp;post=117&amp;subd=tomerl&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tomerl.wordpress.com/2010/08/23/datasite-company/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/668f53f624d8b30be05651312505599e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tomerl</media:title>
		</media:content>
	</item>
		<item>
		<title>Resource Governor</title>
		<link>http://tomerl.wordpress.com/2010/02/13/resource-governor/</link>
		<comments>http://tomerl.wordpress.com/2010/02/13/resource-governor/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 18:02:14 +0000</pubDate>
		<dc:creator>tomerl</dc:creator>
				<category><![CDATA[SQL SERVER]]></category>

		<guid isPermaLink="false">http://tomerl.wordpress.com/2010/02/13/resource-governor/</guid>
		<description><![CDATA[The feature of  SQL Server 2008 that seems to get  the most attention from DBA&#8217;s is the Resource Governor.  It basically does what it says on the tin; for example you may want to reserve a portion of CPU or other resource for a user, process etc. At the top level Resource Governor has Resource [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tomerl.wordpress.com&amp;blog=8132408&amp;post=112&amp;subd=tomerl&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The feature of  SQL Server 2008 that seems to get  the most attention from DBA&#8217;s is the Resource Governor.  It basically does what it says on the tin; for example you may want to reserve a portion of CPU or other resource for a user, process etc.</p>
<p>At the top level Resource Governor has Resource Pools, and there is always  default resource pool</p>
<p>Below this you create Workload groups:</p>
<p><span style="font-family:Lucida Console;color:#0080ff;">CREATE WORKLOAD GROUP groupAdhoc<br />
CREATE WORKLOAD GROUP groupReports<br />
CREATE WORKLOAD GROUP groupAdmin</span></p>
<p>These workload groups will be belong to the default resource pool, and for this introduction I will keep it simple, by leaving it like that. It is then a matter of assigning whatever you want to the those groups by using a function like this:</p>
<p><span style="font-family:Lucida Console;color:#0080ff;">CREATE FUNCTION rgclassifier_v1() RETURNS SYSNAME<br />
WITH SCHEMABINDING<br />
AS<br />
BEGIN<br />
DECLARE @grp_name AS SYSNAME<br />
IF (SUSER_NAME() = &#8216;sa&#8217;)<br />
SET @grp_name = &#8216;groupAdmin&#8217;<br />
IF (APP_NAME() LIKE &#8216;%MANAGEMENT STUDIO%&#8217;)<br />
OR (APP_NAME() LIKE &#8216;%QUERY ANALYZER%&#8217;)<br />
SET @grp_name = &#8216;groupAdhoc&#8217;<br />
IF (APP_NAME() LIKE &#8216;%REPORT SERVER%&#8217;)<br />
SET @grp_name = &#8216;groupReports&#8217;<br />
RETURN @grp_name<br />
END</span></p>
<p>Notice that you can use any rule you like to create an association with a workload group e.g. users or the application.</p>
<p>This function is then needs to be applied to the resource governor like this:</p>
<p><span style="font-family:l;color:#0080ff;">ALTER RESOURCE GOVERNOR WITH (CLASSIFIER_FUNCTION= dbo.rgclassifier_v1)</span><br />
<span style="font-family:Lucida Console;color:#0080ff;"><br />
</span><span style="font-family:Lucida Console;color:#0080ff;"><span style="font-family:Tahoma;color:#000000;">You are now ready to configure which workload group gets which resources with this syntax:</span></span></p>
<p><span style="font-family:Lucida Console;color:#0080ff;">ALTER WORKLOAD GROUP groupAdhoc<br />
WITH (REQUEST_MAX_CPU_TIME_SEC = 30)</span></p>
<p><span style="font-family:Lucida Console;color:#0080ff;">or</span></p>
<p><span style="font-family:Lucida Console;color:#0080ff;">WITH (MAX_CPU_PERCENT = 50)</span></p>
<p>Finally the changes need to be applied to the resource governor process running in memory</p>
<p><span style="font-family:Lucida Console;color:#0080ff;">ALTER RESOURCE GOVERNOR RECONFIGURE</span></p>
<p>Changes can be applied to the Resource Governor at will and take effect immediately.  The function can be changed to move objects in to different workload groups as required and all of this will affect processes already running.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tomerl.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tomerl.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tomerl.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tomerl.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tomerl.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tomerl.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tomerl.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tomerl.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tomerl.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tomerl.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tomerl.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tomerl.wordpress.com/112/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tomerl.wordpress.com/112/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tomerl.wordpress.com/112/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tomerl.wordpress.com&amp;blog=8132408&amp;post=112&amp;subd=tomerl&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tomerl.wordpress.com/2010/02/13/resource-governor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/668f53f624d8b30be05651312505599e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tomerl</media:title>
		</media:content>
	</item>
		<item>
		<title>SSIS Logging and Performance</title>
		<link>http://tomerl.wordpress.com/2009/07/08/ssis-logging-and-performance/</link>
		<comments>http://tomerl.wordpress.com/2009/07/08/ssis-logging-and-performance/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 15:33:59 +0000</pubDate>
		<dc:creator>tomerl</dc:creator>
				<category><![CDATA[Administration]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[SQL SERVER]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[BI]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[SSIS]]></category>
		<category><![CDATA[TSQL]]></category>

		<guid isPermaLink="false">http://tomerl.wordpress.com/?p=109</guid>
		<description><![CDATA[SSIS Logging and monitoring SQL Server Integration Services includes log providers that you can use to implement logging in packages, containers, and tasks. With logging, you can capture run-time information about a package, helping you audit and troubleshoot a package every time it is run. For example, a log can capture the name of the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tomerl.wordpress.com&amp;blog=8132408&amp;post=109&amp;subd=tomerl&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1>SSIS Logging and monitoring</h1>
<ul>
<li>SQL Server Integration Services includes log providers that you can use to implement logging in packages, containers, and tasks. With logging, you can capture run-time information about a package, helping you audit and troubleshoot a package every time it is run. For example, a log can capture the name of the operator who ran the package and the time the package began and finished.</li>
</ul>
<p>When you add the log to a package, you choose the log provider and the location of the log. The log provider specifies the format for the log data: for example, a SQL Server database or text file.</p>
<p>MSDN link explanation you can find here:</p>
<p><a href="http://msdn.microsoft.com/en-us/library/ms140246.aspx">http://msdn.microsoft.com/en-us/library/ms140246.aspx</a></p>
<ul>
<li>Here you can find how to enable logging in the package (I have also explained Daniel how to do it):</li>
</ul>
<p><a href="http://msdn.microsoft.com/en-us/library/ms141212.aspx">http://msdn.microsoft.com/en-us/library/ms141212.aspx</a></p>
<ul>
<li>Integration      Services includes logging features that write log entries when run-time      events occur and can also write custom messages.</li>
</ul>
<p>Integration Services supports a diverse set of log providers, and gives you the ability to create custom log providers. The Integration Services log providers can write log entries to text files, SQL Server Profiler, SQL Server, Windows Event Log, or XML files.</p>
<p>Here you can find how to configure your SSIS package:</p>
<p><a href="http://msdn.microsoft.com/en-us/library/ms138020.aspx">http://msdn.microsoft.com/en-us/library/ms138020.aspx</a></p>
<ul>
<li>SQL      Server Integration Services provide a set of performance counters. Among      them the following few are helpful when you tune or debug your package:</li>
</ul>
<ul>
<li>Buffers in use</li>
<li>Flat buffers in use</li>
<li>Private buffers in use</li>
<li>Buffers spooled</li>
<li>Rows read</li>
<li>Rows written</li>
</ul>
<p>“Buffers in use”, “Flat buffers in use” and “Private buffers in use” are useful to discover leaks. During package execution time, you will see these counters fluctuating. But once the package finishes execution, their values should return to the same value as what they were before the execution. Otherwise, buffers are leaked. In occasions like that, please contact Microsoft PSS.</p>
<p>“Buffers spooled” has an initial value of 0. When it goes above 0, it indicates that the engine has started memory swapping.</p>
<p>“Rows read” and “Rows written” show how many rows the entire Data Flow has processed. They give you an overall idea about the execution progress.</p>
<ul>
<li>Here      is a link for top 10 SSIS best practices:</li>
</ul>
<p><a href="http://sqlcat.com/top10lists/archive/2008/10/01/top-10-sql-server-integration-services-best-practices.aspx">http://sqlcat.com/top10lists/archive/2008/10/01/top-10-sql-server-integration-services-best-practices.aspx</a></p>
<ul>
<li>Here      is some code you can use in order to store the logging to Audit table:</li>
</ul>
<p>CREATE TABLE AuditPackage (Id INT IDENTITY(1, 1) NOT NULL PRIMARY KEY,<br />
PackageName VARCHAR(100) NOT NULL,<br />
PackageGuid UNIQUEIDENTIFIER,<br />
ExecutionGuid UNIQUEIDENTIFIER,<br />
StartTime DATETIME,<br />
EndTime DATETIME,<br />
ElapsedTime INT,<br />
Status VARCHAR(100));<br />
GO</p>
<p>CREATE PROCEDURE dbo.sp_dts_addlogentry @event sysname,<br />
@computer nvarchar(128),<br />
@operator nvarchar(128),<br />
@source nvarchar(1024),<br />
@sourceid uniqueidentifier,<br />
@executionid uniqueidentifier,<br />
@starttime datetime,<br />
@endtime datetime,<br />
@datacode int,<br />
@databytes image,<br />
@message nvarchar(2048)<br />
AS<br />
BEGIN<br />
INSERT INTO sysdtslog90 (event, computer, operator, source, sourceid, executionid, starttime, endtime, datacode, databytes, message)<br />
VALUES (@event, @computer, @operator, @source, @sourceid, @executionid, @starttime, @endtime, @datacode, @databytes, @message);</p>
<p>INSERT INTO AuditPackage (PackageName, PackageGuid, ExecutionGuid, StartTime, ElapsedTime)<br />
SELECT @source, @sourceid, @executionid, GETDATE(), 0<br />
WHERE (@event = &#8216;PackageStart&#8217;);</p>
<p>UPDATE AuditPackage<br />
SET EndTime = GETDATE(),<br />
ElapsedTime = DATEDIFF(ms, StartTime, GETDATE()),<br />
Status = &#8216;Complete&#8217;<br />
WHERE (@event = &#8216;PackageEnd&#8217;<br />
AND PackageGuid = @sourceid<br />
AND ExecutionGuid = @executionid);</p>
<p>UPDATE AuditPackage<br />
SET Status = &#8216;Error&#8217;<br />
WHERE (@event = &#8216;OnError&#8217;<br />
AND PackageGuid = @sourceid<br />
AND ExecutionGuid = @executionid);<br />
END</p>
<p>The SSIS logging gives you the ability to find bottlenecks in your SSIS package like:</p>
<ul>
<li>How much time it takes to validate packages</li>
<li>Trace each step and find out how long it takes</li>
<li>Gives you a tool you can use to log valuable events of the package.</li>
</ul>
<h1>SSIS: Custom Logging Using Event Handlers</h1>
<p>SQL Server Integration Services (SSIS) contains some really useful logging procedures but as with most things in SSIS, it is extensible. There are 2 methods of extending the logging capability of SSIS:</p>
<ul>
<li>Build a      custom log provider</li>
<li>Use      event handlers</li>
</ul>
<p>Look at this link in order to find out which events to capture and how to customize them:</p>
<p><a href="http://blogs.conchango.com/jamiethomson/archive/2005/06/11/SSIS_3A00_-Custom-Logging-Using-Event-Handlers.aspx">http://blogs.conchango.com/jamiethomson/archive/2005/06/11/SSIS_3A00_-Custom-Logging-Using-Event-Handlers.aspx</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tomerl.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tomerl.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tomerl.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tomerl.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tomerl.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tomerl.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tomerl.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tomerl.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tomerl.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tomerl.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tomerl.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tomerl.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tomerl.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tomerl.wordpress.com/109/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tomerl.wordpress.com&amp;blog=8132408&amp;post=109&amp;subd=tomerl&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tomerl.wordpress.com/2009/07/08/ssis-logging-and-performance/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/668f53f624d8b30be05651312505599e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tomerl</media:title>
		</media:content>
	</item>
		<item>
		<title>Kill active database connections</title>
		<link>http://tomerl.wordpress.com/2009/07/06/kill-active-database-connections/</link>
		<comments>http://tomerl.wordpress.com/2009/07/06/kill-active-database-connections/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 13:11:40 +0000</pubDate>
		<dc:creator>tomerl</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[SQL SERVER]]></category>
		<category><![CDATA[TSQL]]></category>

		<guid isPermaLink="false">http://tomerl.wordpress.com/?p=107</guid>
		<description><![CDATA[&#8211; Create the sql to kill the active database connections declare @execSql varchar(1000), @databaseName varchar(100) &#8211; Set the database name for which to kill the connections set @databaseName = &#8216;your db name&#8217; set @execSql = &#8221; select  @execSql = @execSql + &#8216;kill &#8216; + convert(char(10), spid) + &#8216; &#8216; from    master.dbo.sysprocesses where   db_name(dbid) = @databaseName [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tomerl.wordpress.com&amp;blog=8132408&amp;post=107&amp;subd=tomerl&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&#8211; Create the sql to kill the active database connections<br />
declare @execSql varchar(1000), @databaseName varchar(100)<br />
&#8211; Set the database name for which to kill the connections<br />
set @databaseName = &#8216;your db name&#8217;</p>
<p>set @execSql = &#8221;<br />
select  @execSql = @execSql + &#8216;kill &#8216; + convert(char(10), spid) + &#8216; &#8216;<br />
from    master.dbo.sysprocesses<br />
where   db_name(dbid) = @databaseName<br />
and<br />
DBID &lt;&gt; 0<br />
and<br />
spid &lt;&gt; @@spid<br />
exec(@execSql</p>
<p>or the easy way is:</p>
<p>-alter database dbName set single_user with rollback immediate</p>
<p>and after you want to bring it back to normal status</p>
<p>-alter database dbName set multi_user with rollback immediate</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tomerl.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tomerl.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tomerl.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tomerl.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tomerl.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tomerl.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tomerl.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tomerl.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tomerl.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tomerl.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tomerl.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tomerl.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tomerl.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tomerl.wordpress.com/107/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tomerl.wordpress.com&amp;blog=8132408&amp;post=107&amp;subd=tomerl&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tomerl.wordpress.com/2009/07/06/kill-active-database-connections/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/668f53f624d8b30be05651312505599e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tomerl</media:title>
		</media:content>
	</item>
		<item>
		<title>DBA Production Tasks</title>
		<link>http://tomerl.wordpress.com/2009/07/05/dba-production-tasks/</link>
		<comments>http://tomerl.wordpress.com/2009/07/05/dba-production-tasks/#comments</comments>
		<pubDate>Sun, 05 Jul 2009 16:26:10 +0000</pubDate>
		<dc:creator>tomerl</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[SQL SERVER]]></category>

		<guid isPermaLink="false">http://tomerl.wordpress.com/?p=103</guid>
		<description><![CDATA[Here are some of production DBA tasks, I could think of: Schema changes Version Upload Staging Chrisis SQL JOBS ETL data transfer Index maintenance Backups Permissions monitoring shrinks server check Archive data Optimize queries Programmers tasks Reporting Services Automate notifiations High Availability Scaling Up OLAP cube &#8211; in case there is a need&#8230;. SSIS packages [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tomerl.wordpress.com&amp;blog=8132408&amp;post=103&amp;subd=tomerl&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here are some of production DBA tasks, I could think of:</p>
<p>Schema changes<br />
Version Upload<br />
Staging<br />
Chrisis<br />
SQL JOBS<br />
ETL data transfer<br />
Index maintenance<br />
Backups<br />
Permissions<br />
monitoring<br />
shrinks<br />
server check<br />
Archive data<br />
Optimize queries<br />
Programmers tasks<br />
Reporting Services<br />
Automate notifiations<br />
High Availability<br />
Scaling Up<br />
OLAP cube &#8211; in case there is a need&#8230;.<br />
SSIS packages<br />
Creating logical and physical objects<br />
Establishing multiple DBEnvironment connections<br />
Maintaining buffers for data and log pages<br />
Managing transactions and locks</p>
<p>I&#8217;m sure there are more&#8230;.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tomerl.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tomerl.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tomerl.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tomerl.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tomerl.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tomerl.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tomerl.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tomerl.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tomerl.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tomerl.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tomerl.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tomerl.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tomerl.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tomerl.wordpress.com/103/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tomerl.wordpress.com&amp;blog=8132408&amp;post=103&amp;subd=tomerl&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tomerl.wordpress.com/2009/07/05/dba-production-tasks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/668f53f624d8b30be05651312505599e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tomerl</media:title>
		</media:content>
	</item>
		<item>
		<title>Good DBA must support his clients</title>
		<link>http://tomerl.wordpress.com/2009/06/27/good-dba-must-support-his-clients/</link>
		<comments>http://tomerl.wordpress.com/2009/06/27/good-dba-must-support-his-clients/#comments</comments>
		<pubDate>Sat, 27 Jun 2009 16:58:13 +0000</pubDate>
		<dc:creator>tomerl</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[SQL SERVER]]></category>

		<guid isPermaLink="false">http://tomerl.wordpress.com/?p=100</guid>
		<description><![CDATA[It does not really important what kind of a DBA are you: applicative or infrastructure one&#8230; the one thing you will always need to do is giving support and help to your clients: a client can be a market sales man, analyst, programmer or your CTO. You need high skills of support, if you want [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tomerl.wordpress.com&amp;blog=8132408&amp;post=100&amp;subd=tomerl&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It does not really important what kind of a DBA are you: applicative or infrastructure one&#8230; the one thing you will always need to do is giving support and help to your clients: a client can be a market sales man, analyst, programmer or your CTO. You need high skills of support, if you want to be a professional DBA (and more&#8230;, but this one is very important also). Your sales man will come and ask you to give him all reports on sales made yesterday, and on which hour and to slice in by community; the analyst will want a report on member’s usage and the programmer will need help in T_SQL. You must know how to help all your clients, even if they come all at once, you will need to know how to say politely to each one of them when you will be available for doing the requested work. If you will answer politely with no press &#8211; they will all say it is nice to work with you and that you look professional in your line of duty. You, from the other hand, will need to do all you have promised to your clients. A good DBA, even if he is very professional, it does not look good, if he does not know how to give service to his clients. For example, if a programmer comes to you and wants your help in writing a stored procedure, and you are very busy with other things, give him a service by telling him that you have 10 minutes for him now, and you will be happy to help him later. I saw the other example, that a programmer came to a DBA to ask him for this help, and the DBA told him he does not have the time for him and he does not do these things. The first thing this programmer did is telling his colleagues not to go to the DBA and ask for help &#8211; not just this made the DBA a &#8220;bad name&#8221;, but also the company he works in damaged, which can lead also to bad performance on servers, due to the fact the programmer will upload a stored procedure to production servers with no help from the DBA, because the DBA does not want to help &#8211; it’s a pity! And wrong!</p>
<p>Want to be a good DBA &#8211; you must know how to give service to your clients!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tomerl.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tomerl.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tomerl.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tomerl.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tomerl.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tomerl.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tomerl.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tomerl.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tomerl.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tomerl.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tomerl.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tomerl.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tomerl.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tomerl.wordpress.com/100/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tomerl.wordpress.com&amp;blog=8132408&amp;post=100&amp;subd=tomerl&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tomerl.wordpress.com/2009/06/27/good-dba-must-support-his-clients/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/668f53f624d8b30be05651312505599e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tomerl</media:title>
		</media:content>
	</item>
		<item>
		<title>Defragmenting Indexes in SQL Server 2005</title>
		<link>http://tomerl.wordpress.com/2009/06/26/defragmenting-indexes-in-sql-server-2005/</link>
		<comments>http://tomerl.wordpress.com/2009/06/26/defragmenting-indexes-in-sql-server-2005/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 10:48:50 +0000</pubDate>
		<dc:creator>tomerl</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[SQL SERVER]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Administration]]></category>
		<category><![CDATA[Performance]]></category>

		<guid isPermaLink="false">http://tomerl.wordpress.com/?p=88</guid>
		<description><![CDATA[http://weblogs.sqlteam.com/tarad/archive/2008/09/03/Defragmenting-Indexes-in-SQL-Server-2005.aspx I think this may come in handy&#8230;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tomerl.wordpress.com&amp;blog=8132408&amp;post=88&amp;subd=tomerl&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://weblogs.sqlteam.com/tarad/archive/2008/09/03/Defragmenting-Indexes-in-SQL-Server-2005.aspx">http://weblogs.sqlteam.com/tarad/archive/2008/09/03/Defragmenting-Indexes-in-SQL-Server-2005.aspx</a></p>
<p>I think this may come in handy&#8230;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tomerl.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tomerl.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tomerl.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tomerl.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tomerl.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tomerl.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tomerl.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tomerl.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tomerl.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tomerl.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tomerl.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tomerl.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tomerl.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tomerl.wordpress.com/88/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tomerl.wordpress.com&amp;blog=8132408&amp;post=88&amp;subd=tomerl&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tomerl.wordpress.com/2009/06/26/defragmenting-indexes-in-sql-server-2005/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/668f53f624d8b30be05651312505599e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tomerl</media:title>
		</media:content>
	</item>
		<item>
		<title>Tweet-SQL</title>
		<link>http://tomerl.wordpress.com/2009/06/26/tweet-sql/</link>
		<comments>http://tomerl.wordpress.com/2009/06/26/tweet-sql/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 10:46:07 +0000</pubDate>
		<dc:creator>tomerl</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[SQL SERVER]]></category>
		<category><![CDATA[Administration]]></category>
		<category><![CDATA[TSQL]]></category>

		<guid isPermaLink="false">http://tomerl.wordpress.com/?p=86</guid>
		<description><![CDATA[Integrate your application in super quick time using Tweet-SQL. Tweet-SQL promises to allow fast and easy Twitter Integration through the use of CLR stored procedures on Microsoft SQL Server. A quick summary of Tweet-SQL&#8230; http://sqlclrnews.blogspot.com/2008/09/easy-twitter-integration-with-tweet-sql_3653.html<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tomerl.wordpress.com&amp;blog=8132408&amp;post=86&amp;subd=tomerl&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Integrate your application in super quick time using Tweet-SQL. Tweet-SQL promises to allow fast and easy Twitter Integration through the use of CLR stored procedures on Microsoft SQL Server. A quick summary of Tweet-SQL&#8230;</p>
<p><a href="http://sqlclrnews.blogspot.com/2008/09/easy-twitter-integration-with-tweet-sql_3653.html">http://sqlclrnews.blogspot.com/2008/09/easy-twitter-integration-with-tweet-sql_3653.html</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tomerl.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tomerl.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tomerl.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tomerl.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tomerl.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tomerl.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tomerl.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tomerl.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tomerl.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tomerl.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tomerl.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tomerl.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tomerl.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tomerl.wordpress.com/86/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tomerl.wordpress.com&amp;blog=8132408&amp;post=86&amp;subd=tomerl&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tomerl.wordpress.com/2009/06/26/tweet-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/668f53f624d8b30be05651312505599e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tomerl</media:title>
		</media:content>
	</item>
		<item>
		<title>Useful bit of code</title>
		<link>http://tomerl.wordpress.com/2009/06/26/useful-bit-of-code/</link>
		<comments>http://tomerl.wordpress.com/2009/06/26/useful-bit-of-code/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 10:43:00 +0000</pubDate>
		<dc:creator>tomerl</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[SQL SERVER]]></category>
		<category><![CDATA[TSQL]]></category>

		<guid isPermaLink="false">http://tomerl.wordpress.com/?p=84</guid>
		<description><![CDATA[create table #temp (spid int, status nvarchar(max), login nvarchar(max), hostname nvarchar(max), blkby nvarchar(max), dbname nvarchar(max), command nvarchar(max), cputime int, diskio int, lastbatch nvarchar(max), programname nvarchar(max), spid2 int, requestid int) insert #temp exec sp_who2 select hostname, count(*) from #temp where hostname != &#8216; .&#8217; AND login = &#8216;your login&#8217; group by hostname order by hostname drop [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tomerl.wordpress.com&amp;blog=8132408&amp;post=84&amp;subd=tomerl&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>create table #temp (spid int, status nvarchar(max), login nvarchar(max), hostname nvarchar(max), blkby nvarchar(max), dbname nvarchar(max), command nvarchar(max), cputime int, diskio int, lastbatch nvarchar(max), programname nvarchar(max), spid2 int, requestid int)</p>
<p>insert #temp exec sp_who2</p>
<p>select hostname, count(*)<br />
from #temp<br />
where hostname != &#8216;  .&#8217; AND login = &#8216;your login&#8217;<br />
group by hostname<br />
order by hostname</p>
<p>drop table #temp</p>
<p>This way you can filter sp_who2.</p>
<p>enjoy <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tomerl.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tomerl.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tomerl.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tomerl.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tomerl.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tomerl.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tomerl.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tomerl.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tomerl.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tomerl.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tomerl.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tomerl.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tomerl.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tomerl.wordpress.com/84/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tomerl.wordpress.com&amp;blog=8132408&amp;post=84&amp;subd=tomerl&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tomerl.wordpress.com/2009/06/26/useful-bit-of-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/668f53f624d8b30be05651312505599e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tomerl</media:title>
		</media:content>
	</item>
	</channel>
</rss>
