The case of the non-starting SQL Agent Job

I ran into an interesting situation recently that involved a SQL Agent job that would not/could not run. Looking at the job settings everything seemed fine, yet the SQL Agent deemed the job “un-runnable”.

As we can see here “My Test Job” is enabled, and scheduled, but has no “Next Run” and is deemed not “Runnable”.

Job Activity Monitor

Taking a closer look at the job properties, we can further see that the job is enabled:

Job Properties - General_3

We also see that there really is a schedule for the job:

Job Properties - Schedules

And on further investigation I saw something that I have never really looked at before. The “Targets” properties:

There are no entries here, but more importantly, the radio button “Target local server” is not selected. This turned out to be the cause of the job not running!

If I try and exit the properties with “OK” (which you should never do unless you have intentionally changed a setting somewhere), then we are presented with a clear error message informing us about the missing Target:

Job Save Error

“You must specify the Target Servers on which this multi server job will execute.”

The “Targets” section of a SQL Agent Job is something that I have never delved into in any detail, but is a long standing feature to allow for administration of large server environments. You can read more into Multiserver Environment Administration on MSDN.

The reason for the setting being missing was through an incomplete scripting process for the affected job. If you script out a SQL Agent Job in SQL Server Management Studio, you will see that one of the last steps in the script is a system stored procedure “msdb.dbo.sp_add_jobserver”:

EXEC msdb.dbo.sp_add_jobserver @job_id = @jobId, @server_name = N'(local)'

This stored procedure associates a job to a jobserver, which in my experience has always been “(local)”. Obviously, this will be different if you are using master servers and target servers in your environment.

As soon as I had set the target server to local for the job, everything was back to normal and the job ran again according to it’s schedule.

1 Year Emsland SQL User Group

Moin Moin!

Unser User Group feiert 1 Jahr mit einem Sondertreffen:

Am 04.09.2015 ab 15:00 Uhr finden insgesamt 4 Sessions statt. Es sind 4 Auswärtssprecher am Start die zu unterschiedlichen Themen vortragen werden.

Die Sessions werden gerade festgelegt, aber der Termin steht schon fest. Schaut euch die Details an und meldet euch mit dem unten stehenden Button an!

Eventbrite - Emsland SQL Server User Group: SQLGrillen

Wir freuen uns auf euch!!

P.S. Gebt das bitte weiter, wir wollen so viele Leute da haben wie möglich, danke!

 

Beitrag bei “Informatik Aktuell” zu AlwaysOn

Am 16.06. ist mein Artikel zu SQL Server AlwaysOn bei Informatik Aktuell erschienen. Dort habe ich versucht zu erklären wie die Technologien von Microsoft entwickelt wurden und wie sie eingesetzt werden können. Schaut euch das mal an, und wenn es Fragen oder Anmerkungen gibt, bitte einfach eine Nachricht an mich schicken.

 


I wrote an article explaining about the high availabilty features within SQL Server are, which was published on the 16.06 on the German language website “Informatik Aktuell”. For those of you that speak German, please take a look and let me know what you think.

Full day of training in Dublin!

UPDATE! Unfortunately SQL Saturday Dublin has been cancelled. This event will be re-scheduled at a later date.

 

Hot on the heels of the news of my training day at SQLSaturday Exeter, I am announcing another training day. This time I will be presenting a day of SQL Replication and Cloud Data Management on the Friday before SQLSaturday Dublin in June 2015.

I presented a session on Replication Troubleshooting at SQLSaturday Dublin last year and ran out of time with the one hour session and could have gone into more depth. After seeing the interest of Replication in the Irish SQL Server community, I submitted a proposal to the organisers of the Dublin event and the rest is history!

This will be a day taking a deeper look into the inner workings of SQL Server Replication, followed by an introduction into how you can move data between your on-premises database servers and the Microsoft Azure platform.

You can take a look at the details of the training day and register for a seat here: Deep Dive into SQL Replication and Cloud Connected Data Movement

I really enjoyed SQLSaturday Dublin last year and I am looking forward to another visit in June.

See you there!

SQLSaturday Exeter – Third time a charm!

sqlsat372_web

SQLSaturday Exeter

SQLSaturday Exeter 2015 – I’m there!

I have the great pleasure of announcing that I will be presenting at SQLSaturday Exeter 2015 in April 2015.

SQLSaturday Exeter is an extra special event for me. Not only is it a fantastically well run event, it is also the first conference that I ever presented at, way back in 2013. I had never spoken to a larger audience before and was a little nervous of speaking. However, once my session was over, I had found a new area for me to improve on and now love presenting on SQL Server. Since then, I have spoken at a variety of conferences and user groups around Europe and (hopefully) improved my presentation skills.

This time around, I have been asked to present a new topic: “Stories from the Trenches: Upgrading SQL with Minimal Downtime“, where I plan on showing how to use the high availability features of SQL Server to help perform upgrades whilst keeping downtime to a minimum.

But wait, there’s more!

As is the tradition of the organisers of SQLSaturday Exeter, they like to mix things up a bit and also try new speakers out (hence my chance back in 2013). This has lead them to also choose me to present a pre-conference training day session!

Check out the full list of speakers/sessions in this video created by the SQLSaturday Exeter team:

 

Being chosen for a pre-conference training day is another first for me and I am excited/scared/humbled/ecstatic to have been chosen to do this – many thanks to the SQLSaturday Exeter organisers, you brave fools!! :)

I will be presenting “SQL Server: An Introduction” and as the title suggests, this will be an introductory day, covering a set of basic information on SQL server. It is designed for accidental/occasional DBAs that have been using SQL Server for <12 months.

You can find a full description/abstract for my training day here: SQL Server: An Introduction

The training days are full day training sessions on one topic, priced at £150 per attendee (early bird rate).

The full list of available sessions is here: SQLSaturday Exeter Training Day – if you don’t fancy my session, there are 7 other sessions to choose from. I dare you to not find a session that could be useful to you! :)

See you in April!

I’m off to prepare my sessions and look forward to seeing you in Exeter in April.

SQLHangout #28: From DBA To Consultant

As usual, work/life got in the way, so I’m a little late blogging about this, but:

I recently had the pleasure of re-joining Boris Hristov (b | t) for one of his SQLHangouts together with Matan Yungman (b | t). We spoke for about half an hour on our experiences in moving from DBA work to Consulting.

All three of us made the move to consulting in the last year and we had a great time comparing notes on how our daily work has changed. There are some topics that surprised us all and some that we are seeing from the other side of the table.

Take a look at our episode and also check out the other Hangouts that Boris has hosted, there are some really interesting topics from a wide range of SQL Server professionals.

Speaking at SQLKonferenz, Darmstadt

sqlkonferenz_banner

Jump to English Version

Ich spreche auf das größte SQL Server Konferenz im deutschsprachigem Raum, SQL Konferenz in Darmstadt in Februar!

Obwohl ich seit 13 Jahren in Deutschland lebe ist das nur das zweite Mal, dass ich als Sprecher in Deutschland auftrete. Ich kann zwar Deutsch (fast) fließend sprechen, bin dennoch mehr aufgeregt als wenn ich auf Englisch vortragen muss.

Meine Session heißt “Real World SQL 2012 -> SQL 2014: Migration einer AlwaysOn FCI/AAG Umgebung” und soll anhand eines Kundenprojektes, die tatsächlichen Überlegungen, Schritte und Stolpersteine aufführen, die zu einer Systemmigration gehören.

SQL Konferenz ist ein Konferenz über zwei Tage mit einem “Pre-Conference” Tag davor, wo einzelnen Themen etwas tiefer erläutert werden können. Schaut einfach in die Agenda rein um alle Sessions zu sehen. Es sind wirklich erfahrene und sehr gute Deutsche wie auch internationale Sprecher angemeldet.

Zudem, gibt es ein “Early Bird” Rabatt. Damit kann man €150 sparen wenn man sich bis Heiligabend anmgeldet, also schenkt euch ein frühes Weihnachtsgeschenk und registriert euch heute!

Wir sehen uns dann in Darmstadt in Februar :)


English Version

I have been chosen to speak at the largest SQL Server conference in the German speaking world, SQL Konferenz!

Although I have been in Germany for 13 years now, this is only the second time that I have had the opportunity to speak at a conference here. It is also the first time that I have been listed to speak in German (eek)!! I am fluent in German, using it on a daily basis, but this is still making me more nervous than speaking in English.

I will be presenting a new session this time, based on a real customer implementation of a system migration/upgrade from SQL 2012 to SQL 2014, including the addition of AlwaysOn Availability Groups. I thought it would be nice to offer a look at how a real-world project of this kind has actually been done, rather than sticking to the theory.

SQL Konferenz is a two-day conference with an additional pre-conference day with deep-dive, day-long sessions on a few different subjects. Check out the agenda to see what sessions are on offer – there are 40 sessions on the two conference days, with plenty of extremely good national and international speakers.

Also, there is an “Early Bird” offer available which can save you €150 on the standard registration price. This offer is only available until Christmas Eve, so go and treat yourself to an early Christmas present and register now!

So if you are planning your training for next year and would like to visit Germany, combine the two and come and visit SQL Konferenz.

Wir sehen uns dort :)