<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>DBA Database on Andy M Mallon - AM²</title><link>https://am2.co/tag/dba-database/</link><description>Recent content in DBA Database on Andy M Mallon - AM²</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Fri, 07 Mar 2025 16:17:43 -0500</lastBuildDate><atom:link href="https://am2.co/tag/dba-database/index.xml" rel="self" type="application/rss+xml"/><item><title>Consuming SQL Agent dates &amp; durations</title><link>https://am2.co/2025/03/07/consuming-sql-agent-dates-durations/</link><pubDate>Fri, 07 Mar 2025 16:17:43 -0500</pubDate><guid>https://am2.co/2025/03/07/consuming-sql-agent-dates-durations/</guid><description>&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=vBynw9Isr28"&gt;&lt;img src="https://am2.co/wp-content/uploads/StopWatch-300x300.png" alt="" width="300" height="300" class="alignright size-medium wp-image-57887" /&gt;&lt;/a&gt;&#10;SQL Agent&amp;rsquo;s schema is older than me. It handles dates, times, and durations like it&amp;rsquo;s 1980 by using integers instead of date/time data types. My buddy Aaron Bertrand talks more about &lt;a href="https://sqlblog.org/dates" target="_blank"&gt;Dating Responsibly&lt;/a&gt; so that you can have a good datetime with your own database.&lt;/p&gt;</description></item><item><title>Not all stats should be auto-updated</title><link>https://am2.co/2024/08/29/not-all-stats-should-be-auto-updated/</link><pubDate>Thu, 29 Aug 2024 11:19:07 -0400</pubDate><guid>https://am2.co/2024/08/29/not-all-stats-should-be-auto-updated/</guid><description>&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=CO__LF_m_O8"&gt;&lt;img src="https://am2.co/wp-content/uploads/StatsDog-300x300.png" alt="" width="300" height="300" class="alignright size-medium wp-image-53810" /&gt;&lt;/a&gt;Statistics auto-updates are generally a good thing&amp;ndash;auto-update of &lt;a href="https://learn.microsoft.com/en-us/sql/relational-databases/statistics/statistics?view=sql-server-ver16" rel="noopener" target="_blank"&gt;statistics&lt;/a&gt; is the default behavior in SQL Server. Having the freshest information about the data &amp;ldquo;shape&amp;rdquo; helps to inform the best selection of an execution plan for queries.&lt;/p&gt;&#10;&lt;h2 id="except-for-when-it-doesnt"&gt;Except for when it doesn&amp;rsquo;t.&lt;/h2&gt;&#10;&lt;h3 id="because-it-depends"&gt;Because It Depends™️&lt;/h3&gt;&#10;&lt;p&gt;Let&amp;rsquo;s talk about the trade-offs.&lt;/p&gt;</description></item><item><title>AG secondary is out of sync for hours after index maintenance</title><link>https://am2.co/2023/02/21/ag-secondary-is-out-of-sync-for-hours-after-index-maintenance/</link><pubDate>Tue, 21 Feb 2023 13:17:04 -0500</pubDate><guid>https://am2.co/2023/02/21/ag-secondary-is-out-of-sync-for-hours-after-index-maintenance/</guid><description>&lt;p&gt;&lt;a href="https://dba.stackexchange.com/q/323858/52344"&gt;&lt;img src="https://am2.co/images/stack-exchange-question-mark.svg" alt="Question on Stack Exchange" width="96" height="96" class="stack-exchange-question-icon" /&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;h2 id="question"&gt;Question&lt;/h2&gt;&#10;&lt;p&gt;We have a 3TB OLTP database running Siemens Opcenter MES software at one of our manufacturing plants in China. This is setup in an Always-On Availability group with one secondary node. As this is a manufacturing plant, we are only provided 11 1/2 hours every two weeks to run index maintenance when the plant is not running production. We use Hallengren scripts to run this index maintenance.&lt;/p&gt;</description></item><item><title>Querying SERVERPROPERTY() and DATABASEPROPERTYEX() from a view (without knowing magic)</title><link>https://am2.co/2021/12/17/querying-serverproperty-and-databasepropertyex-from-a-view/</link><pubDate>Fri, 17 Dec 2021 11:11:50 -0500</pubDate><guid>https://am2.co/2021/12/17/querying-serverproperty-and-databasepropertyex-from-a-view/</guid><description>&lt;figure class="wp-caption alignright" style="max-width:378px"&gt;&lt;a href="https://www.youtube.com/watch?v=nF4-OOlbvl8" rel="noopener" target="_blank"&gt;&lt;img src="https://am2.co/wp-content/uploads/ElphieWitch_Tall-504x1024.jpg" alt="Puppy in a witch costume" width="378" height="768" class="size-large wp-image-10541" /&gt;&lt;/a&gt; Elphaba the pup is growing up!&lt;/figure&gt;&#10;I'm not going to beat around the bush. I hate the `SERVERPROPERTY()` and `DATABASEPROPERTYEX()` system functions. &#10;&lt;h2 id="loathing"&gt;Loathing&lt;/h2&gt;&#10;&lt;p&gt;The thing I hate the most about these two functions is that you need to know the right magic spells to make them work. Let&amp;rsquo;s look at &lt;code&gt;SERVERPROPERTY()&lt;/code&gt; first. The syntax for the function is &lt;code&gt;SERVERPROPERTY( &amp;lsquo;propertyname&amp;rsquo; )&lt;/code&gt;, which is easy enough syntax, but the list of values for &lt;code&gt;propertyname&lt;/code&gt; isn&amp;rsquo;t discoverable from SQL Server metadata, DMVs, or even IntelliSense. Instead, I need to check &lt;a href="https://docs.microsoft.com/en-us/sql/t-sql/functions/serverproperty-transact-sql?view=sql-server-ver15" rel="noopener" target="_blank"&gt;the docs&lt;/a&gt; for the list of allowable values. These property names are essentially magic words, and I need to check my &lt;a href="https://amzn.to/3H6p0Ph" rel="noopener" target="_blank"&gt;spell book&lt;/a&gt; to make sure I get it right.&lt;/p&gt;</description></item><item><title>log_reuse_wait_desc = AVAILABILITY_REPLICA, log is 100% full but AG is all fine</title><link>https://am2.co/2021/11/28/log_reuse_wait_desc-availability_replica-log-is-100-full-but-ag-is-all-fine/</link><pubDate>Sun, 28 Nov 2021 18:58:02 -0500</pubDate><guid>https://am2.co/2021/11/28/log_reuse_wait_desc-availability_replica-log-is-100-full-but-ag-is-all-fine/</guid><description>&lt;p&gt;&lt;a href="https://dba.stackexchange.com/q/302301/52344"&gt;&lt;img src="https://am2.co/images/stack-exchange-question-mark.svg" alt="Question on Stack Exchange" width="96" height="96" class="stack-exchange-question-icon" /&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;h2 id="question"&gt;Question&lt;/h2&gt;&#10;&lt;p&gt;That's a weird scenario. The transaction log is full. It waits on AG. AG is all good. No latency, last commit/hardened time is almost real-time on all the nodes. The Estimated Recovery Time is zero. I checked this from the primary node and secondaries as well (in case if Dashboard is not updating).&#10;This &lt;a href="https://learn.microsoft.com/en-us/troubleshoot/sql/availability-groups/error-9002-transaction-log-large" rel="nofollow noreferrer"&gt;page&lt;/a&gt; lists only two reasons for this error, a delivery latency and redo latency. Nothing applies to my system. How to troubleshoot this further?&lt;/p&gt;</description></item><item><title>T-SQL Tuesday #143: My favorite short scripts</title><link>https://am2.co/2021/10/12/t-sql-tuesday-143-my-favorite-short-scripts/</link><pubDate>Tue, 12 Oct 2021 10:00:22 -0400</pubDate><guid>https://am2.co/2021/10/12/t-sql-tuesday-143-my-favorite-short-scripts/</guid><description>&lt;p&gt;&lt;a href="https://johnmccormack.it/2021/10/t-sql-tuesday-143-short-code-examples/"&gt;&lt;img src="https://am2.co/wp-content/uploads/TSQLTuesday1.jpg" alt="T-SQL Tuesday logo" width="300" height="300" class="alignright size-full wp-image-395" /&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;blockquote&gt;For &lt;a href="https://johnmccormack.it/2021/10/t-sql-tuesday-143-short-code-examples/"&gt;this month's T-SQL Tuesday&lt;/a&gt;, John McCormack (&lt;a href="https://johnmccormack.it/" rel="noopener" target="_blank"&gt;blog&lt;/a&gt;|&lt;a href="https://twitter.com/actualjohn" rel="noopener" target="_blank"&gt;twitter&lt;/a&gt;) asks us: “What are your go-to short, handy scripts”? I've got so many handy dandy scripts, it was hard to choose.&lt;/blockquote&gt;&#10;&lt;h2 id="where-to-start"&gt;Where to start?&lt;/h2&gt;&#10;&lt;p&gt;I have so many go-to scripts that are short, amazing, and I use all the time. I&amp;rsquo;ve been using SQL Server since the turn of the century, and over the last two decades, I&amp;rsquo;ve found and written a lot of helpful things. And I have a terrible memory, so even if it&amp;rsquo;s just a few lines, I often keep it bookmarked or saved for when I need it. As an aside&amp;ndash;remember that having a folder of utility scripts isn&amp;rsquo;t a sign of weakness or incompetence. If anything, it&amp;rsquo;s the opposite&amp;ndash;those utility scripts are basically all battle scars for the database battles you&amp;rsquo;ve fought over your career. As we become senior, we just fine-tune our collection. With seniority, you don&amp;rsquo;t stop having that collection of scripts&amp;ndash;you just get better at curating them, at making them generic &amp;amp; reusable.&lt;/p&gt;</description></item><item><title>What time is it in Oz?</title><link>https://am2.co/2021/10/05/what-time-is-it-in-oz/</link><pubDate>Tue, 05 Oct 2021 15:54:03 -0400</pubDate><guid>https://am2.co/2021/10/05/what-time-is-it-in-oz/</guid><description>&lt;figure class="wp-caption alignright" style="max-width:300px"&gt;&lt;a href="https://www.youtube.com/watch?v=R4rpG-dipYA"&gt;&lt;img src="https://am2.co/wp-content/uploads/ElphiePup2-300x300.jpg" alt="Black dog wearing bandana standing on grass" width="300" height="300" class="size-medium wp-image-9493" /&gt;&lt;/a&gt; This is our puppy &lt;a href="https://en.wikipedia.org/wiki/Elphaba" rel="noopener" target="_blank"&gt;Elphaba&lt;/a&gt;. She's from &lt;a href="https://en.wikipedia.org/wiki/Name_of_Australia#Oz" rel="noopener" target="_blank"&gt;Oz&lt;/a&gt;...No, the &lt;a href="https://en.wikipedia.org/wiki/Land_of_Oz" rel="noopener" target="_blank"&gt;other Oz&lt;/a&gt;. She's &lt;a href="https://www.youtube.com/watch?v=R4rpG-dipYA" rel="noopener" target="_blank"&gt;popular&lt;/a&gt;.&lt;/figure&gt;&#10;&lt;p&gt;There was a &lt;a href="https://dba.stackexchange.com/q/300618/52344" rel="noopener" target="_blank"&gt;recent post on Database Administrators&lt;/a&gt;, where there was some confusion over Daylight Saving Time(DST) in Australian timezones. Let&amp;rsquo;s be honest though&amp;ndash;timezones are confusing, especially when DST comes into play. Arizona Time doesn&amp;rsquo;t observe Daylight Saving Time, so sometimes it&amp;rsquo;s the same as Mountain Time, and sometimes it&amp;rsquo;s Pacific Time.&lt;/p&gt;</description></item><item><title>Stop using sp_hexadecimal &amp; sp_help_revlogin</title><link>https://am2.co/2021/07/06/dba-serverlogins/</link><pubDate>Tue, 06 Jul 2021 09:00:52 -0400</pubDate><guid>https://am2.co/2021/07/06/dba-serverlogins/</guid><description>&lt;figure class="wp-caption alignright" style="max-width:400px"&gt;&lt;a href="https://vm.tiktok.com/ZMduBrPEB/" rel="noopener" target="_blank"&gt;&lt;img src="https://am2.co/wp-content/uploads/GreenCaterpillar.png" alt="" width="400" height="400" class="size-medium wp-image-8240" /&gt;&lt;/a&gt; Caterpillars transform into beautiful butterflies to realize their full self, much in the same way &lt;code&gt;CONVERT()&lt;/code&gt; changes binary into beautiful hexadecimal strings.&lt;/figure&gt;&#10;&lt;p&gt;Since &lt;a href="https://twitter.com/AMtwo/status/1384126645053771780" rel="noopener" target="_blank"&gt;I started at Stack Overflow&lt;/a&gt;, I&amp;rsquo;ve had the chance to see some of the interesting challenges with running our databases at our scale.&lt;/p&gt;</description></item><item><title>Blocking with OBJECT_NAME()</title><link>https://am2.co/2019/12/24/blocking-with-object_name/</link><pubDate>Tue, 24 Dec 2019 10:38:36 -0500</pubDate><guid>https://am2.co/2019/12/24/blocking-with-object_name/</guid><description>&lt;figure class="wp-caption alignright" style="max-width:512px"&gt;&lt;a href="https://www.youtube.com/watch?v=bphPp8k9aZo"&gt;&lt;img src="https://am2.co/wp-content/uploads/berkay-gumustekin-ngqyo2AYYnE-unsplash-1024x683.jpg" alt="" width="512" height="341" class="size-large wp-image-2392" /&gt;&lt;/a&gt; Doggos increase blog readership by 140%. 14/10. They are good doggos.&lt;/figure&gt;&#10;&lt;p&gt;As a DBA, you probably use the &lt;code&gt;OBJECT_NAME()&lt;/code&gt; function quite a bit. I know I do. If you aren&amp;rsquo;t familiar with it, you can read &lt;a href="https://docs.microsoft.com/en-us/sql/t-sql/functions/object-name-transact-sql?view=sql-server-ver15" rel="noopener noreferrer" target="_blank"&gt;the documentation&lt;/a&gt; if you want, but it&amp;rsquo;s a pretty straightforward function that converts object IDs into object names.&lt;/p&gt;</description></item><item><title>Code to purge data based on creation date</title><link>https://am2.co/2019/04/04/code-to-purge-data-on-creation-date/</link><pubDate>Thu, 04 Apr 2019 08:30:16 -0400</pubDate><guid>https://am2.co/2019/04/04/code-to-purge-data-on-creation-date/</guid><description>&lt;figure class="wp-caption alignright" style="max-width:678px"&gt;&lt;a href="https://www.youtube.com/watch?v=nHlJODYBLKs"&gt;&lt;img src="https://am2.co/wp-content/uploads/MarieKondoData-678x381.png" alt="" width="678" height="381" class="size-mh-magazine-lite-content wp-image-1743" /&gt;&lt;/a&gt; Only one thing can spark more joy than cleaning up old data. Doggos. &lt;/figure&gt;&#10;Yesterday, &lt;a href="https://am2.co/2019/04/03/purging-data-with-batched-deletes/"&gt;I talked about batching deletes&lt;/a&gt;, and the day before I talked about &lt;a href="https://am2.co/2019/04/02/the-thrill-of-purging-old-data/"&gt;how much I like to delete data&lt;/a&gt;, and why it's necessary to do it, despite being a data packrat.&#10;&lt;p&gt;Today, let&amp;rsquo;s look at just one scenario, and how I like to handle it. In my experience, this is one of the most common purge requirements (and probably the easiest), so first, let&amp;rsquo;s look at the business requirements.&lt;/p&gt;</description></item><item><title>TSQL Tuesday #104: dbo.Check_FileSize</title><link>https://am2.co/2018/07/09/tsql-tuesday-104/</link><pubDate>Mon, 09 Jul 2018 23:18:12 -0400</pubDate><guid>https://am2.co/2018/07/09/tsql-tuesday-104/</guid><description>&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=D04uazu547A"&gt;&lt;img class="alignright wp-image-532 size-full" src="https://am2.co/wp-content/uploads/TSQL2SDAY-300x300.png" alt="TSQL2SDAY" width="300" height="300" /&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;blockquote&gt;It’s T-SQL Tuesday,  the blog party that SQL Server expert &lt;strong&gt;Adam Machanic&lt;/strong&gt; (&lt;a href="http://dataeducation.com/blog/" target="_blank" rel="noopener noreferrer"&gt;blog&lt;/a&gt;|t&lt;a href="http://twitter.com/adammachanic" target="_blank" rel="noopener noreferrer"&gt;witter&lt;/a&gt;) started. This month’s episode is hosted by &lt;strong&gt;Bert Wagner&lt;/strong&gt; (&lt;a href="https:/bertwagner.com/" target="_blank" rel="noopener noreferrer"&gt;blog&lt;/a&gt; | &lt;a href="http://youtube.com/bertwagner" target="_blank" rel="noopener noreferrer"&gt;vlog&lt;/a&gt;| &lt;a href="https://twitter.com/bertwagner" target="_blank" rel="noopener noreferrer"&gt;twitter&lt;/a&gt;). The topic: &lt;strong&gt;&lt;a href="https://bertwagner.com/2018/07/03/code-youd-hate-to-live-without-t-sql-tuesday-104-invitation/" target="_blank" rel="noopener noreferrer"&gt;Code You Would Hate To Live Without &lt;/a&gt;&lt;/strong&gt;&lt;/blockquote&gt;&#10;&lt;p&gt;It&amp;rsquo;s been a little bit since the last T-SQL Tuesday I joined, when I blogged about religion &amp;amp; politics (aka, &lt;a href="https://am2.co/2018/02/13/tsql-tuesday-99-tabs-vs-spaces/"&gt;Tabs vs Spaces&lt;/a&gt;). When I saw Bert&amp;rsquo;s excellent topic this month, I decided I&amp;rsquo;d try to get back on the horse again and do join the blog party again this month.&lt;/p&gt;</description></item><item><title>Parsing file names from paths using T-SQL</title><link>https://am2.co/2018/01/17/parsing-file-names-paths-using-t-sql/</link><pubDate>Wed, 17 Jan 2018 07:00:40 -0500</pubDate><guid>https://am2.co/2018/01/17/parsing-file-names-paths-using-t-sql/</guid><description>&lt;figure class="wp-caption alignright" style="max-width:400px"&gt;&lt;a href="https://www.youtube.com/watch?v=ijTEn2q-jFM"&gt;&lt;img class="wp-image-1265" src="https://am2.co/wp-content/uploads/maarten-van-den-heuvel-73123-300x200.jpg" alt="" width="400" height="267" /&gt;&lt;/a&gt; These files are way neater than the ones on my laptop.&lt;/figure&gt;&#10;&lt;p&gt;SQL Server is great at a lot of things. I spend a lot of time blogging about all the cool things that SQL Server does. But (you knew there was a &amp;ldquo;but&amp;rdquo;, didn&amp;rsquo;t you) SQL Server isn&amp;rsquo;t great at everything. Lets write about something that SQL Server is bad at.&lt;/p&gt;</description></item><item><title>Finding active transactions</title><link>https://am2.co/2018/01/02/finding-active-transactions/</link><pubDate>Tue, 02 Jan 2018 09:04:07 -0500</pubDate><guid>https://am2.co/2018/01/02/finding-active-transactions/</guid><description>&lt;figure class="wp-caption alignright" style="max-width:400px"&gt;&lt;a href="http://amzn.to/2CDwuZP"&gt;&lt;img class="wp-image-1249" src="https://am2.co/wp-content/uploads/monika-grabkowska-452366-200x300.jpg" alt="" width="400" height="600" /&gt;&lt;/a&gt; Confessions of a carbaholic: When I start thinking about `ROLLBACK`, I start thinking about rolls.&lt;/figure&gt;&#10;&lt;p&gt;Have you ever forgot to commit a transaction? Maybe you&amp;rsquo;ve even &lt;a href="https://am2.co/2017/10/26/finding-leader-blocker/"&gt;left for lunch&lt;/a&gt; and caused a problem while you were gone. Uncommitted transactions can cause all sorts of problems&amp;ndash;not just blocking, but it can affect your Availability Groups &amp;amp; Mirroring, your TempDB version store if you&amp;rsquo;re using one of the snapshot &lt;a href="https://www.sql.kiwi/2014/07/isolation-levels/" target="_blank" rel="noopener noreferrer"&gt;isolation levels&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Alerting on SQL Server Blocking</title><link>https://am2.co/2017/12/18/alerting-sql-server-blocking/</link><pubDate>Mon, 18 Dec 2017 09:00:02 -0500</pubDate><guid>https://am2.co/2017/12/18/alerting-sql-server-blocking/</guid><description>&lt;figure class="wp-caption alignright" style="max-width:350px"&gt;&lt;a href="https://www.youtube.com/watch?v=KLWLTs90_po"&gt;&lt;img class="wp-image-1233" src="https://am2.co/wp-content/uploads/TrafficIntersection-683x1024.jpg" alt="" width="350" height="525" /&gt;&lt;/a&gt; When blocking becomes excessive, it can cause problems. Are your blocks excessive?&lt;/figure&gt;&#10;&lt;p&gt;Identifying blocking is one of the most basic things that a DBA should be monitoring for. I previously wrote about how to &lt;a href="https://am2.co/2017/10/26/finding-leader-blocker/"&gt;identify blocking in SQL Server and find the leading blocker&lt;/a&gt;. Recently, my friend Jim Donahoe (&lt;a href="http://sqlflipflopsdba.com/" target="_blank" rel="noopener noreferrer"&gt;blog&lt;/a&gt; | &lt;a href="https://twitter.com/SQLFlipFlopsDBA" target="_blank" rel="noopener noreferrer"&gt;twitter&lt;/a&gt;) asked me about setting up email alerts related to blocking, which prompted me to clean up some additional code I have that does just this. If you haven&amp;rsquo;t already read &lt;a href="https://am2.co/2017/10/26/finding-leader-blocker/"&gt;my previous post&lt;/a&gt;, you should probably do that now.&lt;/p&gt;</description></item><item><title>Finding the Leader Blocker</title><link>https://am2.co/2017/10/26/finding-leader-blocker/</link><pubDate>Thu, 26 Oct 2017 23:55:09 -0400</pubDate><guid>https://am2.co/2017/10/26/finding-leader-blocker/</guid><description>&lt;figure class="wp-caption alignright" style="max-width:500px"&gt;&lt;a href="https://www.youtube.com/watch?v=iHzzSao6ypE"&gt;&lt;img class="wp-image-1194" src="https://am2.co/wp-content/uploads/evgeny-tchebotarev-247145-300x200.jpg" alt="" width="500" height="334" /&gt;&lt;/a&gt; Who's at the front of the line blocking all the traffic?&lt;/figure&gt;&#10;&lt;p&gt;During the course of normal processing in a database, blocking happens. Blocking is &amp;ldquo;by design&amp;rdquo; because &lt;a href="https://en.wikipedia.org/wiki/ACID" target="_blank" rel="noopener noreferrer"&gt;your database is on ACID&lt;/a&gt;. In an OLTP database, most of your transactions are short in duration, so we expect blocking to also be short in duration. If blocking occurs for a long time, this can cause problems.&lt;/p&gt;</description></item><item><title>xp_sqlagent_enum_jobs alternative</title><link>https://am2.co/2016/02/18/xp_sqlagent_enum_jobs_alt/</link><pubDate>Thu, 18 Feb 2016 10:00:21 -0500</pubDate><guid>https://am2.co/2016/02/18/xp_sqlagent_enum_jobs_alt/</guid><description>&lt;h3&gt;What's &lt;code&gt;xp_sqlagent_enum_jobs&lt;/code&gt;?&lt;/h3&gt;&#10;If you landed on this post, I'm guessing you know the answer to this, so I'll be quick. `xp_sqlagent_enum_jobs` is an undocumented (and thus, unsupported) extended procedure that gives information on whether a job is currently running, when it last ran, when it runs next, etc.&#10;&lt;p&gt;The supported alternative is to use &lt;code&gt;sp_help_job&lt;/code&gt; (which calls &lt;code&gt;xp_sqlagent_enum_jobs&lt;/code&gt;), but &lt;code&gt;sp_help_job&lt;/code&gt; is difficult to use in automation because trying to do &lt;code&gt;INSERT #temp EXEC sp_help_job;&lt;/code&gt; will result in an error due to nested &lt;code&gt;INSERT...EXEC&lt;/code&gt; statements (Error 8164: &amp;ldquo;An INSERT EXEC statement cannot be nested.&amp;rdquo;). As a result, people often turn to calling the unsupported xp directly.&lt;/p&gt;</description></item><item><title>Planning for an outage: Phone numbers</title><link>https://am2.co/2015/09/15/who-ya-gonna-call/</link><pubDate>Tue, 15 Sep 2015 13:29:00 -0400</pubDate><guid>https://am2.co/2015/09/15/who-ya-gonna-call/</guid><description>&lt;h2 id="who-ya-gonna-call"&gt;Who ya gonna call?&lt;/h2&gt;&#10;&lt;blockquote&gt;&lt;i&gt;If there's somethin' strange in your neighborhood&#10;Who ya gonna call?&#10;If it's something weird and it won't look good&#10;Who ya gonna call?&lt;/i&gt;&lt;/blockquote&gt;&#10;&amp;nbsp;&#10;&lt;div style="clear: both; text-align: center;"&gt;&lt;a style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;" href="https://www.youtube.com/watch?v=vntAEVjPBzQ"&gt;&lt;img class="alignnone" src="https://am2.co/wp-content/uploads/2015/09/ghostbustercar-300x213.jpg" width="320" height="227" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&#10;This summer, they've been taping the &lt;a href="http://www.imdb.com/title/tt1289401/" target="_blank"&gt;new Ghostbusters movie&lt;/a&gt; in Boston. It's pretty cool to see the Ghostbusters car rolling through the city.&#10;&lt;p&gt;Unfortunately, the Ghostbusters aren&amp;rsquo;t the right person to call when something goes boom in your data center. I&amp;rsquo;m not saying I haven&amp;rsquo;t used ghosts and gremlins as part of a root cause analysis before&amp;ndash;but even Dan Aykroyd and Bill Murray can&amp;rsquo;t help you when there&amp;rsquo;s a storage or network issue. I&amp;rsquo;m skeptical that Kristen Wiig will be much better.&lt;/p&gt;</description></item><item><title>Formatting HTML emails in SQL</title><link>https://am2.co/2014/11/26/formatting-html-emails-in-sql/</link><pubDate>Wed, 26 Nov 2014 15:34:00 -0500</pubDate><guid>https://am2.co/2014/11/26/formatting-html-emails-in-sql/</guid><description>&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=RPoBE-E8VOc"&gt;&lt;img class="alignright wp-image-1224 size-mh-magazine-lite-content" src="https://am2.co/wp-content/uploads/nick-karvounis-381259-678x381.jpg" alt="" width="678" height="381" /&gt;&lt;/a&gt;When I am writing monitoring/alerting stored procedures for my SQL Servers, its important to have those alerts be well-formatted. I like to minimize the amount of time I spend sorting through emails &amp;amp; alerts, and part of that is making sure that I can determine the urgency &amp;amp; priority of an email alert at a mere glance. More importantly, it has to be equally useful to me at my desk &amp;amp; on my mobile.&lt;/p&gt;</description></item></channel></rss>