Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 5123

Differential backup files are almost the same size as full backups.

$
0
0

Hello All,

I have done a little research on this topic and feel like we are not doing anything to cause this issue. Any assistance is greatly appreciated. 

The details: Microsoft SQL Server 2008 R2 (SP2) - 10.50.4297.0 (X64)   Nov 22 2013 17:24:14   Copyright (c) Microsoft Corporation  Web Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor).  The database I am working with it 23GB. The full backup files are 23GB, differentials are 16GB (and growing) and transaction logs bounce between 700KB to 20MB. The backup schedules with T-SQL follow:

T-Log: daily every four hours
BACKUP LOG [my_dabase] TO  DISK = N'F:\Backup\TLog\my_dabase_backup_2015_03_23_163444_2725556.trn' WITH NOFORMAT, NOINIT,  NAME = N'my_dabase_backup_2015_03_23_163444_2725556', SKIP, REWIND, NOUNLOAD,  STATS = 10
GO

Diff: once daily
BACKUP DATABASE [my_database] TO  DISK = N'F:\Backup\Diff\my_database_backup_2015_03_23_163657_1825556.dif' WITH  DIFFERENTIAL , NOFORMAT, NOINIT,  NAME = N'my_database_backup_2015_03_23_163657_1825556', SKIP, REWIND, NOUNLOAD,  STATS = 10
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N'my_database' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N'my_database' )
if @backupSetId is null begin raiserror(N'Verify failed. Backup information for database ''my_database'' not found.', 16, 1) end
RESTORE VERIFYONLY FROM  DISK = N'F:\Backup\Diff\my_database_backup_2015_03_23_163657_1825556.dif' WITH  FILE = @backupSetId,  NOUNLOAD,  NOREWIND
GO

Full: once weekly
BACKUP DATABASE [my_database] TO  DISK = N'F:\Backup\Full\my_database_backup_2015_03_23_164248_7765556.bak' WITH NOFORMAT, NOINIT,  NAME = N'my_database_backup_2015_03_23_164248_7765556', SKIP, REWIND, NOUNLOAD,  STATS = 10
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N'my_database' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N'my_database' )
if @backupSetId is null begin raiserror(N'Verify failed. Backup information for database ''my_database'' not found.', 16, 1) end
RESTORE VERIFYONLY FROM  DISK = N'F:\Backup\Full\my_database_backup_2015_03_23_164248_7765556.bak' WITH  FILE = @backupSetId,  NOUNLOAD,  NOREWIND
GO

As you can probably tell we are not doing anything special in the backups, they are simply built out in MSSQL Management Studio. All databases are set to full recovery mode. We do not rebuild indexes but do reorganize indexes once weekly and also update statistics weekly.

Reorganize Indexes T-SQL (there are 255 indexes on this database)
USE [my_database]
GO
ALTER INDEX [IDX_index_name_0] ON [dbo].[table_name] REORGANIZE WITH ( LOB_COMPACTION = ON )
GO

Update Statistics T-SQL (there are 80 tables updated)
use [my_database]
GO
UPDATE STATISTICS [dbo].[table_name]
WITH FULLSCAN
GO

In a different post I saw a request to run the following query:

use msdb
go
select top 10 bf.physical_device_name, bs.database_creation_date,bs.type
from  dbo.backupset bs
inner join dbo.backupmediafamily bf on bf.media_set_id=bs.media_set_id
where   bs.database_name='my_database'
order by bs.database_creation_date

Results of query:

physical_device_name database_creation_date type
F:\Backup\Full\my_database_backup_2015_03_07_000006_2780149.bak 2014-02-08 21:14:36.000 D
F:\Backup\Diff\Pre_Upgrade_OE.dif 2014-02-08 21:14:36.000 I
F:\Backup\Diff\my_database_backup_2015_03_11_160430_7481022.dif 2015-03-07 02:58:26.000 I
F:\Backup\Full\my_database_backup_2015_03_11_160923_9651022.bak 2015-03-07 02:58:26.000 D
F:\Backup\Diff\my_database_backup_2015_03_11_162343_7071022.dif 2015-03-07 02:58:26.000 I
F:\Backup\TLog\my_database_backup_2015_03_11_162707_4781022.trn 2015-03-07 02:58:26.000 L
F:\Backup\TLog\my_database_backup_2015_03_11_164411_5825904.trn 2015-03-07 02:58:26.000 L
F:\Backup\TLog\my_database_backup_2015_03_11_200004_1011022.trn 2015-03-07 02:58:26.000 L
F:\Backup\TLog\my_database_backup_2015_03_12_000005_4201022.trn 2015-03-07 02:58:26.000 L
F:\Backup\Diff\my_database_backup_2015_03_12_000005_4441022.dif 2015-03-07 02:58:26.000 I


Is your field ready?


Viewing all articles
Browse latest Browse all 5123

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>