Snapshots

  • coldfusion244 (7/19/2012)


    Luis Cazares (7/19/2012)


    Why is everyone so upset about the answer? It's clear that the question is if you can restore the database without deleting the other snapshots. Otherwise you wouldn't have multiple snapshots and the scenario won't be the same.

    It's like if someone asked: "Can I restore a database if I don't have a valid backup?"

    And you answered: "Yes, you just need to create a backup from which you want to restore".

    I completely disagree. The question never states that you do or do not delete or keep anything. It literally asked if you could restore from any of them, of which the answer is yes with the caveat of the rest must be dropped. It's not like your scenario at all. In this scenario we have multiple valid points of which to start, in yours we don't.

    The point is you can make it work, but you need to change the scenario first. I gave an example way out of proportion but it's still valid. The question says "you have multiple snapshots, can you restore from any of them?", the answer is "No" because you need to delete the snapshots so you remain with one and is no longer under the terms of the question.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • Heh, perhaps it's because I haven't completely cleared my brain after studying for the MCITP. Because this question read very similar to some questions on that test. I just went into automatic answer mode. Lol.

    +1 for me yayz!



    --Mark Tassin
    MCITP - SQL Server DBA
    Proud member of the Anti-RBAR alliance.
    For help with Performance click this link[/url]
    For tips on how to post your problems[/url]

  • Luis Cazares (7/19/2012)


    coldfusion244 (7/19/2012)


    Luis Cazares (7/19/2012)


    Why is everyone so upset about the answer? It's clear that the question is if you can restore the database without deleting the other snapshots. Otherwise you wouldn't have multiple snapshots and the scenario won't be the same.

    It's like if someone asked: "Can I restore a database if I don't have a valid backup?"

    And you answered: "Yes, you just need to create a backup from which you want to restore".

    I completely disagree. The question never states that you do or do not delete or keep anything. It literally asked if you could restore from any of them, of which the answer is yes with the caveat of the rest must be dropped. It's not like your scenario at all. In this scenario we have multiple valid points of which to start, in yours we don't.

    The point is you can make it work, but you need to change the scenario first.

    No you don't. The scenario is a database with multiple snapshot. The restore procedure for that scenario is a two-step procedure:

    1. Delete the other snapshots.

    2. Restore to the remaining snapshot.

    The original scenario hasn't changed.

    I gave an example way out of proportion but it's still valid. The question says "you have multiple snapshots, can you restore from any of them?", the answer is "No" because you need to delete the snapshots so you remain with one and is no longer under the terms of the question.

    But you can delete the other snapshots. The question doesn't rule that out as an action you can take. It doesn't limit you to a single-step restore process; it doesn't provide any constraints which would lead a solutions-oriented reader to believe that deleting the other snapshots is not an option. And for the answer to be "No", there must be a constraint that the other snapshots cannot be deleted.

    "Can you?" is a question of possibility. If the requested action is possible in any plausible way within the constraints of the scenario, the answer is "Yes." And that's what we have here.

  • I, like Luis, assumed that the reason the additional snapshots were part of the question was to direct the reader to the correct answer. That being said, I also have empathy for those who took the wording as it was stated and picked a different answer even though they completely understood the technology and situation, just misinterpreted the intention because it wasn't clear to them. There have been many times where I've looked at a QOD, seen that it could go two ways and struggled to try and guess the intent. I'm still happy to have the QOD every day regardless of whether I get it right or not and regardless of whether I feel the question was well written or not. Thank you Igor for taking the time to draw up a question, work through it, and get it published. I've done it before and it's not easy. I'm glad you did it!

    Thanks,

    Chad

  • An iffy question at best. I guess I'm glad we don't mess around with snapshots just full backups with twice nightly test restores.

  • Learned something new, thanks for the question!

  • I got it wrong 🙁 but learnt something new. Thanks.

  • What the conversation doesn't mention is that a snapshot is a copy of changed records only, not a snapshot of the entire database. A record gets changed in db, the pre-change record is copied to the snapshot for snapshot consistency. The remaining unchanged records are only in the db, not the snapshot.

    That being said, if there is database corruption, you may not have a full database for restoration from the snapshot.

    *****

    Give a man a fish, and you've given him a meal. Teach a man to fish and he'll ask to borrow your boat.:-P

  • Good Question. This kind of questions could be read carefully due to mistakes, the SQL manual say YES but not specifically say that must not be read only.

    Regards

  • The given answer is absolutely incorrect. http://msdn.microsoft.com/en-us/library/ms189281.aspx states explicitly how to revert to a selected snapshot if multiple snapshots exist.

    1. Select the snapshot you wish to restore.

    2. Drop the other snapshots.

  • anthony.green (7/19/2012)


    I also read it as being Yes as the question didnt specify needing to delete or not delete the other snapshots, so in theory Yes I can revert to any of the snapshots.

    I see it that way. I also see it as "without doing anything else and leaving the snapshots in place"

    Kind of a 50/50 split on how it can be interpreted in my mind.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • tbailey 19088 (7/19/2012)


    The given answer is absolutely incorrect. http://msdn.microsoft.com/en-us/library/ms189281.aspx states explicitly how to revert to a selected snapshot if multiple snapshots exist.

    1. Select the snapshot you wish to restore.

    2. Drop the other snapshots.

    Those are the prerequisites to be able to revert a database.

    A most complete answer would be: "No, you need to drop all snapshots except one to revert the database" (More explained but still a negative answer)

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • Good question on reverting to snapshots. I do not necessarily agree with the 'correct' answer.

  • 😛 Revert from a snapshot and Database Restore from a snapshot are two differant things covered by two differant BOL articles. 😛

    Restore (includes how to restore from ANY snapshot)

    http://msdn.microsoft.com/en-us/library/ms186858.aspx

    <sorry since reverting the database to a database snapshot that predates the damage is main reason you have to do this part first/>

    Back Up the Transaction Log When the Database Is Damaged

    http://msdn.microsoft.com/en-us/library/ms189606.aspx

    <then this can happen/>

    Revert

    http://msdn.microsoft.com/en-us/library/ms189281.aspx

    Poor wording + Wrong Correct Answer = :crazy:

    This teaches only one thing and makes only one point.

    How to fact check pooor information.:hehe: Point is you should always fact check your data. 😎

  • vk-kirov (7/19/2012)


    Weird logic. I don't understand how the answer could be "No", while in fact the database can be restored from any of the snapshots (although not with a single RESTORE DATABASE command). Seems to be pure sophistry.

    I have to agree with you on that. Although if the author understood this words meaning, maybe he could have phrased the QOTD better and not had a +70% fail rate. 😛

    FYI -

    http://en.wikipedia.org/wiki/Sophistry

    a specious (deceptive) argument used for deceiving someone.

Viewing 15 posts - 31 through 45 (of 61 total)

You must be logged in to reply to this topic. Login to reply