Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

Towards the innovative SQL ideas
Browse by Tags · View All
sql server 123
sql 122
ms sql server 119
ms sql 118
database 107
tsql 81
#SQL Server 78
t-sql 75
#sql 71
sql server general 67

Archive · View All
April 2011 14
July 2011 12
May 2011 12
August 2011 11
June 2011 10
September 2011 8
December 2011 6
November 2011 6
June 2013 5
April 2013 5

SQL Server 2008 - Database Backup Compression, Amazing feature for DBA

Nov 30 2011 12:00AM by Paresh Prajapati   

Production Database servers may have databases which are heavily in size. For the maintenance of those database backups are very hard and lengthy as the backups of those heavily databases take more tome to execute and very CPU, memory and IO consumptive. And important thing is backups activity should be completed with in down time or pick time when more users are not connected with databases.

What is solution?
We have alternative ways to use the some backup tool that can help to use in this matter. But SQL Server itself provide the best feature and supported SQL Server 2008 or newer version. That is "Backup Compression". You can read my earlier posts for Automated All Databases Backups, Database Backup files Verification and Details and Split Database Full Backup to Multiple files

Using this feature , we can take a database backups with compression option. And will really reduce time required to backup it, reduce server IO and less CPU and memory consumptive. It is veryfull feature for the DBA. Let us look on below example which will clear you the difference between the noncompressed and compressed backups.We will first perform non-compressed backups for the database which have 4 GB size.

Using Management Studio:


Using TSQL:

#1. Performing noncompressed backup.
SET STATISTICS IO ON
SET STATISTICS TIME ON

BACKUP DATABASE ReportServer TO  
DISK = N'D:\DBBackups\Compressed\ReportServer_NonCompressedBackup.bak' 
WITH NAME = N'ReportServer-Full NonCompressed Database Backup',
NO_COMPRESSION -- Specifying option here

SET STATISTICS IO OFF
SET STATISTICS TIME OFF












#2. Performing compressed backup. 
SET STATISTICS IO ON
SET STATISTICS TIME ON

BACKUP DATABASE ReportServer TO  
DISK = N'D:\DBBackups\Compressed\ReportServer_CompressedBackup.bak' 
WITH NAME = N'ReportServer-Full Compressed Database Backup',
COMPRESSION -- Specifying option here

SET STATISTICS IO OFF
SET STATISTICS TIME OFF












From the result output , you can view the time for the backup execution, CPU usage. Here you have screen for the both of the backups size. 












You can use below query to get the backup statistics, 
SELECT 
bs.database_name AS DatabaseName , -- Database name
backup_size/compressed_backup_size as CompressionRatio, 
CASE bs.type 
 WHEN 'D' THEN 'Full' 
 WHEN 'I' THEN 'Differential' 
 WHEN 'L' THEN 'Log' 
 WHEN 'F' THEN 'File or filegroup' 
 WHEN 'G' THEN 'Differential file' 
 WHEN 'P' THEN 'P' 
 WHEN 'Q' THEN 'Differential partial' 
 END AS BackupType, -- Type of database baclup
bs.backup_start_date AS BackupstartDate, -- Backup start date
bs.backup_finish_date AS BackupFinishDate,  -- Backup finish date
bmf.physical_device_name AS PhysicalDevice, -- baclup Physical localtion
bs.backup_size AS  [BackupSize(In bytes)],  -- Normal backup size (In bytes)
compressed_backup_size AS [ConmpressedBackupSize(In bytes)] -- Compressed backup size (In bytes)
FROM msdb.dbo.backupset bs 
INNER JOIN msdb.dbo.backupmediafamily bmf
ON (bs.media_set_id=bmf.media_set_id)
and database_name = 'ReportServer'
ORDER BY bs.backup_start_date DESC




You can set the default backup setting to Compressed as following, 

Using TSQL :
USE MASTER
GO

EXEC SP_CONFIGURE 'backup compression default', 1
GO
RECONFIGURE WITH OVERRIDE;
GO
From UI :

 I hope you liked this feature..

Tags: sql server 2008, tsql, sql server, ms sql, ms sql server, t-sql, #SQL Server, #sql, database, enhancements, SQL Scripts, SQL new features, backup, Performance,


Paresh Prajapati
6 · 22% · 7102
4
 
0
Lifesaver
 
0
Refreshed
 
0
Learned
 
0
Incorrect



Submit

1  Comments  

  • Just one note: Backup Compression is only supported in:

    • SQL Server 2008 Enterprise Edition (and higher)
    • SQL Server 2008 R2 Standard Edition (and higher)

    If you are running SQL Server 2008 Standard Edition, you won't be able to take advantage of Backup Compression. I also don't believe this is supported in Express editions.

    commented on Dec 19 2011 7:32AM
    Marc Jellinek
    97 · 2% · 556

Your Comment


Sign Up or Login to post a comment.

"SQL Server 2008 - Database Backup Compression, Amazing feature for DBA" rated 5 out of 5 by 4 readers
SQL Server 2008 - Database Backup Compression, Amazing feature for DBA , 5.0 out of 5 based on 4 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]