Solved

Ola MS SQL backup solution with compressed option

Posted on 2016-08-07
12
31 Views
Last Modified: 2016-08-10
Hi,

We are using ola backup solution right now and some of the SQL server we are using is SQL 2014 now, so we can make use of the native compression of backup in SQL 2014 right now.

Can ola backup solution take advantage of it? I just added compress = Y option for it, anyway to get the most out of it?
0
Comment
Question by:marrowyung
  • 7
  • 5
12 Comments
 
LVL 1

Author Comment

by:marrowyung
ID: 41746641
also we use this option for log backup using ola:

@BackupType = 'LOG',
@Compress = 'Y',
@CleanupTime = '192'

Open in new window


any option to make sure that unused log is truncated after ola log backup ?
0
 
LVL 45

Accepted Solution

by:
Vitor Montalvão earned 500 total points
ID: 41746795
Can ola backup solution take advantage of it?
Yes. As it is in his wepage:
Compress

Compress the backup. If no value is specified, then the backup compression default in sys.configurations is used.


Value Description
NULL Use the backup compression default in sys.configurations. This is the default.
Y         Compress the backup.
N        Do not compress the backup.

The Compress option in DatabaseBackup uses the COMPRESSION and NO_COMPRESSION options in the SQL Server BACKUP command.


any option to make sure that unused log is truncated after ola log backup ?
By definition a transaction log backup will allways truncate the log so you don't need to worry about that.
0
 
LVL 1

Author Comment

by:marrowyung
ID: 41746806
hi,

wait, we are already doing this, but no other way to make it compress further ? I heard that compression is native to SQL 2014, right?

what is the diff. ?


I knew if we use SQL safe backup pro or litespeed, we can control it further.
0
 
LVL 45

Expert Comment

by:Vitor Montalvão
ID: 41746821
wait, we are already doing this, but no other way to make it compress further ?
No. Usually you can't compress a compressed file. I mean, technically you can but gain nothing with that.
You can see the compression ratio by running the following command:
USE msdb
GO
SELECT backup_size/compressed_backup_size AS CompressRatio
FROM backupset;

Open in new window


I heard that compression is native to SQL 2014, right?
Backup compression is native since SQL Server 2008R2. By default is off but you can turn it on for all databases by configuring it:
USE master;
GO
EXEC sp_configure ‘backup compression default’, '1';
RECONFIGURE WITH OVERRIDE;

Open in new window


I knew if we use SQL safe backup pro or litespeed, we can control it further.
How's that?
0
 
LVL 1

Author Comment

by:marrowyung
ID: 41746997
"I knew if we use SQL safe backup pro or litespeed, we can control it further.
How's that?

ola allow compress level, actually is the litespeed compression level, from 1 to 8.

my EXEC sp_configure ‘backup compression default’, '1'; is all 1. it is running.
0
 
LVL 45

Expert Comment

by:Vitor Montalvão
ID: 41747003
Ola's script doesn't work with Litespeed. In SQL Server you only have compression ON or OFF and when it's ON it should compress at the maximum level possible. Why do someone want only to compress half or whatever?

my EXEC sp_configure ‘backup compression default’, '1'; is all 1. it is running.
Good.
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 1

Author Comment

by:marrowyung
ID: 41747020
"Why do someone want only to compress half or whatever?"

faster..
0
 
LVL 45

Expert Comment

by:Vitor Montalvão
ID: 41747061
If you compress at maximum level should be more faster since it will write less bits in the disk. However it may impact the CPU usage but usually you only perform regular backups during less activities window so the CPU consumption should be irrelevant.
0
 
LVL 1

Author Comment

by:marrowyung
ID: 41748544
so can't control/compress it further by using ola anyway ?
0
 
LVL 45

Expert Comment

by:Vitor Montalvão
ID: 41748581
As far as I know, you can't.
0
 
LVL 1

Author Comment

by:marrowyung
ID: 41749993
ok. tks.
0
 
LVL 1

Author Closing Comment

by:marrowyung
ID: 41749994
tks victor you are great.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Sql server lock cursor 13 41
sql query 7 35
Server 2008 Cluster Fail-over Errors 5 46
SQL Inner Join Vs SubQueries 9 25
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now