• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 947
  • Last Modified:

Cannot configure http://ola.hallengren.com SQL Maintenance Plan


I'm stumpted -- On "http://ola.hallengren.com" there is a world renound sql maintenance plan - I've run it, it works great, but they have instructions on how to add a Job to your SQL Server DB that I can't figure out.

(Excerpt from site )

Execute the stored procedures from SQL Server Agent CmdExec jobs, using sqlcmd and the -b option. Pass the parameters to the stored procedures by name:

sqlcmd -E -S $(ESCAPE_SQUOTE(SRVR)) -d master -Q "EXECUTE dbo.DatabaseBackup @Databases = 'USER_DATABASES', @Directory = 'C:\Backup', @BackupType = 'FULL'" -b

Use SQL Server Agent job output files with tokens for jobid, stepid, date, and time. Output files ensure that you always have a full set of information, in case of an error. Tokens ensure that the output files have unique file names.

How do I run the bolded part??!?

Thanks in Advance!!

1 Solution
Aneesh RetnakaranDatabase AdministratorCommented:
Right click SQL server agent -> new job
- give a name to the job
Click 'Steps' menu,  click the  'New' button -
 - specify the step name
 - choose the Type as  Operating system (cmdExec) [ by default it will be Transact SQL ]
   and paste your highlighted statement'
dantheanswermanAuthor Commented:
Thanks very much for the assistance -- it turns out I had a typo in my path to my backup folder... I also didn't realize it all had to be on a single line.

Greatly appreciate your time.
FYI - For anyone looking for a better SQL maint plan - this one is hard to beat and totally free!

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now