The RPO

  • Comments posted to this topic are about the item The RPO

  • Thank you, nice easy question for a Friday, spent ages looking for a trick question!

    ...

  • This was removed by the editor as SPAM

  • I was confused by the transaction logs being "from midnight on". What is that relative to? :angry:

  • sestell1 (2/12/2016)


    I was confused by the transaction logs being "from midnight on". What is that relative to? :angry:

    My comment also. I was thinking you stopped transaction logs when the diff was taken then started at midnight.

  • I read that as there is a gap of 4 hours with transaction log backups between 8pm and midnight each day. I don't understand from the question how there is a transaction log backup from 9pm. Am I missing something or do I just need more coffee?

    My understanding of this question would be this:

    1) Restore the full backup from Monday

    2) Restore the differential backup from Friday night at 8pm

    3) - there are no transaction log backups taken since before the last differential so that is the best I can do.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • djj (2/12/2016)


    sestell1 (2/12/2016)


    I was confused by the transaction logs being "from midnight on". What is that relative to? :angry:

    My comment also. I was thinking you stopped transaction logs when the diff was taken then started at midnight.

    Unless the activity of the server fully stops. Why would someone do that? Even if it does, there's no reason to stop them.

    When I read from midnight on, I understood that they started at a certain midnight and kept running every 15 minutes. That way we know they're running on HH:00, HH:15, HH:30 & HH:45. That's why mentioning midnight is relevant.

    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
  • Luis Cazares (2/12/2016)


    djj (2/12/2016)


    sestell1 (2/12/2016)


    I was confused by the transaction logs being "from midnight on". What is that relative to? :angry:

    My comment also. I was thinking you stopped transaction logs when the diff was taken then started at midnight.

    Unless the activity of the server fully stops. Why would someone do that? Even if it does, there's no reason to stop them.

    When I read from midnight on, I understood that they started at a certain midnight and kept running every 15 minutes. That way we know they're running on HH:00, HH:15, HH:30 & HH:45. That's why mentioning midnight is relevant.

    I would never do that in a real system but it seems he was not the only person to read it that way. Not a big deal to be honest. My QOTD history is far from unblemished, points mean nothing and the learning and subsequent discussion is happening.

    This is an excellent question!!!

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • As I understand it, the transaction log backup at 8pm will contain transaction log records from when the previous transaction log backup was taken (7:45pm) until 8pm. So if you restore the differential backup from 8pm, there's no point restoring the log backup from 8pm, you could start from the one taken at 8:15pm. Is that right?

    We take transaction log backups at different times to database backups, so I've never come across this in practice.

  • I read this the same way as a lot of others. I wouldn't set up transaction logs to go from midnight until 8:00 pm but I've learned not to read things into questions that are not stated in the question. This was kind of vague.

    -Tom

  • From midnight on. As in, these are ongoing. I'm not sure why wouldn't think that log backups occur every 15 minutes, on every hour of every day. So 96 times a week.

    The RPO is from the last log backup. I had to give a reference time of midnight, so you know that log backups are on the :00, :15, :30, :45 each hour.

  • Easy Peasy. Thanks.

  • Eh, the "starting at" didn't strike me as that odd, since that's the same language Agent job schedules use.

    Also, if we're trying to read the question exactly, it didn't say "Every 15 minutes, from midnight until 8 PM". It said "Every 15 minutes, from midnight on."

    Without an ending time specified, that would just mean that starting at midnight, a log backup is taken every fifteen minutes, period. To assume it stopped at 8 PM would be just that, an assumption that goes beyond anything stated in the question.

    I think I can understand how that assumption might naturally get made; still, I think the question is fine as it stands.

    Of course, in this case my reading turned out to coincide with the solution marked as the correct one, so I may be a bit biased 🙂

    Cheers!

  • From the answer section, it says - "Restore the differential backup from Friday night at 8pm".

    I have one doubt - do we have to install the diff-backup of just Friday's or the diff- backup from Tuesday's to Friday's?

    ww; Raghu
    --
    The first and the hardest SQL statement I have wrote- "select * from customers" - and I was happy and felt smart.

  • Raghavendra Mudugal (2/12/2016)


    From the answer section, it says - "Restore the differential backup from Friday night at 8pm".

    I have one doubt - do we have to install the diff-backup of just Friday's or the diff- backup from Tuesday's to Friday's?

    Just Friday.

    For backups, two terms have a more or less standardized meaning: "incremental" (includes all changes since the last full or last incremental), and "differential" (includes all changes since the last full).

    Differentials grow larger over time - the differential on Friday includes a lot more changes than the one on Monday. But you only need to restore the last so it's less hassle when restoring.

    Incrementals have a more or less equal size (if we assume that a day of work always causes approximately the same amount of change in the database), but you need to restore all of them in sequence.

    (One could argue that transaction log backups are incremental. They are incremental in nature, when looking at size and restore requirements, but I would not call them that because the methods used for backuping up the data and restoring are completely different from those of a traditional incremental backup).


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/

Viewing 15 posts - 1 through 15 (of 22 total)

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