Presents your SQL SERVER E-NEWSLETTER for June 25, 2002 -------------------------------------------- When can be run restore LABELONLY? You can only use the RESTORE LABELONLY T-SQL command on striped backups after the backup has finished. The command returns information on the striped backup set, and the output's FamilyCount identifies how many devices participated in the striped set. The FamilySequenceNumber output is important for identifying every participating member device in the striped set. First, you will need to create a striped backup set. Below is a sample script used to create dump devices that will hold the database backup of the pubs database. You will need to modify the script to point to an area on the server that has disk space. The primary reason to include striped backup sets is to place each dump device on separate disk systems so as to improve backup performance. For simplicity, this sample script has the backup devices all on the same disk device. USE MASTER GO EXEC sp_addumpdevice @logicalname = 'pubs_diskdump1', @physicalname = 'c:\pubs_diskdump1.BAK', @devtype = 'disk' EXEC sp_addumpdevice @logicalname = 'pubs_diskdump2', @physicalname = 'c:\pubs_diskdump2.BAK', @devtype = 'disk' EXEC sp_addumpdevice @logicalname = 'pubs_diskdump3', @physicalname = 'c:\pubs_diskdump3.BAK', @devtype = 'disk' Next, you will need to back up the pubs database to the striped dump devices. The following sample script backs up the pubs database to the defined striped backup set. Notice that the MEDIANAME argument, as well as the MEDIADESCRIPTION argument, is shown in the command. Both arguments are not necessary, but help to identify the striped backup set. BACKUP DATABASE pubs TO pubs_diskdump1, pubs_diskdump2, pubs_diskdump3 WITH FORMAT, MEDIANAME = 'Pubs_filedump', MEDIADESCRIPTION = 'Database pubs striped backup.', STATS = 10 Now that the pubs database is backed up, take a look at the information in the backup striped set. The following sample script queries the backup's label information: RESTORE LABELONLY FROM pubs_diskdump1 RESTORE LABELONLY FROM pubs_diskdump2 RESTORE LABELONLY FROM pubs_diskdump3 To clean up the above scripts, it is necessary to drop the striped backup devices. The following sample script carries out the cleanup tasks: EXEC sp_dropdevice 'pubs_diskdump1', DELFILE EXEC sp_dropdevice 'pubs_diskdump2', DELFILE EXEC sp_dropdevice 'pubs_diskdump3', DELFILE ----------------------------------------