%PDF- %PDF-
Direktori : /mnt/tieto-nb/Documents/SQL Server Management Studio/ |
Current File : //mnt/tieto-nb/Documents/SQL Server Management Studio/BackupDb.sql |
BACKUP DATABASE [Tips.Quality] TO DISK = N'C:\Users\varakmar\Tips.Quality-data.bak' WITH NOFORMAT, INIT, NAME = N'Tips.Quality-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10, CHECKSUM GO declare @backupSetId as int select @backupSetId = position from msdb..backupset where database_name=N'Tips.Quality' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N'Tips.Quality' ) if @backupSetId is null begin raiserror(N'Verify failed. Backup information for database ''Tips.Quality'' not found.', 16, 1) end RESTORE VERIFYONLY FROM DISK = N'C:\Users\varakmar\Tips.Quality-data.bak' WITH FILE = @backupSetId, NOUNLOAD, NOREWIND GO