How would I run each aspect of Ola Halengren's sql maintenance plan on SQL Express?

It's my understanding that each job should be run in a specific order. I'm sure that a .bat or cmd file can do this, but not sure where/how to start. SQL Express does not show the Server Agent, so the jobs do not display.

Can I view them another way and still use the scheduler, or would I have to script those? Would I have to run that from Task Scheduler, or can the SQL Agent scheduler handle this? Any help/direction you could provide is greatly appreciated.

On a side note, I'm also wondering if jobs can be scheduled to run after another job completes, as opposed to specifying a time to run the job?


You've pretty much self answered here - you won't be able to rely on SQL Server to do the scheduling for you.

The most common method is to use Windows Task Scheduler, but if you have any other job scheduling application already that might be a better choice. Either way, you'll need to get comfortable with the sqlcmd utility if you aren't yet.

If I were to use Task Scheduler, I would personally chain any dependencies together in .bat files, assuming your maintenance needs are fairly simple since its an Express instance.

I've got a website post with all of the specific steps to setting up Ola on Task Scheduler if that is the route you decide to pursue. There is also a Microsoft KB with similar (though pictureless) instructions.

  • 1
    Task scheduler stores any saved passwords in plain text on the server so be careful. If you have another SQL Instance that does have SQL Agent running then you could set it up as a linked server and trigger the jobs from there maybe? I remember also once using a Jenkins server to automate tasks and it can store credentials securely jenkins.io – Jhunter1 Aug 9 '19 at 13:13
  • Thanks for helping me, and for the link. That is perfect and I will pursue that! – Dave Morse Aug 9 '19 at 21:22

Your Answer

