<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www2.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 tag 'Agent'</title><link>http://www2.sqlblog.com/search/SearchResults.aspx?o=DateDescending&amp;tag=Agent&amp;orTags=0</link><description>Search results matching tag 'Agent'</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Power Pivot SQL Agent Job Monitor</title><link>http://www2.sqlblog.com/blogs/davide_mauri/archive/2013/01/07/power-pivot-sql-agent-job-monitor.aspx</link><pubDate>Mon, 07 Jan 2013 21:23:29 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:47058</guid><dc:creator>manowar</dc:creator><description>&lt;p&gt;In the last days I needed a quick and efficient way to monitor the performance of a job and of each step over time. There’s a lot of interesting data in MSDB database and the various &lt;em&gt;sysjob&lt;/em&gt; tables, but the stored data is not really easy to use outside the Management Studio. Date and Time are not stored as date/time data type, there is no easy way to correlate the performance of a step with the related job execution (for example is not that easy to return all the steps of a job executed, say, yesterday at 10:00).&lt;/p&gt;  &lt;p&gt;So I decided to write some views to make the querying easier and then the next move was to create a Tabular Model with Power Pivot on Excel to make also analysis easier.&lt;/p&gt;  &lt;p&gt;Since this is a somehow recurring task that I find myself doing during my job – not often, but when I have to do it now I have something much more powerful in my hands – I decided to put it also con CodePlex so that that little work can be shared with the community.&lt;/p&gt;  &lt;p&gt;You can find the scripts with the objects (3 UDFs and 4 Views) that must be created inside MSDB and the Power Pivot Excel 2010 model here:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://jobmonitor.codeplex.com/" href="http://jobmonitor.codeplex.com/"&gt;http://jobmonitor.codeplex.com/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;</description></item><item><title>Start a SQL Server Agent Job using the SQL Server PowerShell Provider</title><link>http://www2.sqlblog.com/blogs/buck_woody/archive/2010/02/10/start-a-sql-server-agent-job-using-the-sql-server-powershell-provider.aspx</link><pubDate>Wed, 10 Feb 2010 13:13:45 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:22096</guid><dc:creator>BuckWoody</dc:creator><description>&lt;p&gt;Whew!&amp;#160; That’s a mouthfull. Anyway, I thought I would share part of a script I wrote today to help automate (more) from PowerShell. This assumes a few things: that you’re doing this from the SQL Server 2008 PowerShell provider (not just good old regular PowerShell) and that you change the HAL9000 and SQL2K8 parts with your server name and your Instance name. Oh, and the Jobs I start are called “Test” and then something else. That’s the Test* part. You can use a specific name and drop the * or use your own naming convention.&lt;/p&gt;  &lt;p&gt;&lt;i style="mso-bidi-font-style:normal;"&gt;&lt;font size="2"&gt;&lt;font face="Calibri"&gt;&lt;font color="#800000"&gt;&lt;strong&gt;Script Disclaimer, for people who need to be told this sort of thing: &lt;/strong&gt;            &lt;p&gt;&lt;/p&gt;         &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;i style="mso-bidi-font-style:normal;"&gt;&lt;font size="2"&gt;&lt;font face="Calibri"&gt;&lt;font color="#800000"&gt;Never trust any script, including those that you find here, until you understand exactly what it does and how it will act on your systems. Always check the script on a test system or Virtual Machine, not a production system. All scripts on this site are performed by a professional stunt driver on a closed course. Your mileage may vary. Void where prohibited. Offer good for a limited time only. Keep out of reach of small children. Do not operate heavy machinery while using this script. If you experience blurry vision, indigestion or diarrhea during the operation of this script, see a physician immediately. &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff0000"&gt;# Start a Job named Test in the SQL Server 2008 PowrShell Provider&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;DIR SQLSERVER:\SQL\HAL9000\SQL2K8\JobServer\Jobs\Test* | % {$_.Start()}&lt;/font&gt;&lt;/p&gt;</description></item><item><title>Tools and Processes for “Fitting it all in”</title><link>http://www2.sqlblog.com/blogs/buck_woody/archive/2010/01/18/tools-and-processes-for-fitting-it-all-in.aspx</link><pubDate>Mon, 18 Jan 2010 14:42:05 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:21147</guid><dc:creator>BuckWoody</dc:creator><description>&lt;p&gt;Most data professionals I’ve met work in two modes: we plan for our day, and we react to the situations around us. I’m staring at my list of things that I need to do today right now, which is my planned work. Of course, I have no idea how much of that will really get done – it’s optimistic to be sure. On the other hand I have several systems I manage, and at any moment one of them or the people that interface with them may “change state” such that I need to give them some attention.&lt;/p&gt;  &lt;p&gt;So how do I meld the two? Sometimes it can be quite difficult. I’m constantly working through my list in my mind, re-arranging what I’m focusing on based on what I perceive as the highest need. There are, however, some tools that I use each day to help me manage the workflow.&lt;/p&gt;  &lt;p&gt;I use Outlook for tracking everything, since it has a task list (my primary tracking), a calendar, mail and so on. Also I can share the information, it’s on-line so I can see it anywhere, and I can even take it offline onto the plane this week when I fly out of town. &lt;/p&gt;  &lt;p&gt;For the “ad-hoc” work, I rely on a script library, which I keep as SQL Server Management Studio projects. I keep those scripts and projects backed using Microsoft Live Mesh, which synchronizes those files (along with a few other critical files and my IE Favorites) across not only my laptop and primary systems, but even with my Virtual Machines. &lt;/p&gt;  &lt;p&gt;Also for my SQL Server systems I use the Standard Reports I’ve blogged about here. I also use Greg Larsen’s Database Dashboard, and a series of PowerShell scripts that work across my systems, alerting me to any problems. Of course I’m using SQL Server Agent Jobs quite a bit, and I also use Alerts and some Perfmon automation for my monthly baselining.&lt;/p&gt;  &lt;p&gt;So – is this your experience as well? Do you get driven by both planned and unplanned work? What tools and processes do you use to keep it all straight with your SQL Server Instances?&lt;/p&gt;</description></item><item><title>Connect Digest : 2009-09-04</title><link>http://www2.sqlblog.com/blogs/aaron_bertrand/archive/2009/09/04/connect-digest-2009-09-04.aspx</link><pubDate>Fri, 04 Sep 2009 11:30:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:16401</guid><dc:creator>AaronBertrand</dc:creator><description>&lt;p&gt;I am heading to &lt;a href="http://en.wikipedia.org/wiki/North_Bay,_Ontario" title="North Bay, Ontario, Canada" target="_blank"&gt;my home town&lt;/a&gt; for a week; we rented a cottage on &lt;a href="http://en.wikipedia.org/wiki/Lake_Nipissing" title="Lake Nipissing" target="_blank"&gt;Lake Nipissing&lt;/a&gt;, and are going to relax.&amp;nbsp; No, really : no howling beagles, no computers, and no schedule.&amp;nbsp; Sounds like a week of bliss to me.&lt;/p&gt;

&lt;p&gt;So, as you might imagine, there won't be a digest next week.&amp;nbsp; I think I have some interesting items to point out to you this week to hold you over.&lt;/p&gt;

&lt;hr&gt;
&lt;p style="font-weight:bold;"&gt;Users won't stop shrinking, so take the option away&lt;br&gt;&lt;/p&gt;

&lt;p&gt;Even with boatloads of advice to the country, a LOT of people are still shrinking their databases as a whole (as opposed to per file), and even doing so as a regularly scheduled maintenance plan.&amp;nbsp; While Microsoft has advised us that settings like &lt;a href="http://msdn.microsoft.com/en-us/library/ms136209.aspx" title="http://msdn.microsoft.com/en-us/library/ms136209.aspx" target="_blank"&gt;AutoShrink will be removed&lt;/a&gt; in some future version, personally I just don't think that's enough.&amp;nbsp; People don't need to be tempted in so many ways to shoot themselves in the foot and destroy their database performance, never mind to set the system up so it shoots their feet off automatically.&lt;br&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="http://connect.microsoft.com/SQL/feedback/ViewFeedback.aspx?FeedbackID=486614" title="http://connect.microsoft.com/SQL/feedback/ViewFeedback.aspx?FeedbackID=486614" target="_blank"&gt;#486614 : Deprecate all "shrink database" options&lt;/a&gt;&lt;br&gt;&amp;nbsp;&lt;br&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;hr&gt;

&lt;p style="font-weight:bold;"&gt;Make it harder for users to raise 600 GB log files&lt;br&gt;&lt;/p&gt;
&lt;div class="SubTitle"&gt;&lt;a href="http://twitter.com/way0utwest" title="http://twitter.com/way0utwest" target="_blank"&gt;Steve Jones&lt;/a&gt; formalized a thought I alluded to in an &lt;a href="http://sqlblog.com/blogs/aaron_bertrand/archive/2009/06/21/why-is-disaster-recovery-an-afterthought.aspx" title="http://sqlblog.com/blogs/aaron_bertrand/archive/2009/06/21/why-is-disaster-recovery-an-afterthought.aspx" target="_blank"&gt;earlier blog post&lt;/a&gt;: make the default recovery model simple.&amp;nbsp; The reason this will be better for users is that if you choose full by mistake, you don't realize until your transaction log has taken up your whole disk -- and then you're back into the need to shrink files again.&amp;nbsp; If you choose simple by mistake, you will realize your error the very first time you attempt to take a log backup, and at that point corrective action is simple (no pun intended) and immediate.&amp;nbsp; Do I think that simple recovery model should be how most databases end up?&amp;nbsp; Absolutely not.&amp;nbsp; But until they make other options mandatory (e.g. setting up a backup / log backup plan), I think default = full is more dangerous than default = simple.&amp;nbsp; And as I mentioned, correcting for a default of simple when you really wanted full is much more obvious and immediate.&lt;/div&gt;
&lt;blockquote&gt;&lt;div class="SubTitle"&gt;&lt;a href="http://connect.microsoft.com/SQL/feedback/ViewFeedback.aspx?FeedbackID=472969" title="http://connect.microsoft.com/SQL/feedback/ViewFeedback.aspx?FeedbackID=472969" target="_blank"&gt;#472969 : Change Default Recovery Model&lt;/a&gt;&lt;/div&gt;&lt;div class="SubTitle"&gt;&amp;nbsp; &lt;br&gt;&lt;/div&gt;&lt;/blockquote&gt;

&lt;hr&gt;
&lt;div class="SubTitle"&gt;&lt;b&gt;Make the SQL Server Agent / Jobs node more manageable&lt;/b&gt;&lt;/div&gt;&lt;div class="SubTitle"&gt;&amp;nbsp;&lt;/div&gt;&lt;div class="SubTitle"&gt;I probably have 50+ Connect items on how to make the SQL Server Agent components in SSMS easier to manage.&amp;nbsp; But after setting up a Utility Control Point (see &lt;a href="http://sqlblog.com/blogs/aaron_bertrand/archive/2009/08/31/sql-server-2008-r2-more-peeking-under-the-hood.aspx" title="http://sqlblog.com/blogs/aaron_bertrand/archive/2009/08/31/sql-server-2008-r2-more-peeking-under-the-hood.aspx" target="_blank"&gt;my most recent "under the hood" post&lt;/a&gt;), it became obvious how cluttered and ugly the Jobs node in Object Explorer can become.&amp;nbsp; And when you look at the &lt;a href="http://sqlblog.com/files/folders/16462/download.aspx" title="http://sqlblog.com/files/folders/16462/download.aspx" target="_blank"&gt;screen shot&lt;/a&gt;, kind in mind: this is before I've created a single user-defined job.&amp;nbsp; Blecch.&amp;nbsp; I'd like to see, at the very least, folders for each category with at least one job (this way we could control where our jobs appear simply by changing their category), with uncategorized jobs appearing at the root.&amp;nbsp; But user-defined hierarchies (even if only one level deep) would be much better.&lt;br&gt;&lt;/div&gt;
&lt;blockquote&gt;&lt;div class="SubTitle"&gt;&lt;a href="http://connect.microsoft.com/SQL/feedback/ViewFeedback.aspx?FeedbackID=286925" title="http://connect.microsoft.com/SQL/feedback/ViewFeedback.aspx?FeedbackID=286925" target="_blank"&gt;#286925 : SSMS : Allow folder grouping for SQL Agent jobs&lt;/a&gt;&lt;/div&gt;&lt;div class="SubTitle"&gt;&amp;nbsp; &lt;br&gt;&lt;/div&gt;&lt;/blockquote&gt;

&lt;hr&gt;
&lt;div class="SubTitle"&gt;&lt;b&gt;Prevent slipstream from failing silently&lt;/b&gt;&lt;/div&gt;&lt;div class="SubTitle"&gt;&amp;nbsp;&lt;/div&gt;&lt;div class="SubTitle"&gt;Earlier this week, I created a slipstream install: SQL Server 2008 with SP1 (2531) and SP1 CU3 (2723).&amp;nbsp; Little did I know that, when I grabbed the SP1 binaries off of our file server, I grabbed the pre-release CTP of SP1 (build 2520 vs. 2531).&amp;nbsp; Oops.&lt;/div&gt;&lt;div class="SubTitle"&gt;&amp;nbsp;&lt;/div&gt;&lt;div class="SubTitle"&gt;The &lt;a href="http://blogs.msdn.com/psssql/archive/2009/03/17/how-to-fix-your-sql-server-2008-setup-before-you-run-setup-part-ii.aspx" title="http://blogs.msdn.com/psssql/archive/2009/03/17/how-to-fix-your-sql-server-2008-setup-before-you-run-setup-part-ii.aspx" target="_blank"&gt;slipstream process itself&lt;/a&gt; is handy but pretty manual, and a great deal of thanks is owed to Peter Saddow of Microsoft for providing so many helpful blog posts with information.&amp;nbsp; But, as a manual process, it is certainly error-prone.&amp;nbsp; In my case, running a slipstreamed install yielded these results:&lt;/div&gt;&lt;div class="SubTitle"&gt;
&lt;ol&gt;
&lt;li&gt;Build 1600 (RTM) was installed.&amp;nbsp; Neither 2520 nor 2723 made it to the server.&lt;br&gt;&lt;/li&gt;

&lt;li&gt;The log files did not mention any problem, AFAICT.&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;&lt;div class="SubTitle"&gt;Both of these outcomes are undesirable, in my opinion.&amp;nbsp; If setup was not able to patch to the highest CU build I had attempted,
the process should fail completely.&amp;nbsp; Failing that, it should patch to the highest build possible (in this case 2520), and then make it *VERY* obvious (I'm
talking sirens, flashing lights and dancing girls here) that it did not
complete the full process.&lt;br&gt;&lt;/div&gt;&lt;div class="SubTitle"&gt;&amp;nbsp;&lt;/div&gt;&lt;div class="SubTitle"&gt;Only when I attempted to run the installers from the PCU and CU folders did I realize what had happened, since the log files were of no help.&amp;nbsp; I installed what I thought was SP1, and then when I tried to install CU3, it told me the minimum build # was 2531, and that I only had 2520.&amp;nbsp; Face palm time.&lt;/div&gt;&lt;div class="SubTitle"&gt;&amp;nbsp;&lt;/div&gt;&lt;div class="SubTitle"&gt;This sequence of events should not be allowed.&amp;nbsp; Since the CTP of SP1 was public, I doubt I am the first person who tried this, and I doubt I will be the last.&amp;nbsp; But the more dangerous problem is that a slipstream install can *look* like it was successful, but fail silently.&amp;nbsp; I noticed immediately that the server was still at 1600.&amp;nbsp; But what if I didn't pay as much attention to these details?&amp;nbsp; If I was relying on protecting my server from an exploit, say via some security patch in an SP or CU, I'm going to run this setup and walk away from the server, thinking I am protected when I am not.&lt;/div&gt;&lt;div class="SubTitle"&gt;
&lt;blockquote&gt;&lt;a href="http://connect.microsoft.com/SQL/feedback/ViewFeedback.aspx?FeedbackID=487051" title="http://connect.microsoft.com/SQL/feedback/ViewFeedback.aspx?FeedbackID=487051" target="_blank"&gt;#487051 : Slipstream : log says yes, result says no&lt;/a&gt;&lt;br&gt; &lt;br&gt;&lt;/blockquote&gt;
&lt;/div&gt;

&lt;hr&gt;
&lt;div class="SubTitle"&gt;&lt;div class="SubTitle"&gt;&lt;b&gt;Some polishing in R2 still required&lt;/b&gt;&lt;/div&gt;&lt;div class="SubTitle"&gt;&amp;nbsp;&lt;/div&gt;&lt;div class="SubTitle"&gt;I know it's pre-release material, but unhandled exceptions are never cool, and bugs I've submitted in the past were not always fixed in time for the initial release.&amp;nbsp; So I'd like to help avoid these from being in the product this time around.&amp;nbsp; When using the Utility Explorer for the first time, I came across a pretty serious and easily reproducible unhandled exception, as well as an instance of unintuitive behavior.&lt;/div&gt;
&lt;blockquote&gt;&lt;div class="SubTitle"&gt;&lt;a href="http://connect.microsoft.com/SQL/feedback/ViewFeedback.aspx?FeedbackID=487722" title="http://connect.microsoft.com/SQL/feedback/ViewFeedback.aspx?FeedbackID=487722" target="_blank"&gt;#487722 : R2 : Unhandled exception on Utility Explorer's Storage Utilization tab&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;a href="http://sqlblog.com/files/folders/16540/download.aspx" target="_blank"&gt;&lt;img src="http://sqlblog.com/files/folders/16540/download.aspx" alt=" Click to enlarge " border="1" width="500"&gt;&lt;/a&gt;&lt;br&gt;&lt;/div&gt;&lt;div class="SubTitle"&gt;&amp;nbsp;&lt;/div&gt;&lt;div class="SubTitle"&gt;&lt;a href="http://connect.microsoft.com/SQL/feedback/ViewFeedback.aspx?FeedbackID=487719" title="http://connect.microsoft.com/SQL/feedback/ViewFeedback.aspx?FeedbackID=487719" target="_blank"&gt;#487719 : R2 : Utility Explorer Content links do not work&lt;/a&gt;&lt;br&gt;&lt;/div&gt;&lt;/blockquote&gt;
&lt;div class="SubTitle"&gt;The unhandled exception one is really troubling.&amp;nbsp; There are several other unresolved Connect items where SSMS raises unhandled exceptions, and it really makes me wonder why TRY/CATCH use isn't more widespread.&amp;nbsp; I guess SSMS gets the same kind of error handling priority as SQL Server itself.&amp;nbsp; =)&amp;nbsp; Sorry, I couldn't resist.&lt;br&gt;&lt;/div&gt;&lt;div class="SubTitle"&gt;&amp;nbsp;
&lt;br&gt;&lt;/div&gt;&lt;/div&gt;</description></item></channel></rss>