<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>SQL Server on cjsommer.com</title><link>https://www.cjsommer.com/tags/sql-server/</link><description>Recent content in SQL Server on cjsommer.com</description><generator>Hugo</generator><language>en</language><lastBuildDate>Tue, 13 Oct 2020 02:00:00 +0000</lastBuildDate><atom:link href="https://www.cjsommer.com/tags/sql-server/index.xml" rel="self" type="application/rss+xml"/><item><title>QDS Forced Plans - Gotchas and Limitations</title><link>https://www.cjsommer.com/post/2020-10-13-qds-gottchas/</link><pubDate>Tue, 13 Oct 2020 02:00:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2020-10-13-qds-gottchas/</guid><description>&lt;p&gt;Released with SQL Server 2016, Query Data Store (QDS) was a game changer for performance tuning. Right from Microsoft&amp;rsquo;s website: &lt;em&gt;The SQL Server Query Store feature provides you with insight on query plan choice and performance. It simplifies performance troubleshooting by helping you quickly find performance differences caused by query plan changes. Query Store automatically captures a history of queries, plans, and runtime statistics, and retains these for your review. It separates data by time windows so you can see database usage patterns and understand when query plan changes happened on the server.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>SQL Saturday 723, March 24, 2018 in Rochester, NY. Join us and kick your SQL Server knowledge up a notch!</title><link>https://www.cjsommer.com/post/2018-03-02-speaking-at-sqlsaturday-723/</link><pubDate>Fri, 02 Mar 2018 20:00:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2018-03-02-speaking-at-sqlsaturday-723/</guid><description>&lt;p&gt;If you are a SQL Server professional and are interested in spending a day with a bunch of other like-minded individuals, SQL Saturday is for you. It’s a day chock full of SQL Server related presentations given by other members of the community.&lt;/p&gt;
&lt;p&gt;&lt;!-- raw HTML omitted --&gt;&lt;!-- raw HTML omitted --&gt;&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;
&lt;p&gt;This year I&amp;rsquo;m excited to give 2 presentations!&lt;/p&gt;
&lt;p&gt;Painting with PowerShell. I&amp;rsquo;ve given this presentation before and am excited to be able to do it here again.
&lt;!-- raw HTML omitted --&gt;&lt;!-- raw HTML omitted --&gt;&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;</description></item><item><title>T-SQL Tuesday 96 - Folks Who Have Made a Difference</title><link>https://www.cjsommer.com/post/2017-11-14-tsql2sday-96-folks-who-made-a-difference/</link><pubDate>Tue, 14 Nov 2017 00:00:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2017-11-14-tsql2sday-96-folks-who-made-a-difference/</guid><description>&lt;h1 id="this-months-topic-folks-who-have-made-a-difference"&gt;This month’s topic: Folks Who Have Made a Difference&lt;/h1&gt;
&lt;p&gt;&lt;img src="https://www.cjsommer.com/img/TSQLTuesday.jpg" alt="T-SQL Tuesday"&gt;&lt;/p&gt;
&lt;p&gt;T-SQL Tuesday is a monthly blog party for the SQL Server community (or Microsoft Data Platform community. Although it’s called T-SQL Tuesday, it’s not limited to SQL Server database engine only). It is the brainchild of Adam Machanic (&lt;a href="http://sqlblog.com/blogs/adam_machanic/"&gt;blog&lt;/a&gt; | &lt;a href="https://twitter.com/AdamMachanic"&gt;twitter&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;This month&amp;rsquo;s T-SQL Tuesday is being hosted by Ewald Cress (&lt;a href="https://sqlonice.com/tsql-tuesday-96-folks-who-have-made-a-difference/"&gt;blog&lt;/a&gt; | &lt;a href="https://twitter.com/sqlOnIce"&gt;twitter&lt;/a&gt;). From his blog post:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;This month’s topic: Who inspires you in the data community? Give them a should out!?&lt;/em&gt;&lt;/p&gt;</description></item><item><title>T-SQL Tuesday 94 - Do you wanna get PoSh?</title><link>https://www.cjsommer.com/post/2017-09-11-tsql2sday-94-do-you-wanna-get-posh/</link><pubDate>Mon, 11 Sep 2017 00:00:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2017-09-11-tsql2sday-94-do-you-wanna-get-posh/</guid><description>&lt;h1 id="this-months-topic-lets-get-all-posh--what-are-you-going-to-automate-today"&gt;This month’s topic: Let’s get all Posh – What are you going to automate today?&lt;/h1&gt;
&lt;p&gt;&lt;img src="https://www.cjsommer.com/img/TSQLTuesday.jpg" alt="T-SQL Tuesday"&gt;&lt;/p&gt;
&lt;p&gt;T-SQL Tuesday is a monthly blog party for the SQL Server community (or Microsoft Data Platform community. Although it’s called T-SQL Tuesday, it’s not limited to SQL Server database engine only). It is the brainchild of Adam Machanic (&lt;a href="http://sqlblog.com/blogs/adam_machanic/"&gt;blog&lt;/a&gt; | &lt;a href="https://twitter.com/AdamMachanic"&gt;twitter&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;This month&amp;rsquo;s T-SQL Tuesday is being hosted by Rob Sewell (&lt;a href="https://sqldbawithabeard.com/2017/09/05/tsql2sday-94-lets-get-all-posh/?utm_content=buffere68cc&amp;amp;utm_medium=social&amp;amp;utm_source=twitter.com&amp;amp;utm_campaign=buffer"&gt;blog&lt;/a&gt; | &lt;a href="https://twitter.com/sqldbawithbeard"&gt;twitter&lt;/a&gt;). From his blog post:&lt;/p&gt;</description></item><item><title>What I Learned Today - Configuring tempdb in RDS</title><link>https://www.cjsommer.com/post/2017-08-28-wilt-configure-tempdb-rds/</link><pubDate>Mon, 28 Aug 2017 00:00:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2017-08-28-wilt-configure-tempdb-rds/</guid><description>&lt;h1 id="today-i-learned-that-you-can-configure-tempdb-in-rds"&gt;Today I learned that you can configure tempdb in RDS!&lt;/h1&gt;
&lt;p&gt;One of the things we DBA&amp;rsquo;s do is configure tempdb to have multiple data files (if needed). Not going to go into the depths of why in this post, but adding multiple data files can help alleviate contention in tempdb. Until today I didn&amp;rsquo;t think you could do this in RDS. I guess I hadn&amp;rsquo;t even tried because you can&amp;rsquo;t do anything to master, model or the msdb databases, so I just assumed tempdb was off limits as well.&lt;/p&gt;</description></item><item><title>Beware the automated backup window when running native SQL Server backups in RDS</title><link>https://www.cjsommer.com/post/2017-08-04-rds-beware-backup-window/</link><pubDate>Fri, 04 Aug 2017 00:00:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2017-08-04-rds-beware-backup-window/</guid><description>&lt;h1 id="beware-the-automated-backup-window-when-running-native-sql-server-backups-in-rds"&gt;Beware the automated backup window when running native SQL Server backups in RDS&lt;/h1&gt;
&lt;p&gt;If you&amp;rsquo;ve ever fired up an RDS instance you know you can set an automated backup window for your instance. During this window Amazon will kick off an automated snapshot of your RDS instance each day. Set it and forget it. Kinda nice. Backups are good, right?&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;&lt;!-- raw HTML omitted --&gt;&lt;a href="http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/SQLServer.Procedural.Importing.html"&gt;http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/SQLServer.Procedural.Importing.html&lt;/a&gt;&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;</description></item><item><title>SQL Saturday 622. Join me July 29, 2017 in Albany, NY and learn to Paint with PowerShell!</title><link>https://www.cjsommer.com/post/2017-06-13-speaking-at-sqlsaturday-622/</link><pubDate>Tue, 13 Jun 2017 20:00:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2017-06-13-speaking-at-sqlsaturday-622/</guid><description>&lt;p&gt;If you are a SQL Server professional and are interested in spending a day with a bunch of other like-minded individuals, SQL Saturday is for you. It’s a day chock full of SQL Server related presentations given by other members of the community.&lt;/p&gt;
&lt;p&gt;&lt;!-- raw HTML omitted --&gt;&lt;!-- raw HTML omitted --&gt;&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;
&lt;p&gt;Here is a glimpse of my presentation on SQL Server Automation using PowerShell taken from the SQL Saturday event page.&lt;/p&gt;</description></item><item><title>T-SQL Tuesday 90 - Shipping Database Changes</title><link>https://www.cjsommer.com/post/2017-05-09-deployment-protection-database-snapshots/</link><pubDate>Tue, 09 May 2017 20:00:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2017-05-09-deployment-protection-database-snapshots/</guid><description>&lt;p&gt;T-SQL Tuesday is a monthly blog party for the SQL Server community (or Microsoft Data Platform community. Although it’s called T-SQL Tuesday, it’s not limited to SQL Server database engine only). It is the brainchild of Adam Machanic &lt;a href="http://sqlblog.com/blogs/adam_machanic/"&gt;blog&lt;/a&gt; | &lt;a href="https://twitter.com/AdamMachanic"&gt;twitter&lt;/a&gt;.&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;This month&amp;rsquo;s tsql2sday is being hosted by James Anderson &lt;a href="http://thedatabaseavenger.com/2017/05/t-sql-tuesday-shipping-database-changes/"&gt;blog&lt;/a&gt; |&lt;a href="https://twitter.com/DatabaseAvenger"&gt;twitter&lt;/a&gt; and this month&amp;rsquo;s theme is &amp;ldquo;Shipping Database Changes&amp;rdquo;. For this T-SQL Tuesday, I’d like to hear about your thoughts or experiences with database deployments.&lt;/p&gt;</description></item><item><title>T-SQL Tuesday 89 - The times they are a changing!</title><link>https://www.cjsommer.com/post/2017-04-11-t-sql-tuesday-89-times-they-are-a-changing/</link><pubDate>Tue, 11 Apr 2017 10:00:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2017-04-11-t-sql-tuesday-89-times-they-are-a-changing/</guid><description>&lt;p&gt;T-SQL Tuesday is a monthly blog party for the SQL Server community (or Microsoft Data Platform community. Although it’s called T-SQL Tuesday, it’s not limited to SQL Server database engine only). It is the brainchild of Adam Machanic &lt;a href="http://sqlblog.com/blogs/adam_machanic/"&gt;blog&lt;/a&gt; | &lt;a href="https://twitter.com/AdamMachanic"&gt;twitter&lt;/a&gt;.&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;This month&amp;rsquo;s tsql2sday is being hosted by Koen Verbeeck &lt;a href="http://sqlkover.com/t-sql-tuesday-89-invitation-the-times-they-are-a-changing/"&gt;blog&lt;/a&gt; |&lt;a href="https://twitter.com/Ko_Ver"&gt;twitter&lt;/a&gt; and the topic is &amp;ldquo;The times they are a changing&amp;rdquo;. Basically, how are you handling the ever changing landscape of the SQL DBA. It&amp;rsquo;s a brave new world and the days of the point-n-click, drag-n-drop administrator are fleeting. Installing SQL Server. Checking backup. Performing health checks. A Jedi-DBA craves not these things!&lt;/p&gt;</description></item><item><title>SQL Saturday 619. Join me April 29, 2017 in Rochester, NY and learn to Paint with PowerShell!</title><link>https://www.cjsommer.com/post/2017-03-27-speaking-at-sqlsaturday-619/</link><pubDate>Mon, 27 Mar 2017 20:00:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2017-03-27-speaking-at-sqlsaturday-619/</guid><description>&lt;p&gt;If you are a SQL Server professional and are interested in spending a day with a bunch of other like-minded individuals, SQL Saturday is for you. It’s a day chock full of SQL Server related presentations given by other members of the community.&lt;/p&gt;
&lt;p&gt;&lt;!-- raw HTML omitted --&gt;&lt;!-- raw HTML omitted --&gt;&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;
&lt;p&gt;Here is a glimpse of my presentation on SQL Server Automation using PowerShell taken from the SQL Saturday event page.&lt;/p&gt;</description></item><item><title>SQL Browser, what is it good for? Absolutely something!</title><link>https://www.cjsommer.com/post/2017-03-08-sql-browser-what-is-it-good-for-absolutely-something/</link><pubDate>Wed, 08 Mar 2017 10:00:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2017-03-08-sql-browser-what-is-it-good-for-absolutely-something/</guid><description>&lt;p&gt;Another great teaching opportunity landed in my lap this week. I got an email from a coworker looking for some help troubleshooting a SQL connection issue. He had an application server that could not connect to one of our SQL Servers.&lt;/p&gt;
&lt;p&gt;We have a fairly complex and secure network environment. Multiple networks across multiple data centers with multiple firewalls in between. Because of this, one of the first things I typically look at is connectivity between application and database servers. The following question/answer session is how I attacked this particular problem, which led me to the actual issue.&lt;/p&gt;</description></item><item><title>How the SQL Agent Job schedule_uid broke my heart, and my jobs!</title><link>https://www.cjsommer.com/post/2017-02-03-how-the-sql-agent-job-schedule_uid-broke-my-heart-and-my-jobs/</link><pubDate>Fri, 03 Feb 2017 12:15:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2017-02-03-how-the-sql-agent-job-schedule_uid-broke-my-heart-and-my-jobs/</guid><description>&lt;p&gt;This is something that has caused me some grief in my life as a DBA. I hesitate to call it a bug, but this little gottcha resurfaced in a change that was submitted by a teammate just today. So I wanted to share while it was fresh in my mind.&lt;/p&gt;
&lt;p&gt;When you script out a SQL Agent Job you&amp;rsquo;ll notice that the job schedule will have a schedule_uid parameter (providing your job has a schedule). The gottcha lies in that schedule_uid. If you create another job schedule with the same schedule_uid, it will overwrite the schedule for any jobs that are using it. i.e. Any other jobs that are using that schedule_uid will start using the new schedule. Normally I consider UID&amp;rsquo;s as very unique and chances of a collision are low, but if you do a fair amount of copying jobs between SQL Servers there&amp;rsquo;s a good chance this will bite you eventually. That&amp;rsquo;s what happened to us (more than once).&lt;/p&gt;</description></item><item><title>T-SQL Tuesday 85 - Backup &amp; Recovery</title><link>https://www.cjsommer.com/post/2016-12-13-t-sql-tuesday-85-backup-recovery/</link><pubDate>Tue, 13 Dec 2016 10:00:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2016-12-13-t-sql-tuesday-85-backup-recovery/</guid><description>&lt;!-- raw HTML omitted --&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;!-- raw HTML omitted --&gt;</description></item><item><title>T-SQL Tuesday 84 - Growing New Speakers</title><link>https://www.cjsommer.com/post/2016-11-08-tsql-tuesday-84/</link><pubDate>Tue, 08 Nov 2016 09:00:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2016-11-08-tsql-tuesday-84/</guid><description>&lt;!-- raw HTML omitted --&gt;</description></item><item><title>Ponderings of PASS Summit 2016</title><link>https://www.cjsommer.com/post/2016-11-03-ponderings-of-pass-summit-2016/</link><pubDate>Thu, 03 Nov 2016 09:00:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2016-11-03-ponderings-of-pass-summit-2016/</guid><description>&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;Summit 2013 in Charlotte, NC was my first and I remember it well. I went with 4 other people from my company but I was pretty new to the SQL PASS community (otherwise known as #sqlfamily). As a matter of fact I didn&amp;rsquo;t even know what #sqlfamily was at this point. I went to all of the PASS sponsored events like the welcome reception, the vendor party and yes the NASCAR party (which being a NASCAR fan was awesome). I went to all of the sessions and generally hung out with the other people from my company. I did get a taste of the after-life a bit, but for the most part I stayed in my comfort zone.&lt;/p&gt;</description></item><item><title>Convert User Friendly Retention to DateTime value with PowerShell</title><link>https://www.cjsommer.com/post/2016-10-25-convert-user-friendly-retention-to-datetime-value-with-powershell/</link><pubDate>Tue, 25 Oct 2016 12:00:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2016-10-25-convert-user-friendly-retention-to-datetime-value-with-powershell/</guid><description>&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;I think the title is fairly descriptive so let me put a little context around it for you. In my SQL Server environment we backup our databases to local disk. Unfortunately we don&amp;rsquo;t have unlimited storage for backups, which means we have to delete the old backups on a regular basis. A very typical practice in the SQL DBA world.&lt;/p&gt;
&lt;p&gt;I was writing a new cmdlet for &lt;!-- raw HTML omitted --&gt;dbatools.io&lt;!-- raw HTML omitted --&gt; (Remove-DbaBackup to be released in October) and needed to decide how I wanted users to provide the retention for their SQL backups. I&amp;rsquo;ve seen a very wide range of backup retention requirements in my career (hours, days, weeks, months, years). I could have coded to the least common denominator of hours and greatly simplified my work, but I wanted to find a more flexible and elegant solution. The last thing I wanted was for people to have to fire up calc.exe, or worse yet having to take off their shoes to figure out how many hours were in a month. This is the function I came up with to create a more user friendly experience with my cmdlet.&lt;/p&gt;</description></item><item><title>Who owns your availability groups?</title><link>https://www.cjsommer.com/post/2016-10-20-who-owns-your-availability-groups/</link><pubDate>Thu, 20 Oct 2016 09:00:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2016-10-20-who-owns-your-availability-groups/</guid><description>&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;Availability groups have owners, just like every other object in SQL Server. The owner sid is found in sys.availability_replicas. The script below will map those sids to an actual principal name, and display the owners for all AG&amp;rsquo;s on the replica where you run it. You can run this on both the PRIMARY and SECONDARY replicas, which we have discovered may or may not be consistent. Regardless, you should see an owner for every AG on your SQL Server.&lt;/p&gt;</description></item><item><title>T-SQL Tuesday 83 - How are we still dealing with the same problems?</title><link>https://www.cjsommer.com/post/2016-10-11-t-sql-tuesday-83-how-are-we-still-dealing-with-the-same-problems/</link><pubDate>Tue, 11 Oct 2016 16:26:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2016-10-11-t-sql-tuesday-83-how-are-we-still-dealing-with-the-same-problems/</guid><description>&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;#TSQL2SDAY is a monthly blog party hosted by a different blogger each month. This blog party was started by Adam Machanic (&lt;!-- raw HTML omitted --&gt;blog&lt;!-- raw HTML omitted --&gt;|&lt;!-- raw HTML omitted --&gt;twitter&lt;!-- raw HTML omitted --&gt;). You can take part by posting your own participating post that fits the topic of the month and follows the requirements below. Additionally, if you are interested in hosting a future T-SQL Tuesday, contact Adam Machanic on his blog.&lt;/p&gt;</description></item><item><title>Speaking at SQL Saturday 513 in Albany, NY on July 30th - PowerShell and SQL Server</title><link>https://www.cjsommer.com/post/2016-07-18-speaking-at-sql-saturday-513-in-albany-ny-on-july-30th-powershell-and-sql-server/</link><pubDate>Mon, 18 Jul 2016 14:39:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2016-07-18-speaking-at-sql-saturday-513-in-albany-ny-on-july-30th-powershell-and-sql-server/</guid><description>&lt;p&gt;&lt;!-- raw HTML omitted --&gt;&lt;!-- raw HTML omitted --&gt;&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;
&lt;p&gt;If you are a SQL Server professional and are interested in spending a day with a bunch of other like-minded individuals, SQL Saturday is for you. It’s a day chock full of SQL Server related presentations given by other members of the community.&lt;/p&gt;
&lt;p&gt;Here is a glimpse of my presentation on SQL Server Automation using PowerShell taken from the SQL Saturday event page.&lt;/p&gt;</description></item><item><title>Comparing databases using SSDT</title><link>https://www.cjsommer.com/post/2016-06-23-comparing-databases-using-ssdt/</link><pubDate>Thu, 23 Jun 2016 13:05:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2016-06-23-comparing-databases-using-ssdt/</guid><description>&lt;p&gt;Another Twitter-born blog post! I love getting new ideas from the community. Real world ideas for solving real world problems!&lt;/p&gt;
&lt;p&gt;&lt;!-- raw HTML omitted --&gt;&lt;!-- raw HTML omitted --&gt;&lt;!-- raw HTML omitted --&gt;
The original question was &amp;ldquo;&lt;!-- raw HTML omitted --&gt;Does SQL Compare or others prods allow me to compare 1 &amp;ldquo;gold&amp;rdquo; db to the 57 &amp;ldquo;identical&amp;rdquo; databases in prod at once? asking for a friend ;)&lt;!-- raw HTML omitted --&gt;&amp;rdquo;. The original question and link to the twitter feed is off to the right.&lt;/p&gt;</description></item><item><title>Painting with PowerShell SQL Server Administration</title><link>https://www.cjsommer.com/post/2016-06-06-painting-with-powershell-sql-server-administration/</link><pubDate>Mon, 06 Jun 2016 13:04:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2016-06-06-painting-with-powershell-sql-server-administration/</guid><description>&lt;p&gt;&lt;!-- raw HTML omitted --&gt;&lt;!-- raw HTML omitted --&gt;&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;
&lt;p&gt;This blog post is just a quick follow from my presentation last week for the SQL PASS &lt;!-- raw HTML omitted --&gt;PowerShell Virtual Chapter&lt;!-- raw HTML omitted --&gt;.&lt;/p&gt;
&lt;p&gt;&lt;!-- raw HTML omitted --&gt;&lt;!-- raw HTML omitted --&gt;&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;
&lt;p&gt;Here is a link to the &lt;!-- raw HTML omitted --&gt;YouTube Video&lt;!-- raw HTML omitted --&gt; of the presentation.&lt;/p&gt;</description></item><item><title>Speaking at SQL Saturday 526 in Rochester on May 14, 2016</title><link>https://www.cjsommer.com/post/2016-04-12-speaking-at-sql-saturday-526-in-rochester-on-may-14-2016/</link><pubDate>Tue, 12 Apr 2016 11:00:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2016-04-12-speaking-at-sql-saturday-526-in-rochester-on-may-14-2016/</guid><description>&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;If you are a SQL Server professional and are interested in spending a day with a bunch of other like-minded individuals, SQL Saturday is for you. It&amp;rsquo;s a day chock full of SQL Server related presentations given by other members of the community.&lt;/p&gt;
&lt;p&gt;Here is a glimpse of my presentation on SQL Server Automation using PowerShell taken from the SQL Saturday event page.&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;If PowerShell isn&amp;rsquo;t your thing that&amp;rsquo;s OK. There are plenty of other topics to choose from. With sessions geared toward Database Development, Database Administration, Business Intellignece, Database Security and even Professional Development, SQL Saturday offers a wide variety of content for everyone.&lt;/p&gt;</description></item><item><title>Use PowerShell to script existing Availability Group creation scripts!</title><link>https://www.cjsommer.com/post/2016-04-04-use-powershell-to-script-existing-availability-group-creation-scripts/</link><pubDate>Mon, 04 Apr 2016 10:00:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2016-04-04-use-powershell-to-script-existing-availability-group-creation-scripts/</guid><description>&lt;p&gt;Scripts that write scripts! One of my favorites!&lt;/p&gt;
&lt;p&gt;So last night I was up working on an issue with an Availability Group. For whatever reason the cluster resource for the AG would not come online. Looking in SSMS the AG&amp;rsquo;s on both replicas were stuck in &amp;ldquo;Resolving&amp;rdquo;. I beat on the keyboard for almost 2 hours before deciding that rebuilding the AG was my best option. The databases were down and the birds were starting to chirp and I needed to get them back online.&lt;/p&gt;</description></item><item><title>Speaking at SQL Saturday 487 in Ottawa on April 16, 2016</title><link>https://www.cjsommer.com/post/2016-04-03-speaking-at-sql-saturday-487-in-ottawa-on-april-16-2016/</link><pubDate>Sun, 03 Apr 2016 13:42:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2016-04-03-speaking-at-sql-saturday-487-in-ottawa-on-april-16-2016/</guid><description>&lt;p&gt;&lt;!-- raw HTML omitted --&gt;&amp;lt;img alt=&amp;rsquo;&amp;rsquo; class=&amp;lsquo;alignright size-full wp-image-1238 &amp;lsquo;src=&amp;rsquo;/img/2016/04/img_570152b22dc45.png&amp;rsquo; /&amp;gt;&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;
&lt;p&gt;If you are a SQL Server professional and are interested in spending a day with a bunch of other like-minded individuals, SQL Saturday is for you. It&amp;rsquo;s a day chock full of SQL Server related presentations given by other members of the community.&lt;/p&gt;
&lt;p&gt;Here is a glimpse of my presentation on SQL Server Automation using PowerShell taken from the SQL Saturday event page.&lt;/p&gt;</description></item><item><title>Announcing SQL Server on Linux</title><link>https://www.cjsommer.com/post/2016-03-08-announcing-sql-server-on-linux/</link><pubDate>Tue, 08 Mar 2016 09:10:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2016-03-08-announcing-sql-server-on-linux/</guid><description>&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;&lt;!-- raw HTML omitted --&gt;&lt;a href="http://blogs.microsoft.com/blog/2016/03/07/announcing-sql-server-on-linux/"&gt;http://blogs.microsoft.com/blog/2016/03/07/announcing-sql-server-on-linux/&lt;/a&gt;&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;
&lt;p&gt;&lt;!-- raw HTML omitted --&gt;Today I’m excited to announce our plans to bring SQL Server to Linux as well. This will enable SQL Server to deliver a consistent data platform across Windows Server and Linux, as well as on-premises and cloud. We are bringing the core relational database capabilities to preview today, and are targeting availability in mid-2017.&lt;/p&gt;</description></item><item><title>Slow Running Query? Where do I Begin?</title><link>https://www.cjsommer.com/post/2015-12-29-slow-running-query-where-do-i-begin/</link><pubDate>Tue, 29 Dec 2015 14:27:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2015-12-29-slow-running-query-where-do-i-begin/</guid><description>&lt;p&gt;Maybe you&amp;rsquo;re new to SQL Server or maybe you&amp;rsquo;re just expanding into performance tuning a little more. Query tuning can be a very daunting task and sometimes it&amp;rsquo;s hard to decide where to look first. In this post I am going to show you a couple of my go-to methods for troubleshooting slow performing queries in SQL Server. This is not a &amp;ldquo;ZOMG my SQL Server is slow&amp;rdquo; list. This post is more geared to when I have been tasked to dig into a very specific query. This isn&amp;rsquo;t a be-all-end-all list, but its a good place to start and has served me well.&lt;/p&gt;</description></item><item><title>T-SQL Tuesday 73 – Naughty or Nice?</title><link>https://www.cjsommer.com/post/2015-12-08-t-sql-tuesday-73-naughty-or-nice/</link><pubDate>Tue, 08 Dec 2015 21:43:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2015-12-08-t-sql-tuesday-73-naughty-or-nice/</guid><description>&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;&lt;!-- raw HTML omitted --&gt;As you work with SQL Server look around you. Is your environment Naughty or Nice? If it is Naughty what’s wrong with it? What would you do to fix it? Do you have a scrooge that is giving you the Christmas chills? Perhaps you have servers of past, present, and future haunting you. Maybe you are looking at SQL Server 2016 like some bright shining star in the east.&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;</description></item><item><title>Identity Column Increment Value (EVEN/ODD)</title><link>https://www.cjsommer.com/post/2015-11-17-identity-column-increment-value-evenodd/</link><pubDate>Tue, 17 Nov 2015 22:11:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2015-11-17-identity-column-increment-value-evenodd/</guid><description>&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;&lt;!-- raw HTML omitted --&gt;&amp;ldquo;Hey DBA&amp;rsquo;s, I have a thought about a really creative solution to this really hard problem. I have two tables in my database and each has an identity column, each of which is currently incrementing by 1. I&amp;rsquo;d like to change each to increment by 2. Also, one of the tables will need to only contain ODD numbered values, and the other will need to only contain EVEN numbered values. This will help me solve my really hard problem.&amp;quot;&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;</description></item><item><title>Using Extended Events to Detect Connection Pooling</title><link>https://www.cjsommer.com/post/2015-10-20-using-extended-events-to-detect-connection-pooling/</link><pubDate>Tue, 20 Oct 2015 09:15:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2015-10-20-using-extended-events-to-detect-connection-pooling/</guid><description>&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;&lt;!-- raw HTML omitted --&gt;Connecting to a data source can be time consuming. To minimize the cost of opening connections, ADO.NET uses an optimization technique called connection pooling, which minimizes the cost of repeatedly opening and closing connections. Connection pooling is handled differently for the .NET Framework data providers.&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;
&lt;p&gt;Opening connections is a very expensive and time consuming operation. Connection pooling helps alleviate that by providing a reusable &amp;ldquo;pool&amp;rdquo; of connections that your application can share. Connection pooling is usually a good thing. Unfortunately I have found that it&amp;rsquo;s sometimes not very well understood. This blog post starts with a short story&amp;hellip;&lt;/p&gt;</description></item><item><title>Running Parameterized Queries against SQL Server using PowerShell</title><link>https://www.cjsommer.com/post/2015-10-13-running-parameterized-queries-against-sql-server-using-powershell/</link><pubDate>Tue, 13 Oct 2015 09:00:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2015-10-13-running-parameterized-queries-against-sql-server-using-powershell/</guid><description>&lt;p&gt;For many years I didn&amp;rsquo;t really think about the implications of how I was retrieving data from my SQL Servers in PowerShell. I was just happy that I was able to retrieve the data! As I learned more about SQL Server I started to think of things like SQL injection and using parameterized queries to promote plan reuse.&lt;/p&gt;
&lt;p&gt;I went back and looked at some of the old PowerShell scripts that I had written and found that I was way off! Most of the old scripts would be prime candidates for SQL Injection. I wasn&amp;rsquo;t really concerned early on because I was the one running my scripts and passing in the parameters, but as my scripts became more automated and database driven, they became more vulnerable to SQL Injection. And parameterized queries? What the heck is a parameterized query? I had no clue when I first started out.&lt;/p&gt;</description></item><item><title>Pratical Use of a SQL Server Database Snapshot</title><link>https://www.cjsommer.com/post/2015-09-23-practical-use-of-database-snapshots/</link><pubDate>Wed, 23 Sep 2015 09:15:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2015-09-23-practical-use-of-database-snapshots/</guid><description>&lt;p&gt;I was doing a database code deployment the other night and the first step in the release plan was &amp;ldquo;Take a full database backup in case we have to roll back the deployment&amp;rdquo;. The database in question was about 100 GB in size, so not huge, but not small either. On our current hardware a full backup takes anywhere from 15-20 minutes on average. That&amp;rsquo;s 15-20 minutes longer than it needed to be because I knew there was a better way to offer that same rollback protection. The database snapshot.&lt;/p&gt;</description></item><item><title>TSQL2SDAY 70 - Strategies for managing an enterprise</title><link>https://www.cjsommer.com/post/2015-09-08-tsql2sday-70-strategies-for-managing-an-enterprise/</link><pubDate>Tue, 08 Sep 2015 14:11:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2015-09-08-tsql2sday-70-strategies-for-managing-an-enterprise/</guid><description>&lt;p&gt;&lt;!-- raw HTML omitted --&gt;&lt;!-- raw HTML omitted --&gt;&lt;!-- raw HTML omitted --&gt;
Thanks to MidnightDBA (&lt;!-- raw HTML omitted --&gt;b&lt;!-- raw HTML omitted --&gt;/&lt;!-- raw HTML omitted --&gt;t&lt;!-- raw HTML omitted --&gt;) for hosting this month&amp;rsquo;s #tsql2sday.&lt;/p&gt;
&lt;p&gt;&lt;!-- raw HTML omitted --&gt;Strategies for managing an enterprise.&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;
&lt;p&gt;What do you think of when you hear the word enterprise? I used to think mainframes and big iron. I would think of sprawling server rooms with dozens of server racks. I used to think monstrous storage arrays and backup tape libraries as far as the eye could see. I used to think of a large employee base. For me the word enterprise used to correlate to size, but I don&amp;rsquo;t think that any more&amp;hellip;&lt;/p&gt;</description></item><item><title>Present at SQL Saturday</title><link>https://www.cjsommer.com/post/2015-07-28-present-at-sql-saturday-386-achievement-unlocked/</link><pubDate>Tue, 28 Jul 2015 08:00:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2015-07-28-present-at-sql-saturday-386-achievement-unlocked/</guid><description>&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;I have nothing but wonderful things to say about the SQL Saturday 386 leadership and the army of volunteers they brought along. It was a very well run event. The venue was nice, everything was very well organized, the people were amazingly helpful and friendly, and it made the perfect place for me to turn my presentation up a notch. It&amp;rsquo;s amazing how much of a calming effect can be felt when you are surrounded by such an inviting and amazing group of people. That&amp;rsquo;s really something that I love about the SQL Server community in general.&lt;/p&gt;</description></item><item><title>T-SQL Tuesday 68 - Just Say No to Defaults</title><link>https://www.cjsommer.com/post/2015-07-14-t-sql-tuesday-68-just-say-no-to-defaults/</link><pubDate>Tue, 14 Jul 2015 08:00:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2015-07-14-t-sql-tuesday-68-just-say-no-to-defaults/</guid><description>&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;&lt;!-- raw HTML omitted --&gt;&lt;!-- raw HTML omitted --&gt;&lt;!-- raw HTML omitted --&gt;
Here is a link to the official #tsql2sday invitation from &lt;!-- raw HTML omitted --&gt;Andy Yun&amp;rsquo;s Blog&lt;!-- raw HTML omitted --&gt;. This month&amp;rsquo;s subject is &amp;ldquo;Just Say No to Defaults&amp;rdquo;. If you&amp;rsquo;ve read my blog at all you will know that I have a slight obsession with SQL Server and PowerShell. As far as I am concerned PowerShell is the new gold standard when it comes to scripting and automation in the Windows environment. Add a sprinkle of SQL Server with the SQL Server PowerShell module (SQLPS) and you have a deadly combination as a DBA.&lt;/p&gt;</description></item><item><title>SQL Server Policy Based Management by Example</title><link>https://www.cjsommer.com/post/2015-06-16-sql-server-pbm-by-example/</link><pubDate>Tue, 16 Jun 2015 08:30:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2015-06-16-sql-server-pbm-by-example/</guid><description>&lt;p&gt;What steps do you go through to validate SQL Server configurations after a server build? Even a single server can take some time and is also prone to human error. Have you ever needed to validate a configuration setting across all of the SQL Servers in your environment? If your environment is big enough, doing this manually isn&amp;rsquo;t even a realistic option. Policy Based Management excels at these things. Introduced in SQL Server 2008, it can definitely help DBA&amp;rsquo;s manage their ever growing environments.&lt;/p&gt;</description></item><item><title>Free SQL Server Performance Testing Utilities</title><link>https://www.cjsommer.com/post/2015-06-02-free-sql-server-performance-testing-utilities/</link><pubDate>Tue, 02 Jun 2015 08:15:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2015-06-02-free-sql-server-performance-testing-utilities/</guid><description>&lt;p&gt;Did that say free? Why yes, yes it did! But don&amp;rsquo;t let the price tag fool ya, these are some pretty nice little utilities.
&lt;!-- raw HTML omitted --&gt;&lt;!-- raw HTML omitted --&gt;&lt;!-- raw HTML omitted --&gt;
Another blog post inspired by a question on Twitter.&lt;/p&gt;
&lt;p&gt;I went to SQL Saturday #383 a few weeks ago and noticed a handful of performance testing utilities being mentioned or used during many of the presentations. I have seen them all mentioned or used in demos before, but I have very little experience using them myself. I thought it would be nice to gather them all in one place for future reference, and I can definitely foresee a more in depth review of each down the road.&lt;/p&gt;</description></item><item><title>SQL Agent Job Wrapper Part 3 - Handing the Errors in the Wrapper Script</title><link>https://www.cjsommer.com/post/2015-05-26-sql-agent-job-wrapper-part3-error-handling/</link><pubDate>Tue, 26 May 2015 08:15:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2015-05-26-sql-agent-job-wrapper-part3-error-handling/</guid><description>&lt;p&gt;This is the 3rd installment in a small series of blog posts on how to create a PowerShell wrapper for running SQL Server Agent Jobs. Here are the links to the 2 previous posts and I recommend reading them because all of the posts build on the previous one.&lt;/p&gt;
&lt;p&gt;&lt;!-- raw HTML omitted --&gt;Creating a SQL Agent Job Wrapper with PowerShell and SMO - Part 1&lt;!-- raw HTML omitted --&gt;
&lt;!-- raw HTML omitted --&gt;SQL Agent Job Wrapper Part 2 – Adding Error Generation to the Cmdlet&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;</description></item><item><title>SQL Agent Job Wrapper Part 2 - Adding Error Generation to the Cmdlet</title><link>https://www.cjsommer.com/post/2015-05-20-sql-agent-job-wrapper-part2-error-generation/</link><pubDate>Wed, 20 May 2015 08:15:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2015-05-20-sql-agent-job-wrapper-part2-error-generation/</guid><description>&lt;p&gt;Last week I posted &lt;!-- raw HTML omitted --&gt;Creating a SQL Agent Job Wrapper with PowerShell and SMO&lt;!-- raw HTML omitted --&gt;. In that post I created a couple PowerShell scripts that run a SQL Agent job and wait for it to complete before exiting. That process could be called from the command line, or even from a 3rd party job scheduler if you were so inclined. I recommend checking it out before you continue, because this is a continuation of that post.&lt;/p&gt;</description></item><item><title>Creating a SQL Agent Job Wrapper with PowerShell and SMO</title><link>https://www.cjsommer.com/post/2015-05-13-creating-a-sql-agent-job-wrapper-with-powershell-and-smo/</link><pubDate>Wed, 13 May 2015 08:00:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2015-05-13-creating-a-sql-agent-job-wrapper-with-powershell-and-smo/</guid><description>&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;I&amp;rsquo;ve seen this question asked a number of times over the past couple weeks and I thought I would share an approach using PowerShell and SMO. But first, let&amp;rsquo;s take a step back and try to understand why someone would want to do this. What&amp;rsquo;s wrong with SQL Agent?&lt;/p&gt;
&lt;p&gt;Well there&amp;rsquo;s really nothing wrong with SQL Agent. The main reason I have seen people asking this question is because their company is looking into using an enterprise job scheduler. An enterprise job scheduler gives an operations group a single location to manage jobs across their whole environment. It allows them to see all the moving parts from a batch processing perspective, even across dissimilar platforms. It also allows them to create more complex workflows across multiple platforms.&lt;/p&gt;</description></item><item><title>T-SQL Tuesday 66 - Monitoring</title><link>https://www.cjsommer.com/post/2015-05-12-t-sql-tuesday-66-monitoring/</link><pubDate>Tue, 12 May 2015 08:25:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2015-05-12-t-sql-tuesday-66-monitoring/</guid><description>&lt;p&gt;Thank you &lt;!-- raw HTML omitted --&gt;Cathrine Wilhelmsen&lt;!-- raw HTML omitted --&gt; for hosting this week&amp;rsquo;s #tsql2sday.&lt;/p&gt;
&lt;p&gt;If I knew that this T-SQL Tuesday was going to be about monitoring I would have saved my &lt;!-- raw HTML omitted --&gt;Monitoring SQL Agent Jobs&lt;!-- raw HTML omitted --&gt; post from last month. No worries though! I think I&amp;rsquo;ll talk more generally about monitoring.&lt;/p&gt;
&lt;!-- raw HTML omitted --&gt;
&lt;p&gt;If you read my &lt;!-- raw HTML omitted --&gt;Monitoring SQL Agent Jobs&lt;!-- raw HTML omitted --&gt; post from last month you will know that I had just begun a new position that had no monitoring. We also didn&amp;rsquo;t have a budget to go out and buy a solution, which is precisely what motivated me to learn PowerShell. I needed to know when my SQL Servers were having a problem so I decided to script my own solutions. If you are working with SQL Server you already have all of the tools you need to put together your own custom monitoring solutions.&lt;/p&gt;</description></item><item><title>Help! My database is stuck in SINGLE_USER mode!</title><link>https://www.cjsommer.com/post/2015-05-05-sql-stuck-in-single-user-mode/</link><pubDate>Tue, 05 May 2015 08:15:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2015-05-05-sql-stuck-in-single-user-mode/</guid><description>&lt;p&gt;&lt;img src="https://www.cjsommer.com/img/2015/04/StuckInSingleUser.png" alt="Help!"&gt;&lt;/p&gt;
&lt;p&gt;HELP! My database is stuck in single user mode!&lt;/p&gt;
&lt;p&gt;I answered this twitter post a while back and figured it would make a fun blog post.&lt;/p&gt;
&lt;p&gt;So what do I mean that the database is stuck in single user mode? Simply speaking, it means that the database is in single user mode and you can&amp;rsquo;t seem to get it back into multi user mode. As an example I set my local AdventureWorks2012 database to single user mode, opened a session to that database, tried an alter database to get it back to multi user and this is what I got.&lt;/p&gt;</description></item><item><title>Using PowerShell to Export SQL Data to CSV. How well does it perform?</title><link>https://www.cjsommer.com/post/2015-04-28-using-powershell-to-export-sql-data-to-csv-how-well-does-it-perform/</link><pubDate>Tue, 28 Apr 2015 08:15:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2015-04-28-using-powershell-to-export-sql-data-to-csv-how-well-does-it-perform/</guid><description>&lt;p&gt;&lt;!-- raw HTML omitted --&gt;&lt;!-- raw HTML omitted --&gt;&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;
&lt;p&gt;So here we are at week 4 of the #SQLNewBlogger challenge. Earlier in the week I responded to the following post on Twitter #sqlhelp, and after I posted my response I thought that this would make a fun blog post. I have used PowerShell to export SQL Server tables to CSV files before so I know that my suggestion works, but I was wondering if I could determine how performance would be for a larger table.&lt;/p&gt;</description></item><item><title>Modify SQL Agent Jobs using PowerShell and SMO</title><link>https://www.cjsommer.com/post/2015-04-14-modify-sqljobs-powershell-smo/</link><pubDate>Tue, 14 Apr 2015 08:15:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2015-04-14-modify-sqljobs-powershell-smo/</guid><description>&lt;p&gt;So here we are, week 2 of the &lt;!-- raw HTML omitted --&gt;#SQLNewBlogger Challenge&lt;!-- raw HTML omitted --&gt;. This is a follow on to last weeks post &lt;!-- raw HTML omitted --&gt;Monitoring SQL Agent Jobs when you work for Mr Krabs&lt;!-- raw HTML omitted --&gt; where I showed you how to go about monitoring SQL Server agent jobs using PowerShell and SMO. This can be very helpful if you are on a limited budget and can&amp;rsquo;t afford any fancy monitoring tools. &lt;/p&gt;</description></item><item><title>Monitoring SQL Agent Jobs when you work for Mr Krabs</title><link>https://www.cjsommer.com/post/2015-04-01-mrkrabs-sqlagent-job-monitoring/</link><pubDate>Wed, 01 Apr 2015 21:13:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2015-04-01-mrkrabs-sqlagent-job-monitoring/</guid><description>&lt;p&gt;For those of you who don&amp;rsquo;t know who Mr. Krabs is, he is a character in the TV show Sponge Bob Square Pants. Mr. Krabs owns the Krusty Krab restaurant and is a very frugal business owner. Every decision he makes is driven completely on how it will impact his bottom line.&lt;/p&gt;
&lt;p&gt;Thinking about Mr. Krabs reminds me of one of my first SQL Server DBA jobs. I was starting just as the old DBA was leaving and there wasn&amp;rsquo;t a lot of time for turnover. I was the only DBA on staff, my servers were old, the CPU&amp;rsquo;s slow, the disk drives were small, and none of it was being monitored! Yikes! Monitoring was one thing I knew I had to address right away, but I didn&amp;rsquo;t have a budget to work with! The business just wasn&amp;rsquo;t willing to spend the money on a fancy monitoring application. They were my Mr. Krabs!&lt;/p&gt;</description></item><item><title>Intro to SQL Server Automation with PowerShell</title><link>https://www.cjsommer.com/post/2015-03-30-intro-to-sql-server-automation-with-powershell/</link><pubDate>Mon, 30 Mar 2015 18:17:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2015-03-30-intro-to-sql-server-automation-with-powershell/</guid><description>&lt;p&gt;March 26th, 2015, a date which will live in infamy!&lt;/p&gt;
&lt;p&gt;Well, at least for me it will. March 26th, 2015 marks the date I gave my first presentation at my local SQL PASS user group meeting. Here is the picture as proof!&lt;/p&gt;
&lt;p&gt;&lt;!-- raw HTML omitted --&gt;&lt;!-- raw HTML omitted --&gt;&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;
&lt;p&gt;I was very excited to be able to share some of my knowledge with everyone who showed up. I hope to be able to do it again some time.&lt;/p&gt;</description></item><item><title>Configure SQL Server Agent using SMO</title><link>https://www.cjsommer.com/post/2015-03-24-sql-agent-smo/</link><pubDate>Tue, 24 Mar 2015 18:05:00 +0000</pubDate><guid>https://www.cjsommer.com/post/2015-03-24-sql-agent-smo/</guid><description>&lt;p&gt;Saw this on twitter and thought I would throw it up on the blog. Easier than responding on twitter.&lt;/p&gt;
&lt;p&gt;&lt;!-- raw HTML omitted --&gt;&lt;!-- raw HTML omitted --&gt;&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-powershell" data-lang="powershell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[&lt;span style="color:#66d9ef"&gt;System.Reflection.Assembly&lt;/span&gt;]::LoadWithPartialName(&lt;span style="color:#e6db74"&gt;&amp;#34;Microsoft.SqlServer.Smo&amp;#34;&lt;/span&gt;) | Out-Null;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;$SQLServerInstance = &lt;span style="color:#e6db74"&gt;&amp;#34;MSSQLSERVER&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;$srv = New-Object &lt;span style="color:#e6db74"&gt;&amp;#34;Microsoft.SqlServer.Management.Smo.Server&amp;#34;&lt;/span&gt; $SQLServerInstance
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;$srv.JobServer.MaximumHistoryRows = &lt;span style="color:#ae81ff"&gt;1002&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;$srv.JobServer.Alter()
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You can manipulate most if not all SQL Server configurations through SMO. This simple post has inspired me a bit. I think it would be useful to show how I came to find the information I needed to modify this setting. The cool thing about PowerShell is that it&amp;rsquo;s in there. All the tools you need already exist. Look back for an expansion of this post in the near future.&lt;/p&gt;</description></item></channel></rss>