Академический Документы
Профессиональный Документы
Культура Документы
OPEN curDatabases
IF CONVERT(SYSNAME,DATABASEPROPERTYEX(@dbName,'Status')) = 'ONLINE'
BEGIN
SET @TSQL = N'RESTORE VERIFYONLY FROM DISK = ' + @FileName + ' WITH
NOUNLOAD, NOREWIND'
EXEC SP_EXECUTESQL @TSQL
END
CLOSE curDatabases
DEALLOCATE curDatabases
SET @Subject_Aux = 'MSSQL Backup Full - System Database - ''' + @@SERVERNAME + ''''
Steps Included
--------------
** Delete History
Delete backup files older than 1 day from file system.
** Backup
Backs up an entire database, or the portions of the database changed since the last
full
backup (differential), or transaction log.
Ex.: BACKUP DATABASE successfully processed 161 pages in 0.150 seconds (8.792
MB/sec). [SQLSTATE 01000]
** Restore Verify
Verifies the backup but does not restore it, and checks to see that the backup set
is complete and the
entire backup is readable. However, RESTORE VERIFYONLY does not attempt to verify
the structure of the
data contained in the backup volumes.
EXEC master.dbo.xp_sendmail
@recipients = @EMail,
@subject = @Subject_Aux,
@message = @Body_Aux,
@attachments = @File_Attachments_Aux,
@width = 7250