D
D
dobromin2016-08-18 12:11:27
SQL
dobromin, 2016-08-18 12:11:27

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

Didn't find much googling! Tipo I have differential backups performed ....
How so ??? It can't be, it just can't be.
After creating the scheduled database backup task, errors were found. I created a manual backup to compare the volume of backups, (Manual) full backup, weight 3.5gb. On assignment 3.5g, if no one wrote, then the weight of bytes to bytes. This means that a full one is created (as I understand it)
When creating a backup plan, there is a field for selecting "FULL" or "DIFFERENTIAL" So, the full one was rigidly selected !!!!
1e9e8235366c487db6d55c10b0c3b88d.jpg
I also found an article on Habré
So here there is such an inscription

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).

Here I did not understand at all, so DIFFERENTIAL This is for full or differential.
that's how it is for me

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

SQL 2016
win 2012R2

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Tsvetkov, 2016-08-18
@tsklab

Type: Complete
Add to Existing

Save a full backup every time to the same file (and since you did not give the error text in full - what is wrong - there is no answer).
Answer:
The database is made in a manual full backup
Verification error. No backup information found for database "basa".
Create a backup plan without having to manually do it first.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question