Using Db Maint, Working with…
Tasks
The Task Settings dialog is used to create new tasks and modify existing
tasks. To get a description for each parameter, position the mouse pointer over the
option and a ToolTip will be displayed.
General tab
Task name
This is read-only for an existing task. An existing task can only be renamed
in the main window.
For a new task, enter the task name here.
Id
This is the Db Maint task id. This is useful if you want to schedule this task
with a 3:rd party scheduler. See More about scheduling.
Enabled
Make sure that this is not selected if you schedule the task with a 3:rd party
scheduler.
Disconnects users
A KILL command will be issued for all connections in each database that the
task affects.
Preprocessing and postprocessing
You can execute a number TSQL commands before the jobs are processed. They
will be executed using OSQL, from the master database.
Available jobs and Included jobs
Move the jobs you want to include from the Available jobs list to the Included jobs list. Select the up/down arrows to arrange which order the jobs are to be processed in. A
recommendation is to have the job that includes the msdb database as the last job. This is
because the backup history is stored in msdb.
Disk
Select this if you want to backup to disk. A new backup file is generated for
each backup, and a backup device will be created making it easier to find the
backup files. The format of the filename and backup device name is: “dbname_yyyymmdd_hhmm_type”, where “type” is “dbas”, “diff” or “tlog”. For instance “Northwind_20021215_0215_dbas”. A backup will only be performed if specified in the job definition (for each
backup type) and scheduled in the Schedule tab for the task.
Copy of backup files
Db Maint can copy the backup file to some location after the backup is
performed. This can be an UNC path onto another machine, for added safety. The copy is
only performed if specified in the job definition. This allows you to have
several jobs (different databases) allowing you to select which databases the copy
is performed for.
Archiving backup files
You can also create an archive copy of the backup file. Specify in the job
definition when this is to be performed (first day every month, first day every
quarter, first day every half-year or first day every year). The archive is only
performed for database backups, so make sure you scheduled database backup
every day if you want to use this feature. Archive files are not deleted
automatically. An example of an archive filename and backup device name is: “Northwind_20021215_save_dbas”.
Compressing the files
Select this option if you want to compress the different type of backup files.
Db Maint does not have built-in compression. Instead, you configure in Server properties the command to be executed to create the compressed file. If the destination
filename exists after executing this command, the original file is deleted. You
can compress either of the backup files (only the copy files, for instance).
Share name for log shipping
Enter the share name used for log shipping. You configure in the job
definition if log shipping is to be used. The share name is in the format \\servername\sharename. The share needs to point to the original backup file location. The SQL
Server service account on the destination server need read permission on this share.
Tape
Select this is you want tape as backup destination
Schedule tab
Here you specify when each of the operations is to be performed. Note that the
operation will only be performed if configured (in the job dialog, server
properties etc). If you position the mouse pointer over an operation, a ToolTip is
displayed which tell you where to configure that operation.
Base execution time
For daily schedules: This is the time of day the operation is performed.
For hourly schedules: The minute part specified what minute of the hour the
operation is performed.
For minutely schedules: The last digit specifies when the operation is
performed.
Scheduling the operations
For each operation, first select which schedule the operation is to be
performed (none, day, hour or minute). Then mark the operation so it is selected
(background color is blue) and use the up/down buttons to define the sequence for
the operations.
If you select none, then the operation is moved below the black line and you
can’t select sequence (as it will not be executed). Selecting something else than
none will move the operation above the line and allow you to use the up/down
buttons.
Note that you can only define the sequence within each frame (job and task,
post-job).
Log tab
Specify whether Db Maint is to write messages from the execution to the
various log destinations. “Server” and “Printer” are only enabled if configured in the Server properties dialog (which you can open from here by pressing the “<- Change” button).
Email logging
Select which operators to be notified. For each operator, you can configure a
number of attributes. Position the mouse-pointer over each option to see a
description. The main purpose of the email is to show in the subject whether the
execution was success of failure and also include each logged message from the
execution.
Email subject
You can in the right part of the dialog customize which information to be
included in the subject and the relative order in the subject.
You can even define your own SQL query used to create the subject (select “Show advanced options”). Db Maint will include data from messages, error messages and, of course,
resultsets; but only up to 255 characters.
Email message
You can configure the SQL query used to retrieve these messages, check “Show advanced options”.