O'Reilly logo

Guru's Guide to SQL Server™ Stored Procedures, XML, and HTML, The by Ken Henderson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required