Skip to main content
replaced http://dba.stackexchange.com/ with https://dba.stackexchange.com/
Source Link
  1. I had taken all 3 Audit databases backup in MS SQL Server 2012 Enterprise as on dated 23/12/2015. The MS SQL Server 2012 Enterprise version was

    Microsoft SQL Server 2012 (SP1) - 11.0.3000.0 (X64) Oct 19 2012 13:38:57 Copyright (c) Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 6.2 (Build 9200: ) (Hypervisor)

  2. After successfully Migration From MS SQL Server 2012 Enterprise to MS SQL server 2012 Express . Restored all 3 databases in MS SQL Server 2012 Express. All 3 databases restoreration went successfully as on dated 24/12/2015. The MS SQL Server 2012 Express Version is

    Microsoft SQL Server 2012 (SP1) - 11.0.3000.0 (X64) Oct 19 2012 13:38:57 Copyright (c) Microsoft Corporation Express Edition (64-bit) on Windows NT 6.2 (Build 9200: ) (Hypervisor)

  3. After working of few days i have taken full backup of all my 3 Audit databases in MS SQL Server 2012 Express as on dated 31/12/2015.

  4. For myself to check out the database consistency with "LSN" and DatabaseSize. I have gone through so many SQL Blog as well as MSDN BOL. And find out this http://dba.stackexchange.com/questions/55418/missing-transaction-log-in-chain-possible-to-skip/55445?s=2|0.0920#55445https://dba.stackexchange.com/questions/55418/missing-transaction-log-in-chain-possible-to-skip/55445?s=2|0.0920#55445 and http://blogs.msdn.com/b/sqlserverfaq/archive/2010/08/26/transaction-log-backup-and-restore-sequence-myths-amp-truths.aspx for cheking the "LSN" consistency of log chain.

  5. FROM This TSQL to check 'first LSN' and 'Last LSN' and log swquence

    Restore headeronly from disk =N'C:\Backup\AuditDatabase1_23122015.bak' Restore headeronly from disk =N'C:\Backup\AuditDatabase2_23122015.bak' Restore headeronly from disk =N'C:\Backup\AuditDatabase3_23122015.bak'

  1. I had taken all 3 Audit databases backup in MS SQL Server 2012 Enterprise as on dated 23/12/2015. The MS SQL Server 2012 Enterprise version was

    Microsoft SQL Server 2012 (SP1) - 11.0.3000.0 (X64) Oct 19 2012 13:38:57 Copyright (c) Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 6.2 (Build 9200: ) (Hypervisor)

  2. After successfully Migration From MS SQL Server 2012 Enterprise to MS SQL server 2012 Express . Restored all 3 databases in MS SQL Server 2012 Express. All 3 databases restoreration went successfully as on dated 24/12/2015. The MS SQL Server 2012 Express Version is

    Microsoft SQL Server 2012 (SP1) - 11.0.3000.0 (X64) Oct 19 2012 13:38:57 Copyright (c) Microsoft Corporation Express Edition (64-bit) on Windows NT 6.2 (Build 9200: ) (Hypervisor)

  3. After working of few days i have taken full backup of all my 3 Audit databases in MS SQL Server 2012 Express as on dated 31/12/2015.

  4. For myself to check out the database consistency with "LSN" and DatabaseSize. I have gone through so many SQL Blog as well as MSDN BOL. And find out this http://dba.stackexchange.com/questions/55418/missing-transaction-log-in-chain-possible-to-skip/55445?s=2|0.0920#55445 and http://blogs.msdn.com/b/sqlserverfaq/archive/2010/08/26/transaction-log-backup-and-restore-sequence-myths-amp-truths.aspx for cheking the "LSN" consistency of log chain.

  5. FROM This TSQL to check 'first LSN' and 'Last LSN' and log swquence

    Restore headeronly from disk =N'C:\Backup\AuditDatabase1_23122015.bak' Restore headeronly from disk =N'C:\Backup\AuditDatabase2_23122015.bak' Restore headeronly from disk =N'C:\Backup\AuditDatabase3_23122015.bak'

  1. I had taken all 3 Audit databases backup in MS SQL Server 2012 Enterprise as on dated 23/12/2015. The MS SQL Server 2012 Enterprise version was

    Microsoft SQL Server 2012 (SP1) - 11.0.3000.0 (X64) Oct 19 2012 13:38:57 Copyright (c) Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 6.2 (Build 9200: ) (Hypervisor)

  2. After successfully Migration From MS SQL Server 2012 Enterprise to MS SQL server 2012 Express . Restored all 3 databases in MS SQL Server 2012 Express. All 3 databases restoreration went successfully as on dated 24/12/2015. The MS SQL Server 2012 Express Version is

    Microsoft SQL Server 2012 (SP1) - 11.0.3000.0 (X64) Oct 19 2012 13:38:57 Copyright (c) Microsoft Corporation Express Edition (64-bit) on Windows NT 6.2 (Build 9200: ) (Hypervisor)

  3. After working of few days i have taken full backup of all my 3 Audit databases in MS SQL Server 2012 Express as on dated 31/12/2015.

  4. For myself to check out the database consistency with "LSN" and DatabaseSize. I have gone through so many SQL Blog as well as MSDN BOL. And find out this https://dba.stackexchange.com/questions/55418/missing-transaction-log-in-chain-possible-to-skip/55445?s=2|0.0920#55445 and http://blogs.msdn.com/b/sqlserverfaq/archive/2010/08/26/transaction-log-backup-and-restore-sequence-myths-amp-truths.aspx for cheking the "LSN" consistency of log chain.

  5. FROM This TSQL to check 'first LSN' and 'Last LSN' and log swquence

    Restore headeronly from disk =N'C:\Backup\AuditDatabase1_23122015.bak' Restore headeronly from disk =N'C:\Backup\AuditDatabase2_23122015.bak' Restore headeronly from disk =N'C:\Backup\AuditDatabase3_23122015.bak'

Post Closed as "Needs details or clarity" by user507, Philᵀᴹ, Andriy M, Michael Green, Shanky
added 4018 characters in body
Source Link

I would like to say that after migration of MS SQL server 2012 Enterprise to MS SQL Server 2012 Express.

For my Backup and restore of "LSN" consistency i I have gone through with headeronly from backup file to check the "LSN" of full backup file and find out thatseen there is some subtle difference of Database BackupSize and their "First LSN"diffence in DB backupsize as well as in "Last LSN"."LSN" As per the headeronly TSQL link of all databases.

Let's from Missing Transaction log in chain, Possible to skip andbegining i am going to write down step by step http://blogs.msdn.com/b/sqlserverfaq/archive/2010/08/26/transaction-log-backup-and-restore-sequence-myths-amp-truths.aspx. what i have done in migration from MS SQL server 2012 Enterprise to MS SQL Server 2012 Express.

  1. I had taken all 3 Audit databases backup in MS SQL Server 2012 Enterprise as on dated 23/12/2015. The MS SQL Server 2012 Enterprise version was

    Microsoft SQL Server 2012 (SP1) - 11.0.3000.0 (X64) Oct 19 2012 13:38:57 Copyright (c) Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 6.2 (Build 9200: ) (Hypervisor)

  2. After successfully Migration From MS SQL Server 2012 Enterprise to MS SQL server 2012 Express . Restored all 3 databases in MS SQL Server 2012 Express. All 3 databases restoreration went successfully as on dated 24/12/2015. The MS SQL Server 2012 Express Version is

    Microsoft SQL Server 2012 (SP1) - 11.0.3000.0 (X64) Oct 19 2012 13:38:57 Copyright (c) Microsoft Corporation Express Edition (64-bit) on Windows NT 6.2 (Build 9200: ) (Hypervisor)

  3. After working of few days i have taken full backup of all my 3 Audit databases in MS SQL Server 2012 Express as on dated 31/12/2015.

  4. For myself to check out the database consistency with "LSN" and DatabaseSize. I have gone through so many SQL Blog as well as MSDN BOL. And find out this http://dba.stackexchange.com/questions/55418/missing-transaction-log-in-chain-possible-to-skip/55445?s=2|0.0920#55445 and http://blogs.msdn.com/b/sqlserverfaq/archive/2010/08/26/transaction-log-backup-and-restore-sequence-myths-amp-truths.aspx for cheking the "LSN" consistency of log chain.

  5. FROM This TSQL to check 'first LSN' and 'Last LSN' and log swquence

    Restore headeronly from disk =N'C:\Backup\AuditDatabase1_23122015.bak' Restore headeronly from disk =N'C:\Backup\AuditDatabase2_23122015.bak' Restore headeronly from disk =N'C:\Backup\AuditDatabase3_23122015.bak'

Restore headeronly from disk =N'C:\Backup\TestAudit_23122015.bak' --First full These above 3 databses backup file with SN 1,3 & 5had taken in Enterprise Enterprise edition

go

Restore headeronly from disk =N'C:\Backup\TestAudit_31122015.bak' (as on dated 23/12/2015)--After Restore full Backup file with SN 2,4,& 6 in Express Edition

go

After the above TSQL find out the headeronly backupWhich details is as follows:- Here SN in respectively from databse 1,3,5 is a Full Backup , headeronly backup details of MS SQL Server 2012 Enterprise Edition. And SN 2,4,6 is a headeronly backup details of MS SQL Server 2012 Express to 3.

SN  DatabaseVersion DatabaseCreationDate    BackupSize  FirstLSN               LastLSN        CheckpointLSN       DatabaseBackupLSN
1243532800   706571000000388500000  571000000390600000  571000000388500000  571000000372500000
92480512    671000000080800000  671000000082900000  671000000080800000  671000000064900000
57824256    495000000001600000  495000000002600000 25/01/2015 495000000001600000  494000000027300000

And also to checked Express full backup all 3 audit databases, which i had taken full backup as on dated 31/12/2015

Restore 243532800headeronly from disk 571000000388500000=N'C:\Backup\AuditDatabase1_31122015.bak'
Restore headeronly 571000000390600000from disk 571000000388500000=N'C:\Backup\AuditDatabase2_31122015.bak'
Restore headeronly 571000000372500000from disk =N'C:\Backup\AuditDatabase3_31122015.bak'
2

Which details is as follows in respectively from databse 1 to 3.

BackupSize  FirstLSN 706              LastLSN        CheckpointLSN 24/12/2015      DatabaseBackupLSN
243401728   571000000558800000  571000000560900000  571000000558800000  571000000478100000
3
91956224   706 674000000027800000  674000000029900000  674000000027800000  672000000043600000

57627648    498000000013500000  498000000016700000  498000000013500000  496000000028600000

For all 3 databases combinig i am writing the details. Which is as follows

Databases Backup in   BackupSize 14/12/2014 FirstLSN   92480512    671000000080800000  671000000082900000  671000000080800000  671000000064900000  LastLSN        CheckpointLSN       DatabaseBackupLSN
4   706  (1 DB in Enterprise)   243532800   571000000388500000  571000000390600000  571000000388500000  571000000372500000
      24/12/2015(1 DB in Express) 91956224    674000000027800000243401728  674000000029900000 571000000558800000 674000000027800000 571000000560900000 672000000043600000 571000000558800000  571000000478100000
5 

   706 (2 in Enterprise)       92480512    671000000080800000  671000000082900000  671000000080800000  671000000064900000
    (2 in Express) 14/12/2014    57824256    495000000001600000 91956224 495000000002600000  495000000001600000 674000000027800000 494000000027300000 674000000029900000  674000000027800000  672000000043600000
6 

   706  (3 in Enterprise)      57824256    495000000001600000  495000000002600000  495000000001600000  494000000027300000
      24/12/2015(3 in Express)        57627648    498000000013500000  498000000016700000  498000000013500000  496000000028600000

Here i have taken the few details of TSQL query results to understand the DatabaseSize and 'First LSN' & 'Last LSN'. In above table there is Respective database comparision results , which you can seen in table.

Hope i am clear to understood to you. What i mean to say that about log sequence number checking of all 3 databases.

How i could understand i have restore my database with consistent "LSN""LSN".

I would like to say that after migration of MS SQL server 2012 Enterprise to MS SQL Server 2012 Express.

For my Backup and restore of "LSN" consistency i have gone through with headeronly from backup file to check the "LSN" of full backup file and find out that there is some subtle difference of Database BackupSize and their "First LSN" as well as "Last LSN". As per the headeronly TSQL link from Missing Transaction log in chain, Possible to skip and http://blogs.msdn.com/b/sqlserverfaq/archive/2010/08/26/transaction-log-backup-and-restore-sequence-myths-amp-truths.aspx

Restore headeronly from disk =N'C:\Backup\TestAudit_23122015.bak' --First full backup file with SN 1,3 & 5 in Enterprise edition

go

Restore headeronly from disk =N'C:\Backup\TestAudit_31122015.bak' --After Restore full Backup file with SN 2,4,& 6 in Express Edition

go

After the above TSQL find out the headeronly backup details as follows:- Here SN 1,3,5 is a Full Backup , headeronly backup details of MS SQL Server 2012 Enterprise Edition. And SN 2,4,6 is a headeronly backup details of MS SQL Server 2012 Express .

SN  DatabaseVersion DatabaseCreationDate    BackupSize  FirstLSN               LastLSN        CheckpointLSN       DatabaseBackupLSN
1   706                       25/01/2015    243532800   571000000388500000  571000000390600000  571000000388500000  571000000372500000
2   706                       24/12/2015    243401728   571000000558800000  571000000560900000  571000000558800000  571000000478100000
3   706                       14/12/2014    92480512    671000000080800000  671000000082900000  671000000080800000  671000000064900000
4   706                       24/12/2015    91956224    674000000027800000  674000000029900000  674000000027800000  672000000043600000
5   706                       14/12/2014    57824256    495000000001600000  495000000002600000  495000000001600000  494000000027300000
6   706                        24/12/2015   57627648    498000000013500000  498000000016700000  498000000013500000  496000000028600000

How i could understand i have restore my database with consistent "LSN".

I would like to say that after migration of MS SQL server 2012 Enterprise to MS SQL Server 2012 Express. I have seen there is some subtle diffence in DB backupsize as well as in "LSN" of all databases.

Let's from begining i am going to write down step by step . what i have done in migration from MS SQL server 2012 Enterprise to MS SQL Server 2012 Express.

  1. I had taken all 3 Audit databases backup in MS SQL Server 2012 Enterprise as on dated 23/12/2015. The MS SQL Server 2012 Enterprise version was

    Microsoft SQL Server 2012 (SP1) - 11.0.3000.0 (X64) Oct 19 2012 13:38:57 Copyright (c) Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 6.2 (Build 9200: ) (Hypervisor)

  2. After successfully Migration From MS SQL Server 2012 Enterprise to MS SQL server 2012 Express . Restored all 3 databases in MS SQL Server 2012 Express. All 3 databases restoreration went successfully as on dated 24/12/2015. The MS SQL Server 2012 Express Version is

    Microsoft SQL Server 2012 (SP1) - 11.0.3000.0 (X64) Oct 19 2012 13:38:57 Copyright (c) Microsoft Corporation Express Edition (64-bit) on Windows NT 6.2 (Build 9200: ) (Hypervisor)

  3. After working of few days i have taken full backup of all my 3 Audit databases in MS SQL Server 2012 Express as on dated 31/12/2015.

  4. For myself to check out the database consistency with "LSN" and DatabaseSize. I have gone through so many SQL Blog as well as MSDN BOL. And find out this http://dba.stackexchange.com/questions/55418/missing-transaction-log-in-chain-possible-to-skip/55445?s=2|0.0920#55445 and http://blogs.msdn.com/b/sqlserverfaq/archive/2010/08/26/transaction-log-backup-and-restore-sequence-myths-amp-truths.aspx for cheking the "LSN" consistency of log chain.

  5. FROM This TSQL to check 'first LSN' and 'Last LSN' and log swquence

    Restore headeronly from disk =N'C:\Backup\AuditDatabase1_23122015.bak' Restore headeronly from disk =N'C:\Backup\AuditDatabase2_23122015.bak' Restore headeronly from disk =N'C:\Backup\AuditDatabase3_23122015.bak'

-- These above 3 databses backup had taken in Enterprise (as on dated 23/12/2015)--

Which details is as follows in respectively from databse 1 to 3.

BackupSize  FirstLSN               LastLSN        CheckpointLSN       DatabaseBackupLSN
243532800   571000000388500000  571000000390600000  571000000388500000  571000000372500000
92480512    671000000080800000  671000000082900000  671000000080800000  671000000064900000
57824256    495000000001600000  495000000002600000  495000000001600000  494000000027300000

And also to checked Express full backup all 3 audit databases, which i had taken full backup as on dated 31/12/2015

Restore headeronly from disk =N'C:\Backup\AuditDatabase1_31122015.bak'
Restore headeronly from disk =N'C:\Backup\AuditDatabase2_31122015.bak'
Restore headeronly from disk =N'C:\Backup\AuditDatabase3_31122015.bak'

Which details is as follows in respectively from databse 1 to 3.

BackupSize  FirstLSN               LastLSN        CheckpointLSN       DatabaseBackupLSN
243401728   571000000558800000  571000000560900000  571000000558800000  571000000478100000

91956224    674000000027800000  674000000029900000  674000000027800000  672000000043600000

57627648    498000000013500000  498000000016700000  498000000013500000  496000000028600000

For all 3 databases combinig i am writing the details. Which is as follows

Databases Backup in   BackupSize  FirstLSN               LastLSN        CheckpointLSN       DatabaseBackupLSN
     (1 DB in Enterprise)   243532800   571000000388500000  571000000390600000  571000000388500000  571000000372500000
      (1 DB in Express)     243401728   571000000558800000  571000000560900000  571000000558800000  571000000478100000
 

    (2 in Enterprise)       92480512    671000000080800000  671000000082900000  671000000080800000  671000000064900000
    (2 in Express)          91956224    674000000027800000  674000000029900000  674000000027800000  672000000043600000
 

     (3 in Enterprise)      57824256    495000000001600000  495000000002600000  495000000001600000  494000000027300000
      (3 in Express)        57627648    498000000013500000  498000000016700000  498000000013500000  496000000028600000

Here i have taken the few details of TSQL query results to understand the DatabaseSize and 'First LSN' & 'Last LSN'. In above table there is Respective database comparision results , which you can seen in table.

Hope i am clear to understood to you. What i mean to say that about log sequence number checking of all 3 databases.

How i could understand i have restore my database with consistent "LSN".

added 1395 characters in body
Source Link

Restore headeronly from disk =N'C:\Backup\TestAudit_23122015.bak' --First full backup file details in SN 1,3,5

go

Restore headeronly from disk =N'C:\Backup\TestAudit_31122015.bak' --After Restore full Backup file details in SN 2,4,6

go

For my Backup and restore of "LSN" consistency i have gone through with headeronly from backup file to check the "LSN" of full backup file and findfind out that the "LSN" is same but there is some subtle difference of Database BackupSize and their "First LSN" as well as "Last LSN". As per the headeronly TSQL link from Missing Transaction log in chain, Possible to skip and http://blogs.msdn.com/b/sqlserverfaq/archive/2010/08/26/transaction-log-backup-and-restore-sequence-myths-amp-truths.aspx

Restore headeronly from disk =N'C:\Backup\TestAudit_23122015.bak' --First full backup file with SN 1,3 & 5 in Enterprise edition

go

Restore headeronly from disk =N'C:\Backup\TestAudit_31122015.bak' --After Restore full Backup file with SN 2,4,& 6 in Express Edition

go

I am also sendingAfter the someabove TSQL find out the headeronly backup details as follows:- Here SN 1,3,5 is a Full Backup , headeronly backup details of Headeronly TSQL executionMS SQL Server 2012 Enterprise Edition. And SN 2,4,6 is a headeronly backup details of MS SQL Server 2012 Express .

SN  DatabaseVersion DatabaseCreationDate    BackupSize  FirstLSN               LastLSN        CheckpointLSN       DatabaseBackupLSN
1   706                       25/01/2015    243532800   571000000388500000  571000000390600000  571000000388500000  571000000372500000
2   706                       24/12/2015    243401728   571000000558800000  571000000560900000  571000000558800000  571000000478100000
3   706                       14/12/2014    92480512    671000000080800000  671000000082900000  671000000080800000  671000000064900000
4   706                       24/12/2015    91956224    674000000027800000  674000000029900000  674000000027800000  672000000043600000
5   706                       14/12/2014    57824256    495000000001600000  495000000002600000  495000000001600000  494000000027300000
6   706                        24/12/2015   57627648    498000000013500000  498000000016700000  498000000013500000  496000000028600000
                                    

Here SN 1,3 & 5 is full backup of MS SQL Server 2012 Enterprise and SN 2,4,6 is after restore backup details of same files.

Restore headeronly from disk =N'C:\Backup\TestAudit_23122015.bak' --First full backup file details in SN 1,3,5

go

Restore headeronly from disk =N'C:\Backup\TestAudit_31122015.bak' --After Restore full Backup file details in SN 2,4,6

go

For my Backup and restore of "LSN" consistency i have gone through with headeronly from backup file to check the "LSN" of full backup file and find out that the "LSN" is same but there is some subtle difference of Database BackupSize and their "First LSN" as well as "Last LSN".

I am also sending the some details of Headeronly TSQL execution details.

SN  DatabaseVersion DatabaseCreationDate    BackupSize  FirstLSN               LastLSN        CheckpointLSN       DatabaseBackupLSN
1   706                       25/01/2015    243532800   571000000388500000  571000000390600000  571000000388500000  571000000372500000
2   706                       24/12/2015    243401728   571000000558800000  571000000560900000  571000000558800000  571000000478100000
3   706                       14/12/2014    92480512    671000000080800000  671000000082900000  671000000080800000  671000000064900000
4   706                       24/12/2015    91956224    674000000027800000  674000000029900000  674000000027800000  672000000043600000
5   706                       14/12/2014    57824256    495000000001600000  495000000002600000  495000000001600000  494000000027300000
6   706                        24/12/2015   57627648    498000000013500000  498000000016700000  498000000013500000  496000000028600000
                                    

Here SN 1,3 & 5 is full backup of MS SQL Server 2012 Enterprise and SN 2,4,6 is after restore backup details of same files.

For my Backup and restore of "LSN" consistency i have gone through with headeronly from backup file to check the "LSN" of full backup file and find out that there is some subtle difference of Database BackupSize and their "First LSN" as well as "Last LSN". As per the headeronly TSQL link from Missing Transaction log in chain, Possible to skip and http://blogs.msdn.com/b/sqlserverfaq/archive/2010/08/26/transaction-log-backup-and-restore-sequence-myths-amp-truths.aspx

Restore headeronly from disk =N'C:\Backup\TestAudit_23122015.bak' --First full backup file with SN 1,3 & 5 in Enterprise edition

go

Restore headeronly from disk =N'C:\Backup\TestAudit_31122015.bak' --After Restore full Backup file with SN 2,4,& 6 in Express Edition

go

After the above TSQL find out the headeronly backup details as follows:- Here SN 1,3,5 is a Full Backup , headeronly backup details of MS SQL Server 2012 Enterprise Edition. And SN 2,4,6 is a headeronly backup details of MS SQL Server 2012 Express .

SN  DatabaseVersion DatabaseCreationDate    BackupSize  FirstLSN               LastLSN        CheckpointLSN       DatabaseBackupLSN
1   706                       25/01/2015    243532800   571000000388500000  571000000390600000  571000000388500000  571000000372500000
2   706                       24/12/2015    243401728   571000000558800000  571000000560900000  571000000558800000  571000000478100000
3   706                       14/12/2014    92480512    671000000080800000  671000000082900000  671000000080800000  671000000064900000
4   706                       24/12/2015    91956224    674000000027800000  674000000029900000  674000000027800000  672000000043600000
5   706                       14/12/2014    57824256    495000000001600000  495000000002600000  495000000001600000  494000000027300000
6   706                        24/12/2015   57627648    498000000013500000  498000000016700000  498000000013500000  496000000028600000
added 1010 characters in body
Source Link
Loading
Source Link
Loading