Cannot configure SQL Maintenance Plan

Posted on 2012-08-28
Last Modified: 2012-08-28

I'm stumpted -- On "" 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!!

Question by:dantheanswerman
    LVL 75

    Accepted Solution

    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'
    LVL 2

    Author Closing Comment

    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!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
    This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
    Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
    Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now