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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.