<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Search results matching tags 'Performance', 'Troubleshooting', 'Automation', and 'Administration'</title><link>http://sqlblog.com/search/SearchResults.aspx?o=DateDescending&amp;tag=Performance,Troubleshooting,Automation,Administration&amp;orTags=0</link><description>Search results matching tags 'Performance', 'Troubleshooting', 'Automation', and 'Administration'</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>New White Paper: SQL Server Extended Events and Notifications</title><link>http://sqlblog.com/blogs/kevin_kline/archive/2012/04/25/new-white-paper-sql-server-extended-events-and-notifications.aspx</link><pubDate>Wed, 25 Apr 2012 13:13:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:42932</guid><dc:creator>KKline</dc:creator><description>&lt;p&gt;SQL Server comes with a wide array of tools for monitoring your environment. There are logs and traces that provide information when errors occur, but these are often used passively to react to events that have already occurred. &amp;nbsp;There's PerfMon, and Profiler, and loads of Dynamic Management Views to check. &amp;nbsp;But where to look?&lt;/p&gt;&lt;p&gt;As database administrators (DBA), we need to monitor our environments proactively and create solutions as issues arise. In this white paper, we will look at a couple technologies – event notifications and extended events – that can help you achieve these goals. With these two features, we’ll look at the error log and deadlocks, and demonstrate how you can get relevant information delivered as it occurs. We’ll also look at ways that run-time errors can be captured and used to help reduce the amount of time required to investigate issues.&lt;/p&gt;&lt;p&gt;This white paper, written by SQL Server MVP Jason Strate (&lt;a title="Jason Strate's SQL Server Blog" href="http://www.jasonstrate.com/"&gt;blog&lt;/a&gt;&amp;nbsp;|&amp;nbsp;&lt;a title="Jason Strate's Twitter Feed" href="http://twitter.com/stratesql"&gt;twitter&lt;/a&gt;), is a free download &lt;em&gt;but requires a registration&lt;/em&gt;.&amp;nbsp; &lt;a title="Microsoft SQL Server Extended Events White Paper" href="http://www.quest.com/whitepaper/how-to-use-sql-servers-extended-events-and-notifications816315.aspx"&gt;Download the Extended Events white paper here&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;And, as always, I enjoy your feedback. &amp;nbsp;Thanks!&lt;/p&gt;&lt;p&gt;-Kev&lt;/p&gt;&lt;p&gt;&amp;nbsp;Follow me on&amp;nbsp;&lt;a title="Kevin Kline's Twitter Feed" href="http://twitter.com/kekline"&gt;Twitter&lt;/a&gt;!&lt;/p&gt;</description></item><item><title>Everybody Needs a Test Harness</title><link>http://sqlblog.com/blogs/kevin_kline/archive/2011/10/31/everybody-needs-a-test-harness.aspx</link><pubDate>Mon, 31 Oct 2011 14:17:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:39489</guid><dc:creator>KKline</dc:creator><description>&lt;p&gt;When you're developing new Transact-SQL code or modifying some existing code, do you just launch directly into programming?&lt;/p&gt;&lt;p&gt;I know that I did just that, for years.  It wasn't until I was trying to performance tune some existing code that I realized I hadn't actually taken caching of data and execution plans into account.  So all those modified stored procedures that I was so proud of might not actually be faster than the first generation of procedures because I hadn't checked to ensure that I was testing cached programs against uncached programs (and, by extension, the data used by those programs).  That's easy enough to fix with a &lt;em&gt;test harness.&lt;/em&gt;  Test harness were originally an actual, physical harness used by engineers to clamp down parts of an electrical or mechanical device they were prototyping.  Ours is no different.  It locks down all of the assumptions about our code (like my early, false assumption that I didn't need to clear the caches) and adds a metric or two for good measure - literally - so we can better measure what's happening in that code.&lt;/p&gt;&lt;p&gt;Here's what my test harness looks like: &lt;/p&gt;&lt;pre style="padding-left:30px;"&gt;/* Transact-SQL test harness by Kevin Kline, http://KevinEKline.com, Twitter at kekline */ &lt;/pre&gt;&lt;pre style="padding-left:30px;"&gt;/* Flush dirty pages from the buffer to the database files. */&lt;/pre&gt; &lt;pre style="padding-left:30px;"&gt;CHECKPOINT;&lt;/pre&gt; &lt;pre style="padding-left:30px;"&gt;/* Flush the data cache and procedure cache, respectively. For DEV environments only! */&lt;/pre&gt; &lt;pre style="padding-left:30px;"&gt;DBCC DROPCLEANBUFFERS; &lt;/pre&gt;&lt;pre style="padding-left:30px;"&gt;DBCC FREEPROCCACHE;&lt;/pre&gt; &lt;pre style="padding-left:30px;"&gt;/* Enable statistics tracking for IO and timings. Remember, SET commands remain enabled during a session until disabled. */&lt;/pre&gt; &lt;pre style="padding-left:30px;"&gt;SET STATISTICS IO ON; &lt;/pre&gt;&lt;pre style="padding-left:30px;"&gt;SET STATISTICS TIME ON;&lt;/pre&gt; &lt;pre style="padding-left:30px;"&gt;-- Whatever SQL code you'd like to process goes below.&lt;/pre&gt;&lt;pre style="padding-left:30px;"&gt;SELECT SalesOrderID&lt;/pre&gt;&lt;pre style="padding-left:30px;"&gt;FROM Sales.SalesOrderHeader H&lt;/pre&gt;&lt;pre style="padding-left:30px;"&gt;WHERE CustomerID = 344&lt;/pre&gt;&lt;pre style="padding-left:30px;"&gt;GO&lt;/pre&gt; &lt;pre style="padding-left:30px;"&gt;SET STATISTICS IO OFF; &lt;/pre&gt;&lt;pre style="padding-left:30px;"&gt;SET STATISTICS TIME OFF;&lt;/pre&gt; &lt;pre style="padding-left:30px;"&gt;/* Textual Execution Plans, if desired. &lt;/pre&gt;&lt;pre style="padding-left:30px;"&gt;SET SHOWPLAN_TEXT ON; &lt;/pre&gt;&lt;pre style="padding-left:30px;"&gt;SET SHOWPLAN_TEXT OFF; &lt;/pre&gt;&lt;pre style="padding-left:30px;"&gt;*/&lt;/pre&gt;&lt;p&gt; I also like to include the execution plans a lot of the time.  You might wonder why I don't save the execution plans for the GUI in SSMS?  Well, I'm a big advocate of scripting in general because I like to automate activities.  By pulling the execution plans using scripts, I can use SQLCMD to schedule a large number of query executions during the evening and have the results ready for analysis when I come back into the office in the morning.  &lt;em&gt;Workin' smarter, not harder, Baby!&lt;/em&gt;&lt;/p&gt;&lt;p&gt;So how does this test harness work for you?  Do you use other elements in yours?  If so, share your experiences here!&lt;/p&gt;&lt;p&gt;Thanks,&lt;/p&gt;&lt;p&gt;-Kevin&lt;/p&gt;&lt;p&gt;-&lt;a title="C'mon. You know you want to." href="http://twitter.com/kekline" target="_blank"&gt;Follow me on Twitter&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Pain of the Week/Expert's Perspective: Performance Tuning for Backups and Restores</title><link>http://sqlblog.com/blogs/kevin_kline/archive/2011/06/27/pain-of-the-week-expert-s-perspective-performance-tuning-for-backups-and-restores.aspx</link><pubDate>Mon, 27 Jun 2011 14:39:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:36482</guid><dc:creator>KKline</dc:creator><description>&lt;p&gt;First off - the Pain of the Week webcast series has been renamed.&amp;nbsp; It's now known as &lt;em&gt;The Expert's Perspective&lt;/em&gt;.&amp;nbsp;
 Please join us for future webcasts and, if you're interested in 
speaking, drop me a note to see if we can get you on the roster!&lt;br&gt;&lt;/p&gt;&lt;p&gt;The
 bigger your databases get, the longer backups take. That doesn't really
 seem like a huge problem — until disaster strikes and you need to 
restore your databases as fast as possible.&lt;/p&gt;
&lt;p&gt;Join my buddy Brent Ozar (&lt;a href="http://brentozar.com/" title="One of the few, the proud, the MCMs" target="_blank"&gt;blog&lt;/a&gt; |&amp;nbsp;&lt;a href="http://twitter.com/brento" title="Tro-lo-lo with BrentO" target="_blank"&gt;twitter&lt;/a&gt;),
 a Microsoft Certified Master of SQL Server and good friend, as he 
reveals ways to make these critically important maintenance tasks run 
faster.&lt;/p&gt;
&lt;p&gt;You'll discover:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Why Instant File Initialization is so important for restores&lt;/li&gt;&lt;li&gt;How to use DMVs to check restore progress&lt;/li&gt;&lt;li&gt;How to find the bottleneck while you're backing up or restoring data&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Watch the recorded presentation at &lt;a href="http://www.quest.com/events/ListDetails.aspx?ContentID=13358"&gt;http://www.quest.com/events/ListDetails.aspx?ContentID=13358&lt;/a&gt;!&lt;/p&gt;&lt;p&gt;Enjoy!&lt;/p&gt;&lt;p&gt;-Kev&lt;/p&gt;
&lt;div&gt;&lt;span style="font-family:'Times New Roman';"&gt; &lt;a href="http://twitter.com/kekline" title="C'mon. You know you want to!" target="_blank"&gt;Follow me on Twitter at kekline&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:'Times New Roman';"&gt; More content at&amp;nbsp;&lt;a href="http://kevinekline.com/"&gt;http://KevinEKline.com&lt;/a&gt; &lt;/span&gt;&lt;/div&gt;</description></item></channel></rss>