Answer the question
In order to leave comments, you need to log in
How to make a full backup of MSSQL databases?
Hello! Well, it's a pancake again some kind of brain drain.
In principle, what could be easier is to create a database backup using SQL using the Maintenance Plan Wizard.
in general, what is the point after weekly backups, I decided to look at the log created by SQL about backup,
after looking I saw this text
N''Verification error. Database backup details
SQL example for creating a differential database backup with backup verification upon completion (differs from a full backup with the DIFFERENTIAL flag, NOFORMAT must be used instead).
Microsoft(R) Server Maintenance Utility (Unicode) Version 13.0.1601
The report was generated on "server".
Maintenance Plan: MaintenancePlan
Duration: 00:04:54
Status: Completed.
Details:
Database backup (full) (server)
Back up database on Local server
connection Databases basa,base2,base3,base4,base5
Type: Full
Add to existing
Task start: 2016-08-18T00:00: eleven.
Task end: 2016-08-18T00:05:01.
Success Command:EXECUTE master.dbo.xp_create_subdir
N''E:\sql\basa''
GO
EXECUTE master.dbo.xp_create_subdir N''E:\sql\base2''
GO
EXECUTE master.dbo.xp_create_subdir N''E:\sql\base3''
GO
EXECUTE master.dbo.xp_create_subdir N''E:\sql\base4''
GO
EXECUTE master.dbo.xp_create_subdir N''E:\sql\ base5''
GO
BACKUP DATABASE [basa] TO DISK = N''E:\sql\basa\basa_backup_2016_08_18_000009_7188729.bak'' WITH RETAINDAYS = 14, NOFORMAT, NOINIT, NAME = N''basa_backup_2016_08_18_000009_7188729, RESKLOADWIP, 7188729 , STATS = 10
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N''basa'' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N''basa '' )
if @backupSetId is null begin raiserror(N''Verification failed. No backup information found for database 'basa'.'', 16, 1) end
RESTORE VERIFYONLY FROM DISK = N''E:\sql\basa\ basa_backup_2016_08_18_000009_7188729.bak'' WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
Answer the question
In order to leave comments, you need to log in
Type: Complete
Add to Existing
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question