How to Run SQL Server Maintenance Jobs

Now you can run regular SQL Server maintenance jobs with the help of SqlBak. This feature can be useful if you regularly need to make some changes to your database. All these changes can be made by adding any SQL Server command (using T-SQL) or adding Windows batch (*.cmd, *.bat).

How to Create SQL Server Maintenance Job.

Now let’s create a new SQL Serve maintenance job, for that go to the “Dashboard” page and click the “Add new job” button. At the pop-up window, choose the “Maintenance job” at the “Job type” box and click on the “Create Job” button.

In the window that opened, you will find six simple things that you need to set up to start your SQL Server maintenance job.

  1. Server

    Firstly, choose a server that you are going to work with.

  2. SQL Server

    Secondly, check the SQL Server connection. If you need to connect to another SQL Server, you can do it from SqlBak App.

  3. Schedule maintenance

    You can turn it on or turn it off. When you turn it on, you can set the schedule when scripts should be launched.

  4. Email Confirmation

    If you prefer to receive an email confirmation, then turn it on. Also, you can set up to receive a confirmation when the job is successful or when the job failed. In addition, you can receive them together or separately to different e-mail addresses. Please note that you can enter multiple emails separated by a comma.

  5. Maintenance scripts

    Then you need to add either SQL script or Windows batch. There are two ways to add a SQL script. Use “Insert from a template” and select those that you need. If you can not find the required script, simply type it in the box below. To add Windows batch (*.cmd, *.bat), click on the button and add it to the box. You can allow time during which the script must be performed; otherwise, it will be marked as “Failed”. You can add any number of different scripts in different orders. Moreover, you can delete some if you do not need them anymore.

  6. Job options

    In the “Job options” section, you can specify a temporary folder for your job.

    Note that a temporary folder will be used for all your jobs (backup and maintenance).

Now your job is ready; the one thing you need to do to save and run the SQL Server maintenance job is to press the “Save & Exit” button.

Leave a Comment