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

understanding the need of database snapshot Expand / Collapse
Author
Message
Posted Tuesday, November 5, 2013 10:36 PM
SSC-Enthusiastic

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

Group: General Forum Members
Last Login: Friday, May 23, 2014 7:58 AM
Points: 115, Visits: 210
hi everyone,I want to understand the actual real time benefit of database snapshot.
when u have routine backup and restore mechanism,u take database snapshot for any data loss i.e for wrong updates or deletes.how it is useful when u require to do manual snapshot every time and what about in between changes that occurs between snapshots.
can anyone explain how useful it is in real time.
Post #1511718
Posted Tuesday, November 5, 2013 11:54 PM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Yesterday @ 2:44 PM
Points: 42,443, Visits: 35,498
It's useful when you're about to make a bunch of changes that may need to be undone, for example a code deployment. Easier than restoring from a backup to undo.


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1511728
Posted Wednesday, November 6, 2013 2:54 AM
SSC-Enthusiastic

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

Group: General Forum Members
Last Login: Friday, May 23, 2014 7:58 AM
Points: 115, Visits: 210
What I want to know is what steps should be taken to protect any data loss in between the snapshots that we take along with routine backup and restore task as data keep changing constantly in real time environment.
Thanks in advance
Post #1511764
Posted Wednesday, November 6, 2013 3:24 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 12:40 AM
Points: 7,001, Visits: 8,439
A snapshot is a frozen copy of your actual database.

It can be used to provide users a read-only database state at a given point in time ( =create datetime of the snapshot ).
You can have multiple snapshots of the same database !

DBA can use a DB Snapshot as a potential restore point for upgrades in stead of having to go through the regular database backup full/diff/log combination.

Keep in mind a database snapshot may consume a vast number of GB, depending on the insert/update/delete volume of the database.

They are not to be a replacement for your regular backup schema !


Johan


Don't drive faster than your guardian angel can fly ...
but keeping both feet on the ground won't get you anywhere

- How to post Performance Problems
- How to post data/code to get the best help


- How to prevent a sore throat after hours of presenting ppt ?


"press F1 for solution", "press shift+F1 for urgent solution"


Need a bit of Powershell? How about this

Who am I ? Sometimes this is me but most of the time this is me
Post #1511771
Posted Wednesday, November 6, 2013 4:00 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Yesterday @ 2:44 PM
Points: 42,443, Visits: 35,498
sej2008 (11/6/2013)
What I want to know is what steps should be taken to protect any data loss in between the snapshots that we take along with routine backup and restore task as data keep changing constantly in real time environment.
Thanks in advance


To be honest I wouldn't use snapshots that way. Protecting against data loss is what your backups are for.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1511783
Posted Wednesday, November 6, 2013 5:57 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, July 22, 2014 7:33 AM
Points: 1,361, Visits: 15,264
You need to bear in mind that snapshots are almost a "temporary" backup. I wouldn't bother taking them in addition to normal backups unless there was likely to be a requirement to roll back to that point in time or I had to compare data changes over time for some reason. Perhaps day old reporting if I had limited resources and sql licences.

If the source database becomes corrupt you are unlikely to be able to recover it from the snapshot as the snapshot consists of both the source database and the modified pages in the snapshots sparse files.

You cannot backup a snapshot so if you need to recover the source db from backup, you will loose the snapshots.
Post #1511835
Posted Wednesday, November 6, 2013 12:14 PM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Yesterday @ 12:12 PM
Points: 15,517, Visits: 27,896
The reason snapshots are so fast is that they're only tracking changes pages. It's not an actual backup. It completely dependent on your original database being in place. As Gail has noted, they're not a part of a DR scenario.

----------------------------------------------------
"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 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #1511972
Posted Wednesday, November 6, 2013 2:33 PM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Yesterday @ 6:25 PM
Points: 3,121, Visits: 11,397
I think they are most useful for testing.

When I need to test with production data, I restore to a test database from a production backup, and create a snapshot of the test database.

After I run tests against the test DB, I can restore the test DB from the snapshot to return it to its original condition. This is especially good for testing scripts that make schema changes.



Post #1512011
Posted Wednesday, November 6, 2013 2:52 PM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Tuesday, July 1, 2014 9:14 PM
Points: 564, Visits: 851
I use database snapshots for some of the reasons mentioned above, but I also use it to run DBCC CHECKDB on my mirror instance instead of running it on the principal.

I know this thread has gone in a little bit of a different direction, but just in case someone searches for reasons why to use snapshots I wanted to add my $.02




Microsoft Certified Master - SQL Server 2008
Follow me on twitter: @keith_tate

Forum Etiquette: How to post data/code on a forum to get the best help
Post #1512015
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse