Partilhar via


Back Up Database Task (Maintenance Plan)

Use the Back Up Database Task dialog box to add a backup task to the maintenance plan. Backing up the database is important in case of system or hardware failure (or user error) that causes the database to be damaged in some way, thus requiring a backed-up copy to be restored. This task allows you to perform full, differential, file and filegroup, and transaction log backups.

Options

  • Connection
    Select the server connection to use when performing this task.
  • New
    Create a new server connection to use when performing this task. The New Connection dialog box is described below.
  • Backup type
    Shows the type of backup to be performed.
  • Databases
    Specify the databases affected by this task. When selected, the drop-down list provides the following options: All databases, All system databases, All user databases, These specific databases.
  • All databases
    Generate a maintenance plan that runs maintenance tasks against all Microsoft SQL Server databases.
  • All system databases (master, msdb, model)
    Generate a maintenance plan that runs maintenance tasks against each of the SQL Server system databases. No maintenance tasks are run against user-created databases.
  • All user databases (excluding master, model, msdb, tempdb)
    Generate a maintenance plan that runs maintenance tasks against all user-created databases. No maintenance tasks are run against the SQL Server system databases.
  • These databases
    Generate a maintenance plan that runs maintenance tasks against only those databases that are selected. At least one database in the list must be selected if this option is chosen.

    Note

    Maintenance plans only run against databases set to compatibility level 80 or higher. Databases set to compatibility level 70 or lower are not displayed.

  • Backup component
    Select Database to back up the entire database. Select File and filegroups to back up only a portion of the database. If selected, provide the file or filegroup name. When multiple databases are selected in the Databases box, only specify Databases for the Backup components. To perform file or filegroup backups, create a task for each database.
  • Backup set will expire
    Specify when the backup set can be overwritten by another backup set.
  • Back up to
    Back up the database to a file or to tape. Only tape devices attached to the computer containing the database are available.
  • Back up databases across one or more files
    Click Add to open the Select Backup Destination dialog box, and provide one or more disk locations or tape devices.
  • If backup files exist
    Select Append to add this backup to the end of the file. Select Overwrite to remove any old backups in the file and replace them with this new backup.
  • Create a backup file for every database
    Create a backup file in the location specified in the folder box. One file will be created for each database selected.
  • Create a sub-directory for each database
    Place each database backup file in a subfolder.

    ms189647.security(en-US,SQL.90).gifSecurity Note:
    Although maintenance plans can create subdirectories, maintenance tasks in SQL Server 2005 cannot delete subdirectories. This feature reduces the possibility of a malicious attack that uses the Maintenance Cleanup task to delete files.

    Important

    The subdirectory inherits permissions from the parent directory. Restrict permissions to avoid unauthorized access.

  • Folder
    Specify the folder to contain the database backup files.
  • Backup file extension
    Specify the extension to use for the backup files. The default is .bak.
  • Verify backup integrity
    Verify that the backup set is complete and that all volumes are readable.
  • View T-SQL
    View the Transact-SQL statements performed against the server for this task, based on the selected options.

    Note

    When the number of objects affected is large, this display can take a considerable amount of time.

New Connection Dialog Box

  • Connection name
    Enter a name for the new connection.
  • Select or enter a server name
    Select a server to connect to when performing this task.
  • Refresh
    Refresh the list of available servers.
  • Enter information to log on to the server
    Specify how to authenticate against the server.
  • Use Windows integrated security
    Connect to an instance of the SQL Server Database Engine with Windows Authentication.
  • Use a specific user name and password
    Connect to an instance of the SQL Server Database Engine using SQL Server Authentication. This option is not available.
  • User name
    Provide a SQL Server login to use when authenticating. This option is not available.
  • Password
    Provide a password to use when authenticating. This option is not available.

See Also

Other Resources

BACKUP (Transact-SQL)

Help and Information

Getting SQL Server 2005 Assistance

Change History

Release History

12 December 2006

New content:
  • Added description for Backup set will expire.

17 July 2006

New content:
  • Added note about compatibility levels.

14 April 2006

New content:
  • Added a Security Note that maintenance plans cannot delete subdirectories.