sp_create_backup_job

Sp_create_backup_job does what its name implies: It sets up a backup job for you. It uses SQL Server's SQLMAINT facility to set up a job that backs up the data and log files for a database you specify. The procedure takes six parameters, and these are summarized in Table 21-1.

Table 21-1. sp_create_backup_job PARAMETERS
Parameter Type Default Purpose
@dbname sysname None Specifies the name of the database to back up.
@OperatorNetSendAddress sysname None Specifies the NET SEND address of the operator.
@ScheduledStart int 200000 Specifies the start time of the job.
@PlanName sysname " Specifies the name of the maintenance plan to create.
@DataBackupName sysname " Names the data backup portion of the job.
@LogBackupName sysname ...

Get Guru's Guide to SQL Server™ Stored Procedures, XML, and HTML, The now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.