Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

backup Expand / Collapse
Author
Message
Posted Tuesday, January 21, 2014 4:53 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Friday, November 21, 2014 3:20 AM
Points: 432, Visits: 1,073
My sql srver job for sql backup every time appending the backup file and 4 GB database size backup now is 108 GB.Please tell which option i can use for create another file daily , the backup file should not append or delete the first one,it should create another backup file daily.
Post #1532962
Posted Tuesday, January 21, 2014 5:36 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Today @ 1:58 AM
Points: 175, Visits: 216
You must change the backup file name in your BACKUP instruction.
For example, add the date to the backup file name
Post #1532985
Posted Tuesday, January 21, 2014 5:48 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 11:15 AM
Points: 14,005, Visits: 28,387
Or use INIT and FORMAT with the backup command to make it always be a single file instead of a series of files stacked together.

----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of: SQL Server Query Performance Tuning
SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #1532989
Posted Tuesday, January 21, 2014 6:07 AM
SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 1:21 PM
Points: 4,459, Visits: 3,913
I use both of the above suggestions. The standard backup filename always contains the date and the SQL command that performs the backup contains WITH INIT to ensure the backup stands alone. I know this may not be applicable to all environments, but I like to keep things simple with one backup per file.


Tally Tables - Performance Personified
String Splitting with True Performance
Best practices on how to ask questions
Post #1533003
Posted Tuesday, January 21, 2014 6:23 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 11:15 AM
Points: 14,005, Visits: 28,387
Hey Ed, make sure you use FORMAT in addition to the INIT statement. INIT doesn't rewrite the header, so if you ever do modify the backup being done in some fashion you could end up with a backup that can't be restored. I just found out about this one myself recently.

----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of: SQL Server Query Performance Tuning
SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #1533012
Posted Tuesday, January 21, 2014 6:35 AM
SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 1:21 PM
Points: 4,459, Visits: 3,913
Grant Fritchey (1/21/2014)
Hey Ed, make sure you use FORMAT in addition to the INIT statement. INIT doesn't rewrite the header, so if you ever do modify the backup being done in some fashion you could end up with a backup that can't be restored. I just found out about this one myself recently.

Interesting...thank you, Grant. I read the MSDN descriptions of them and INIT replaces any backup sets, but preserves an existing media header on the device. FORMAT specifies that the media header should be rewritten.

I'm interpreting this to mean that when I take a full backup of each database to its own unique file on disk and never share backup files, then there's never a media header to rewrite. Am I reading this correctly? Or did I miss something?



Tally Tables - Performance Personified
String Splitting with True Performance
Best practices on how to ask questions
Post #1533022
Posted Tuesday, January 21, 2014 7:04 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 11:15 AM
Points: 14,005, Visits: 28,387
Ed Wagner (1/21/2014)
Grant Fritchey (1/21/2014)
Hey Ed, make sure you use FORMAT in addition to the INIT statement. INIT doesn't rewrite the header, so if you ever do modify the backup being done in some fashion you could end up with a backup that can't be restored. I just found out about this one myself recently.

Interesting...thank you, Grant. I read the MSDN descriptions of them and INIT replaces any backup sets, but preserves an existing media header on the device. FORMAT specifies that the media header should be rewritten.

I'm interpreting this to mean that when I take a full backup of each database to its own unique file on disk and never share backup files, then there's never a media header to rewrite. Am I reading this correctly? Or did I miss something?


No, you didn't miss anything, but I'm a belts & suspenders kind of guy. Just because you're not rewriting the header doesn't mean you'll never rewrite the header and having it built right in doesn't hurt anything on a one-off backup... You're fine your way, but it's a good thing to know.


----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of: SQL Server Query Performance Tuning
SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #1533036
Posted Tuesday, January 21, 2014 8:32 AM
SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 1:21 PM
Points: 4,459, Visits: 3,913
Grant Fritchey (1/21/2014)
Ed Wagner (1/21/2014)
Grant Fritchey (1/21/2014)
Hey Ed, make sure you use FORMAT in addition to the INIT statement. INIT doesn't rewrite the header, so if you ever do modify the backup being done in some fashion you could end up with a backup that can't be restored. I just found out about this one myself recently.

Interesting...thank you, Grant. I read the MSDN descriptions of them and INIT replaces any backup sets, but preserves an existing media header on the device. FORMAT specifies that the media header should be rewritten.

I'm interpreting this to mean that when I take a full backup of each database to its own unique file on disk and never share backup files, then there's never a media header to rewrite. Am I reading this correctly? Or did I miss something?


No, you didn't miss anything, but I'm a belts & suspenders kind of guy. Just because you're not rewriting the header doesn't mean you'll never rewrite the header and having it built right in doesn't hurt anything on a one-off backup... You're fine your way, but it's a good thing to know.

Good deal. Thanks for the information; it never hurts to know more, until your brain hits critical mass anyway.



Tally Tables - Performance Personified
String Splitting with True Performance
Best practices on how to ask questions
Post #1533128
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse