SQL Server backup terminology

Source: Internet
Author: User

There are many terminologies in SQL Server backup, which make readers who read the online documentation feel very painful and tangled. I don't know which one is.

Media set/media set (the online documentation contains 2 naming conventions, which makes it easy for beginners): a set of backup media.

Backup media/backup media: it should be a collectively referred to as a backup device.

Physical backup device: This is relatively simple, which is commonly used disk = 'C: \ XXX. Bak '.

Logical backup device: it is defined by sp_adddumpdevice and used as disk = xxx.

Media cluster/media cluster: I don't know why.

Media Header: if the same header is backed up, it is a media set.

Backup set: a successful backup operation adds a "Backup set" to the media set".

The following is a combination of the backup statement:

BACKUP DATABASE NorthWind TO DISK = 'f:\north1.bak',DISK='f:\norht2.bak' 
MIRROR TO DISK ='e:\northmirror1.bak',DISK='e:\northmirror2.bak' WITH format,INIT

If format is used for an SQL statement, a media set and a backup set distributed on the disk 2 Logical Disk are created.

There are two media clusters in the media set. The physical backup device is used here, which is directly represented by the disk path.

BACKUP DATABASE NorthWind TO DISK = 'f:\north3.bak',DISK='f:\norht4.bak' WITH noformat

View the header of the backup file and you will find that the media set has changed. This means that a media set is created.

A media set has multiple media clusters. Multiple backup files under one media Cluster

One media set and multiple backup sets.

There is no special relationship between the backup set and the media cluster.

Later use

BACKUP DATABASE NorthWind TO DISK = 'f:\north1.bak',DISK='f:\norht2.bak' 
MIRROR TO DISK ='e:\northmirror1.bak',DISK='e:\northmirror2.bak'

Back up multiple times to view the header and backup Header

RESTORE LABELONLY FROM DISK ='f:\north1.bak'
RESTORE HEADERONLY FROM DISK ='f:\north1.bak'

This illustrates the relationships between media sets, media clusters, and backup sets.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.