SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


understanding the need of database snapshot


understanding the need of database snapshot

Author
Message
sej2008
sej2008
SSC Eights!
SSC Eights! (955 reputation)SSC Eights! (955 reputation)SSC Eights! (955 reputation)SSC Eights! (955 reputation)SSC Eights! (955 reputation)SSC Eights! (955 reputation)SSC Eights! (955 reputation)SSC Eights! (955 reputation)

Group: General Forum Members
Points: 955 Visits: 394
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.
GilaMonster
GilaMonster
SSC Guru
SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)

Group: General Forum Members
Points: 222332 Visits: 46287
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, MVP, M.Sc (Comp Sci)
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


sej2008
sej2008
SSC Eights!
SSC Eights! (955 reputation)SSC Eights! (955 reputation)SSC Eights! (955 reputation)SSC Eights! (955 reputation)SSC Eights! (955 reputation)SSC Eights! (955 reputation)SSC Eights! (955 reputation)SSC Eights! (955 reputation)

Group: General Forum Members
Points: 955 Visits: 394
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
ALZDBA
ALZDBA
One Orange Chip
One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)

Group: General Forum Members
Points: 29529 Visits: 8986
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


Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere w00t

- 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 :-D


Need a bit of Powershell? How about this

Who am I ? Sometimes this is me Alien but most of the time this is me Hehe
GilaMonster
GilaMonster
SSC Guru
SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)

Group: General Forum Members
Points: 222332 Visits: 46287
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, MVP, M.Sc (Comp Sci)
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


MysteryJimbo
MysteryJimbo
SSCertifiable
SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)

Group: General Forum Members
Points: 5117 Visits: 15346
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.
Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (97K reputation)SSC Guru (97K reputation)SSC Guru (97K reputation)SSC Guru (97K reputation)SSC Guru (97K reputation)SSC Guru (97K reputation)SSC Guru (97K reputation)SSC Guru (97K reputation)

Group: General Forum Members
Points: 97729 Visits: 33014
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 Query Performance Tuning and SQL Server Execution Plans
Product Evangelist for Red Gate Software
Michael Valentine Jones
Michael Valentine Jones
SSChampion
SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)

Group: General Forum Members
Points: 14327 Visits: 11848
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.
Keith Tate
Keith Tate
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2304 Visits: 979
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
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