Database Backup for data and log filesBulk Data Loading and Transaction LogSQL Server tail log backup fails where it shouldn'tRestoring differential backup creates DEFUNCT log file?The purpose of transaction log in Restore FirstBackup File Size Almost 50% of Database File Size with TDE EnabledSQL Server backup media set and file separationSql Server log: is 'Backup|Log was backed up' the same as 'BackupDatabase: Log files done'?In Full recovery mode, when does the buffer/transaction log changes get applied to the database data pages?How to choose which backup files to restore when identical timestamps exist for diff and log backupsDatabase Maintenance Job and Backup Scheduling

How to read the value of this capacitor?

Happy pi day, everyone!

Use of undefined constant bloginfo

What should tie a collection of short-stories together?

Hacking a Safe Lock after 3 tries

What's the meaning of “spike” in the context of “adrenaline spike”?

How difficult is it to simply disable/disengage the MCAS on Boeing 737 Max 8 & 9 Aircraft?

Why doesn't using two cd commands in bash script execute the second command?

How do I hide Chekhov's Gun?

Who is flying the vertibirds?

Are ETF trackers fundamentally better than individual stocks?

Python if-else code style for reduced code for rounding floats

Do these spellcasting foci from Xanathar's Guide to Everything have to be held in a hand?

Why does Bach not break the rules here?

Professor being mistaken for a grad student

Brexit - No Deal Rejection

Interplanetary conflict, some disease destroys the ability to understand or appreciate music

If curse and magic is two sides of the same coin, why the former is forbidden?

How to change two letters closest to a string and one letter immediately after a string using notepad++

Opacity of an object in 2.8

PTIJ: Who should I vote for? (21st Knesset Edition)

What options are left, if Britain cannot decide?

What approach do we need to follow for projects without a test environment?

Unexpected result from ArcLength



Database Backup for data and log files


Bulk Data Loading and Transaction LogSQL Server tail log backup fails where it shouldn'tRestoring differential backup creates DEFUNCT log file?The purpose of transaction log in Restore FirstBackup File Size Almost 50% of Database File Size with TDE EnabledSQL Server backup media set and file separationSql Server log: is 'Backup|Log was backed up' the same as 'BackupDatabase: Log files done'?In Full recovery mode, when does the buffer/transaction log changes get applied to the database data pages?How to choose which backup files to restore when identical timestamps exist for diff and log backupsDatabase Maintenance Job and Backup Scheduling













3















I have been told that for data files backup operate at extent level and for log file, backup operates at page level.



I know that the file type for data file is always "Rows Data" and is stored in the form of extent(Either mixed or uniform extent) whereas logs are stored in the form of Log i.e. VLF(Virtual Log Files).



Can please somebody shed some light on this concept in a bit detailed level as I am a bit puzzled on how backup distinguishes between data and log. If its full backup, it would store all the committed change written to data file, for differential - all changes since last full backup from data file. And for log backup - all changes which is committed however not written to data file.



Appreciate your valuable input on this.










share|improve this question


























    3















    I have been told that for data files backup operate at extent level and for log file, backup operates at page level.



    I know that the file type for data file is always "Rows Data" and is stored in the form of extent(Either mixed or uniform extent) whereas logs are stored in the form of Log i.e. VLF(Virtual Log Files).



    Can please somebody shed some light on this concept in a bit detailed level as I am a bit puzzled on how backup distinguishes between data and log. If its full backup, it would store all the committed change written to data file, for differential - all changes since last full backup from data file. And for log backup - all changes which is committed however not written to data file.



    Appreciate your valuable input on this.










    share|improve this question
























      3












      3








      3








      I have been told that for data files backup operate at extent level and for log file, backup operates at page level.



      I know that the file type for data file is always "Rows Data" and is stored in the form of extent(Either mixed or uniform extent) whereas logs are stored in the form of Log i.e. VLF(Virtual Log Files).



      Can please somebody shed some light on this concept in a bit detailed level as I am a bit puzzled on how backup distinguishes between data and log. If its full backup, it would store all the committed change written to data file, for differential - all changes since last full backup from data file. And for log backup - all changes which is committed however not written to data file.



      Appreciate your valuable input on this.










      share|improve this question














      I have been told that for data files backup operate at extent level and for log file, backup operates at page level.



      I know that the file type for data file is always "Rows Data" and is stored in the form of extent(Either mixed or uniform extent) whereas logs are stored in the form of Log i.e. VLF(Virtual Log Files).



      Can please somebody shed some light on this concept in a bit detailed level as I am a bit puzzled on how backup distinguishes between data and log. If its full backup, it would store all the committed change written to data file, for differential - all changes since last full backup from data file. And for log backup - all changes which is committed however not written to data file.



      Appreciate your valuable input on this.







      sql-server backup






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 11 at 18:24









      Learning_DBAdminLearning_DBAdmin

      17111




      17111




















          2 Answers
          2






          active

          oldest

          votes


















          4















          I have been told that for data files backup operate at extent level and for log file, backup operates at page level.




          I would say this statement is not completely correct. Both data file and log file backup would operate at page level. For differential backup it scans through differential bitmaps and only backs up the data file extents that are marked as changed after full backup.




          I am a bit puzzled on how backup distinguishes between data and log.




          It depends on backup command you give. When you give full backup command the SQL Server knows it has to backup whole database and some transaction log to make sure when backup is restored database is consistent. For log it reads portion of transaction log and backups all changes made from last log backup or full backup.






          share|improve this answer






























            6














            Don't worry about extents and pages.



            A Full backup contains all the data pages. The pages are not written to the backup at a single point-in-time. So a Full also contains the log records needed to redo/undo the changes from the earliest page to latest transaction committed during the backup.



            A differential backup omits all pages not changed since the last Full backup.



            A log backup contains all log records since the last log backup.






            share|improve this answer


















            • 1





              ... and full backups do not include un-used pages (which is why a full backup is smaller than the combined size of the data files, even without compression).

              – Tibor Karaszi
              Mar 12 at 8:14










            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "182"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f231862%2fdatabase-backup-for-data-and-log-files%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            4















            I have been told that for data files backup operate at extent level and for log file, backup operates at page level.




            I would say this statement is not completely correct. Both data file and log file backup would operate at page level. For differential backup it scans through differential bitmaps and only backs up the data file extents that are marked as changed after full backup.




            I am a bit puzzled on how backup distinguishes between data and log.




            It depends on backup command you give. When you give full backup command the SQL Server knows it has to backup whole database and some transaction log to make sure when backup is restored database is consistent. For log it reads portion of transaction log and backups all changes made from last log backup or full backup.






            share|improve this answer



























              4















              I have been told that for data files backup operate at extent level and for log file, backup operates at page level.




              I would say this statement is not completely correct. Both data file and log file backup would operate at page level. For differential backup it scans through differential bitmaps and only backs up the data file extents that are marked as changed after full backup.




              I am a bit puzzled on how backup distinguishes between data and log.




              It depends on backup command you give. When you give full backup command the SQL Server knows it has to backup whole database and some transaction log to make sure when backup is restored database is consistent. For log it reads portion of transaction log and backups all changes made from last log backup or full backup.






              share|improve this answer

























                4












                4








                4








                I have been told that for data files backup operate at extent level and for log file, backup operates at page level.




                I would say this statement is not completely correct. Both data file and log file backup would operate at page level. For differential backup it scans through differential bitmaps and only backs up the data file extents that are marked as changed after full backup.




                I am a bit puzzled on how backup distinguishes between data and log.




                It depends on backup command you give. When you give full backup command the SQL Server knows it has to backup whole database and some transaction log to make sure when backup is restored database is consistent. For log it reads portion of transaction log and backups all changes made from last log backup or full backup.






                share|improve this answer














                I have been told that for data files backup operate at extent level and for log file, backup operates at page level.




                I would say this statement is not completely correct. Both data file and log file backup would operate at page level. For differential backup it scans through differential bitmaps and only backs up the data file extents that are marked as changed after full backup.




                I am a bit puzzled on how backup distinguishes between data and log.




                It depends on backup command you give. When you give full backup command the SQL Server knows it has to backup whole database and some transaction log to make sure when backup is restored database is consistent. For log it reads portion of transaction log and backups all changes made from last log backup or full backup.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 11 at 18:52









                ShankyShanky

                14.5k32143




                14.5k32143























                    6














                    Don't worry about extents and pages.



                    A Full backup contains all the data pages. The pages are not written to the backup at a single point-in-time. So a Full also contains the log records needed to redo/undo the changes from the earliest page to latest transaction committed during the backup.



                    A differential backup omits all pages not changed since the last Full backup.



                    A log backup contains all log records since the last log backup.






                    share|improve this answer


















                    • 1





                      ... and full backups do not include un-used pages (which is why a full backup is smaller than the combined size of the data files, even without compression).

                      – Tibor Karaszi
                      Mar 12 at 8:14















                    6














                    Don't worry about extents and pages.



                    A Full backup contains all the data pages. The pages are not written to the backup at a single point-in-time. So a Full also contains the log records needed to redo/undo the changes from the earliest page to latest transaction committed during the backup.



                    A differential backup omits all pages not changed since the last Full backup.



                    A log backup contains all log records since the last log backup.






                    share|improve this answer


















                    • 1





                      ... and full backups do not include un-used pages (which is why a full backup is smaller than the combined size of the data files, even without compression).

                      – Tibor Karaszi
                      Mar 12 at 8:14













                    6












                    6








                    6







                    Don't worry about extents and pages.



                    A Full backup contains all the data pages. The pages are not written to the backup at a single point-in-time. So a Full also contains the log records needed to redo/undo the changes from the earliest page to latest transaction committed during the backup.



                    A differential backup omits all pages not changed since the last Full backup.



                    A log backup contains all log records since the last log backup.






                    share|improve this answer













                    Don't worry about extents and pages.



                    A Full backup contains all the data pages. The pages are not written to the backup at a single point-in-time. So a Full also contains the log records needed to redo/undo the changes from the earliest page to latest transaction committed during the backup.



                    A differential backup omits all pages not changed since the last Full backup.



                    A log backup contains all log records since the last log backup.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Mar 11 at 18:43









                    David Browne - MicrosoftDavid Browne - Microsoft

                    12.1k729




                    12.1k729







                    • 1





                      ... and full backups do not include un-used pages (which is why a full backup is smaller than the combined size of the data files, even without compression).

                      – Tibor Karaszi
                      Mar 12 at 8:14












                    • 1





                      ... and full backups do not include un-used pages (which is why a full backup is smaller than the combined size of the data files, even without compression).

                      – Tibor Karaszi
                      Mar 12 at 8:14







                    1




                    1





                    ... and full backups do not include un-used pages (which is why a full backup is smaller than the combined size of the data files, even without compression).

                    – Tibor Karaszi
                    Mar 12 at 8:14





                    ... and full backups do not include un-used pages (which is why a full backup is smaller than the combined size of the data files, even without compression).

                    – Tibor Karaszi
                    Mar 12 at 8:14

















                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Database Administrators Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f231862%2fdatabase-backup-for-data-and-log-files%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Lowndes Grove History Architecture References Navigation menu32°48′6″N 79°57′58″W / 32.80167°N 79.96611°W / 32.80167; -79.9661132°48′6″N 79°57′58″W / 32.80167°N 79.96611°W / 32.80167; -79.9661178002500"National Register Information System"Historic houses of South Carolina"Lowndes Grove""+32° 48' 6.00", −79° 57' 58.00""Lowndes Grove, Charleston County (260 St. Margaret St., Charleston)""Lowndes Grove"The Charleston ExpositionIt Happened in South Carolina"Lowndes Grove (House), Saint Margaret Street & Sixth Avenue, Charleston, Charleston County, SC(Photographs)"Plantations of the Carolina Low Countrye

                    random experiment with two different functions on unit interval Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern)Random variable and probability space notionsRandom Walk with EdgesFinding functions where the increase over a random interval is Poisson distributedNumber of days until dayCan an observed event in fact be of zero probability?Unit random processmodels of coins and uniform distributionHow to get the number of successes given $n$ trials , probability $P$ and a random variable $X$Absorbing Markov chain in a computer. Is “almost every” turned into always convergence in computer executions?Stopped random walk is not uniformly integrable

                    How should I support this large drywall patch? Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?How do I cover large gaps in drywall?How do I keep drywall around a patch from crumbling?Can I glue a second layer of drywall?How to patch long strip on drywall?Large drywall patch: how to avoid bulging seams?Drywall Mesh Patch vs. Bulge? To remove or not to remove?How to fix this drywall job?Prep drywall before backsplashWhat's the best way to fix this horrible drywall patch job?Drywall patching using 3M Patch Plus Primer