Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Database backup striping


Database backup striping

Author
Message
pehlebhiayatha
pehlebhiayatha
Grasshopper
Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)

Group: General Forum Members
Points: 11 Visits: 108
Hello Pros,
I manage 100 + SQL servers and wanted to find a way to backup all databases to multiple .bak files (striping) regardless of the DB size. Below is the closes one I got on google. can anyone shed some light\share script that can accomplish this. Thanks in advance for your help.

DECLARE @sql VARCHAR(max);

SELECT @sql = COALESCE(@sql,'')+
      
            'BACKUP DATABASE '+db.name+' '+CHAR(13)+
            'TO DISK = ''c:\'+db.name+'_1.bak'','+CHAR(13)+
            'DISK = ''c:\'+db.name+'_2.bak'','+CHAR(13)+
            'DISK = ''c:\'+db.name+'_3.bak'','+CHAR(13)+
            'DISK = ''c:\'+db.name+'_5.bak''with INIT, compression'+CHAR(13)+CHAR(13)

FROM sys.databases db
WHERE name NOT IN ('tempdb','pubs','AdventureWorks','AdventureWorksDW')

exec(@sql)
---PRINT(@sql)
Jeffrey Williams 3188
Jeffrey Williams 3188
SSCarpal Tunnel
SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)SSCarpal Tunnel (4.5K reputation)

Group: General Forum Members
Points: 4461 Visits: 9829
You will only see value in striping a backup when you have multiple drives available - and separate IO paths to those drives. Striping a backup to the same location could actually slow your backups down.

What is the problem you are trying to resolve?

Jeffrey Williams
Problems are opportunities brilliantly disguised as insurmountable obstacles.

How to post questions to get better answers faster
Managing Transaction Logs

HowardW
HowardW
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1211 Visits: 9892
Jeffrey Williams 3188 (5/16/2013)
You will only see value in striping a backup when you have multiple drives available - and separate IO paths to those drives. Striping a backup to the same location could actually slow your backups down.


That's not true when using native compression. Each file backs up with a single thread, so to make use of multi-threading for the compression, you need multiple backup files. The single-threaded nature of backup compression is almost always the bottleneck in modern servers, so even if writing to a single LUN/volume there are serious performance gains from multiple files.

I'd recommend looking at Ola's excellent backup scripts, which have a parameter for splitting to multiple files:

http://ola.hallengren.com/sql-server-backup.html
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search