Hello,
Here's a brief outline of my scenario:
I am trying to recover from a database corruption problem. I have a
backup of the db's physical MDF and LDF files from before the
corruption, but no actual backup (ie bak file). I also have daily
transaction log backups right up to today, and my live db is still
operation despite the corruption, so I can take another transaction
log backup when I do the repair.
The problem I have is I don't know how to, or if it's possible to
attach the backup MDF & LDF files and then somehow apply my
transaction log backups to build a new up to date database.
Thanks,
AlexYou would need Attach with NORECOVERY, which currently is not a possibility.
There is a connect item you can vote in for a future feature request.
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=270651
--
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
<cosmasdev@.yahoo.com> wrote in message
news:1177078845.141070.271000@.n59g2000hsh.googlegroups.com...
> Hello,
> Here's a brief outline of my scenario:
> I am trying to recover from a database corruption problem. I have a
> backup of the db's physical MDF and LDF files from before the
> corruption, but no actual backup (ie bak file). I also have daily
> transaction log backups right up to today, and my live db is still
> operation despite the corruption, so I can take another transaction
> log backup when I do the repair.
> The problem I have is I don't know how to, or if it's possible to
> attach the backup MDF & LDF files and then somehow apply my
> transaction log backups to build a new up to date database.
> Thanks,
> Alex
>|||Alex,
If you don't mind my asking, what kind of corruption did you get and how did
it happen. We're just moving to SQLServer to avoid corruptions and I'd hate
to find that we did not leave the problem behind.
Regards
Brian Morris
<cosmasdev@.yahoo.com> wrote in message
news:1177078845.141070.271000@.n59g2000hsh.googlegroups.com...
> Hello,
> Here's a brief outline of my scenario:
> I am trying to recover from a database corruption problem. I have a
> backup of the db's physical MDF and LDF files from before the
> corruption, but no actual backup (ie bak file). I also have daily
> transaction log backups right up to today, and my live db is still
> operation despite the corruption, so I can take another transaction
> log backup when I do the repair.
> The problem I have is I don't know how to, or if it's possible to
> attach the backup MDF & LDF files and then somehow apply my
> transaction log backups to build a new up to date database.
> Thanks,
> Alex
>
Showing posts with label scenario. Show all posts
Showing posts with label scenario. Show all posts
Wednesday, March 28, 2012
Restoring Transaction log
Hi everyone,
First off, any help will be appreciated.
The scenario is that a chunk of data from one of the tables in a
database have been mistakenly deleted. I have done a complete backup of
the database and the backed up the log. I attempted restoring the
Database first with teh Norecpvery option and that worked. when I tried
restoring the log file with the STOPAT clause I get an error. I am
reproducing the script at the error below. Please help if you can
'Restoring the Database - Successful, with message shown below
RESTORE DATABASE MatriEdu2006
FROM DISK = 'C:\EducMatri06.db' WITH NORECOVERY,
MOVE 'EduMatri_Data' TO 'C:\MatriEdu2006.mdf',
MOVE 'EduMatri_Log' TO 'C:\MatriEdu2006.ldf'
Processed 920 pages for database 'MatriEdu2006', file 'Edu_Data' on
file 1.
Processed 1 pages for database 'MatriEdu2006', file 'Edu_Log' on file
1.
RESTORE DATABASE successfully processed 921 pages in 1.114 seconds
(6.766 MB/sec).
'Restore Log - Failed, with error message shown below
RESTORE LOG MatriEdu2006
FROM DISK = 'C:\EducationMatrix_Log'
WITH RECOVERY, STOPAT = 'Dec 11, 2006 03:14 PM'
Server: Msg 4326, Level 16, State 1, Line 1
The log in this backup set terminates at LSN 537000000112000001, which
is too early to apply to the database. A more recent log backup that
includes LSN 553000000066000001 can be restored.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE LOG is terminating abnormally.
>>> On 12/10/2006 at 5:40 PM, in message
<1165797639.616739.281890@.80g2000cwy.googlegroups. com>,
highflier<nbarnard@.au.loreal.com> wrote:
> Server: Msg 4326, Level 16, State 1, Line 1
> The log in this backup set terminates at LSN 537000000112000001,
> which
> is too early to apply to the database. A more recent log backup that
> includes LSN 553000000066000001 can be restored.
> Server: Msg 3013, Level 16, State 1, Line 1
> RESTORE LOG is terminating abnormally.
You need to find a full backup made *before* the data loss, along with
all the logs made between that full and the time of the data loss.
|||This also indicates that something else is wrong here. If an LSN terminates
with a number that precedes the LSN of an earlier transaction log, that
transaction log needs to be skipped during a restore.
In your case below, the 537000000112000001 does exactly this so figure out
which TRN this is and when you run the restore and it comes time to restore
from this TRN log, skip it and go on to the next one. The database choked
on a transaction before one log completed but fixed itself during the next
one so all the stuff in that log is not needed as the transaction completed
during the execution of the next log.
Regards,
Jamie
"highflier" wrote:
> Hi everyone,
> First off, any help will be appreciated.
> The scenario is that a chunk of data from one of the tables in a
> database have been mistakenly deleted. I have done a complete backup of
> the database and the backed up the log. I attempted restoring the
> Database first with teh Norecpvery option and that worked. when I tried
> restoring the log file with the STOPAT clause I get an error. I am
> reproducing the script at the error below. Please help if you can
> 'Restoring the Database - Successful, with message shown below
> RESTORE DATABASE MatriEdu2006
> FROM DISK = 'C:\EducMatri06.db' WITH NORECOVERY,
> MOVE 'EduMatri_Data' TO 'C:\MatriEdu2006.mdf',
> MOVE 'EduMatri_Log' TO 'C:\MatriEdu2006.ldf'
> Processed 920 pages for database 'MatriEdu2006', file 'Edu_Data' on
> file 1.
> Processed 1 pages for database 'MatriEdu2006', file 'Edu_Log' on file
> 1.
> RESTORE DATABASE successfully processed 921 pages in 1.114 seconds
> (6.766 MB/sec).
>
> 'Restore Log - Failed, with error message shown below
> RESTORE LOG MatriEdu2006
> FROM DISK = 'C:\EducationMatrix_Log'
> WITH RECOVERY, STOPAT = 'Dec 11, 2006 03:14 PM'
> Server: Msg 4326, Level 16, State 1, Line 1
> The log in this backup set terminates at LSN 537000000112000001, which
> is too early to apply to the database. A more recent log backup that
> includes LSN 553000000066000001 can be restored.
> Server: Msg 3013, Level 16, State 1, Line 1
> RESTORE LOG is terminating abnormally.
>
sql
First off, any help will be appreciated.
The scenario is that a chunk of data from one of the tables in a
database have been mistakenly deleted. I have done a complete backup of
the database and the backed up the log. I attempted restoring the
Database first with teh Norecpvery option and that worked. when I tried
restoring the log file with the STOPAT clause I get an error. I am
reproducing the script at the error below. Please help if you can
'Restoring the Database - Successful, with message shown below
RESTORE DATABASE MatriEdu2006
FROM DISK = 'C:\EducMatri06.db' WITH NORECOVERY,
MOVE 'EduMatri_Data' TO 'C:\MatriEdu2006.mdf',
MOVE 'EduMatri_Log' TO 'C:\MatriEdu2006.ldf'
Processed 920 pages for database 'MatriEdu2006', file 'Edu_Data' on
file 1.
Processed 1 pages for database 'MatriEdu2006', file 'Edu_Log' on file
1.
RESTORE DATABASE successfully processed 921 pages in 1.114 seconds
(6.766 MB/sec).
'Restore Log - Failed, with error message shown below
RESTORE LOG MatriEdu2006
FROM DISK = 'C:\EducationMatrix_Log'
WITH RECOVERY, STOPAT = 'Dec 11, 2006 03:14 PM'
Server: Msg 4326, Level 16, State 1, Line 1
The log in this backup set terminates at LSN 537000000112000001, which
is too early to apply to the database. A more recent log backup that
includes LSN 553000000066000001 can be restored.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE LOG is terminating abnormally.
>>> On 12/10/2006 at 5:40 PM, in message
<1165797639.616739.281890@.80g2000cwy.googlegroups. com>,
highflier<nbarnard@.au.loreal.com> wrote:
> Server: Msg 4326, Level 16, State 1, Line 1
> The log in this backup set terminates at LSN 537000000112000001,
> which
> is too early to apply to the database. A more recent log backup that
> includes LSN 553000000066000001 can be restored.
> Server: Msg 3013, Level 16, State 1, Line 1
> RESTORE LOG is terminating abnormally.
You need to find a full backup made *before* the data loss, along with
all the logs made between that full and the time of the data loss.
|||This also indicates that something else is wrong here. If an LSN terminates
with a number that precedes the LSN of an earlier transaction log, that
transaction log needs to be skipped during a restore.
In your case below, the 537000000112000001 does exactly this so figure out
which TRN this is and when you run the restore and it comes time to restore
from this TRN log, skip it and go on to the next one. The database choked
on a transaction before one log completed but fixed itself during the next
one so all the stuff in that log is not needed as the transaction completed
during the execution of the next log.
Regards,
Jamie
"highflier" wrote:
> Hi everyone,
> First off, any help will be appreciated.
> The scenario is that a chunk of data from one of the tables in a
> database have been mistakenly deleted. I have done a complete backup of
> the database and the backed up the log. I attempted restoring the
> Database first with teh Norecpvery option and that worked. when I tried
> restoring the log file with the STOPAT clause I get an error. I am
> reproducing the script at the error below. Please help if you can
> 'Restoring the Database - Successful, with message shown below
> RESTORE DATABASE MatriEdu2006
> FROM DISK = 'C:\EducMatri06.db' WITH NORECOVERY,
> MOVE 'EduMatri_Data' TO 'C:\MatriEdu2006.mdf',
> MOVE 'EduMatri_Log' TO 'C:\MatriEdu2006.ldf'
> Processed 920 pages for database 'MatriEdu2006', file 'Edu_Data' on
> file 1.
> Processed 1 pages for database 'MatriEdu2006', file 'Edu_Log' on file
> 1.
> RESTORE DATABASE successfully processed 921 pages in 1.114 seconds
> (6.766 MB/sec).
>
> 'Restore Log - Failed, with error message shown below
> RESTORE LOG MatriEdu2006
> FROM DISK = 'C:\EducationMatrix_Log'
> WITH RECOVERY, STOPAT = 'Dec 11, 2006 03:14 PM'
> Server: Msg 4326, Level 16, State 1, Line 1
> The log in this backup set terminates at LSN 537000000112000001, which
> is too early to apply to the database. A more recent log backup that
> includes LSN 553000000066000001 can be restored.
> Server: Msg 3013, Level 16, State 1, Line 1
> RESTORE LOG is terminating abnormally.
>
sql
Labels:
adatabase,
appreciated,
chunk,
database,
log,
microsoft,
mistakenly,
mysql,
oracle,
restoring,
scenario,
server,
sql,
tables,
transaction
Restoring Transaction log
Hi everyone,
First off, any help will be appreciated.
The scenario is that a chunk of data from one of the tables in a
database have been mistakenly deleted. I have done a complete backup of
the database and the backed up the log. I attempted restoring the
Database first with teh Norecpvery option and that worked. when I tried
restoring the log file with the STOPAT clause I get an error. I am
reproducing the script at the error below. Please help if you can
'Restoring the Database - Successful, with message shown below
RESTORE DATABASE MatriEdu2006
FROM DISK = 'C:\EducMatri06.db' WITH NORECOVERY,
MOVE 'EduMatri_Data' TO 'C:\MatriEdu2006.mdf',
MOVE 'EduMatri_Log' TO 'C:\MatriEdu2006.ldf'
Processed 920 pages for database 'MatriEdu2006', file 'Edu_Data' on
file 1.
Processed 1 pages for database 'MatriEdu2006', file 'Edu_Log' on file
1.
RESTORE DATABASE successfully processed 921 pages in 1.114 seconds
(6.766 MB/sec).
'Restore Log - Failed, with error message shown below
RESTORE LOG MatriEdu2006
FROM DISK = 'C:\EducationMatrix_Log'
WITH RECOVERY, STOPAT = 'Dec 11, 2006 03:14 PM'
Server: Msg 4326, Level 16, State 1, Line 1
The log in this backup set terminates at LSN 537000000112000001, which
is too early to apply to the database. A more recent log backup that
includes LSN 553000000066000001 can be restored.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE LOG is terminating abnormally.>>> On 12/10/2006 at 5:40 PM, in message
<1165797639.616739.281890@.80g2000cwy.googlegroups.com>,
highflier<nbarnard@.au.loreal.com> wrote:
> Server: Msg 4326, Level 16, State 1, Line 1
> The log in this backup set terminates at LSN 537000000112000001,
> which
> is too early to apply to the database. A more recent log backup that
> includes LSN 553000000066000001 can be restored.
> Server: Msg 3013, Level 16, State 1, Line 1
> RESTORE LOG is terminating abnormally.
You need to find a full backup made *before* the data loss, along with
all the logs made between that full and the time of the data loss.|||This also indicates that something else is wrong here. If an LSN terminates
with a number that precedes the LSN of an earlier transaction log, that
transaction log needs to be skipped during a restore.
In your case below, the 537000000112000001 does exactly this so figure out
which TRN this is and when you run the restore and it comes time to restore
from this TRN log, skip it and go on to the next one. The database choked
on a transaction before one log completed but fixed itself during the next
one so all the stuff in that log is not needed as the transaction completed
during the execution of the next log.
Regards,
Jamie
"highflier" wrote:
> Hi everyone,
> First off, any help will be appreciated.
> The scenario is that a chunk of data from one of the tables in a
> database have been mistakenly deleted. I have done a complete backup of
> the database and the backed up the log. I attempted restoring the
> Database first with teh Norecpvery option and that worked. when I tried
> restoring the log file with the STOPAT clause I get an error. I am
> reproducing the script at the error below. Please help if you can
> 'Restoring the Database - Successful, with message shown below
> RESTORE DATABASE MatriEdu2006
> FROM DISK = 'C:\EducMatri06.db' WITH NORECOVERY,
> MOVE 'EduMatri_Data' TO 'C:\MatriEdu2006.mdf',
> MOVE 'EduMatri_Log' TO 'C:\MatriEdu2006.ldf'
> Processed 920 pages for database 'MatriEdu2006', file 'Edu_Data' on
> file 1.
> Processed 1 pages for database 'MatriEdu2006', file 'Edu_Log' on file
> 1.
> RESTORE DATABASE successfully processed 921 pages in 1.114 seconds
> (6.766 MB/sec).
>
> 'Restore Log - Failed, with error message shown below
> RESTORE LOG MatriEdu2006
> FROM DISK = 'C:\EducationMatrix_Log'
> WITH RECOVERY, STOPAT = 'Dec 11, 2006 03:14 PM'
> Server: Msg 4326, Level 16, State 1, Line 1
> The log in this backup set terminates at LSN 537000000112000001, which
> is too early to apply to the database. A more recent log backup that
> includes LSN 553000000066000001 can be restored.
> Server: Msg 3013, Level 16, State 1, Line 1
> RESTORE LOG is terminating abnormally.
>
First off, any help will be appreciated.
The scenario is that a chunk of data from one of the tables in a
database have been mistakenly deleted. I have done a complete backup of
the database and the backed up the log. I attempted restoring the
Database first with teh Norecpvery option and that worked. when I tried
restoring the log file with the STOPAT clause I get an error. I am
reproducing the script at the error below. Please help if you can
'Restoring the Database - Successful, with message shown below
RESTORE DATABASE MatriEdu2006
FROM DISK = 'C:\EducMatri06.db' WITH NORECOVERY,
MOVE 'EduMatri_Data' TO 'C:\MatriEdu2006.mdf',
MOVE 'EduMatri_Log' TO 'C:\MatriEdu2006.ldf'
Processed 920 pages for database 'MatriEdu2006', file 'Edu_Data' on
file 1.
Processed 1 pages for database 'MatriEdu2006', file 'Edu_Log' on file
1.
RESTORE DATABASE successfully processed 921 pages in 1.114 seconds
(6.766 MB/sec).
'Restore Log - Failed, with error message shown below
RESTORE LOG MatriEdu2006
FROM DISK = 'C:\EducationMatrix_Log'
WITH RECOVERY, STOPAT = 'Dec 11, 2006 03:14 PM'
Server: Msg 4326, Level 16, State 1, Line 1
The log in this backup set terminates at LSN 537000000112000001, which
is too early to apply to the database. A more recent log backup that
includes LSN 553000000066000001 can be restored.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE LOG is terminating abnormally.>>> On 12/10/2006 at 5:40 PM, in message
<1165797639.616739.281890@.80g2000cwy.googlegroups.com>,
highflier<nbarnard@.au.loreal.com> wrote:
> Server: Msg 4326, Level 16, State 1, Line 1
> The log in this backup set terminates at LSN 537000000112000001,
> which
> is too early to apply to the database. A more recent log backup that
> includes LSN 553000000066000001 can be restored.
> Server: Msg 3013, Level 16, State 1, Line 1
> RESTORE LOG is terminating abnormally.
You need to find a full backup made *before* the data loss, along with
all the logs made between that full and the time of the data loss.|||This also indicates that something else is wrong here. If an LSN terminates
with a number that precedes the LSN of an earlier transaction log, that
transaction log needs to be skipped during a restore.
In your case below, the 537000000112000001 does exactly this so figure out
which TRN this is and when you run the restore and it comes time to restore
from this TRN log, skip it and go on to the next one. The database choked
on a transaction before one log completed but fixed itself during the next
one so all the stuff in that log is not needed as the transaction completed
during the execution of the next log.
Regards,
Jamie
"highflier" wrote:
> Hi everyone,
> First off, any help will be appreciated.
> The scenario is that a chunk of data from one of the tables in a
> database have been mistakenly deleted. I have done a complete backup of
> the database and the backed up the log. I attempted restoring the
> Database first with teh Norecpvery option and that worked. when I tried
> restoring the log file with the STOPAT clause I get an error. I am
> reproducing the script at the error below. Please help if you can
> 'Restoring the Database - Successful, with message shown below
> RESTORE DATABASE MatriEdu2006
> FROM DISK = 'C:\EducMatri06.db' WITH NORECOVERY,
> MOVE 'EduMatri_Data' TO 'C:\MatriEdu2006.mdf',
> MOVE 'EduMatri_Log' TO 'C:\MatriEdu2006.ldf'
> Processed 920 pages for database 'MatriEdu2006', file 'Edu_Data' on
> file 1.
> Processed 1 pages for database 'MatriEdu2006', file 'Edu_Log' on file
> 1.
> RESTORE DATABASE successfully processed 921 pages in 1.114 seconds
> (6.766 MB/sec).
>
> 'Restore Log - Failed, with error message shown below
> RESTORE LOG MatriEdu2006
> FROM DISK = 'C:\EducationMatrix_Log'
> WITH RECOVERY, STOPAT = 'Dec 11, 2006 03:14 PM'
> Server: Msg 4326, Level 16, State 1, Line 1
> The log in this backup set terminates at LSN 537000000112000001, which
> is too early to apply to the database. A more recent log backup that
> includes LSN 553000000066000001 can be restored.
> Server: Msg 3013, Level 16, State 1, Line 1
> RESTORE LOG is terminating abnormally.
>
Labels:
adatabase,
appreciated,
chunk,
database,
log,
microsoft,
mistakenly,
mysql,
oracle,
restoring,
scenario,
server,
sql,
tables,
transaction
Restoring Transaction log
Hi everyone,
First off, any help will be appreciated.
The scenario is that a chunk of data from one of the tables in a
database have been mistakenly deleted. I have done a complete backup of
the database and the backed up the log. I attempted restoring the
Database first with teh Norecpvery option and that worked. when I tried
restoring the log file with the STOPAT clause I get an error. I am
reproducing the script at the error below. Please help if you can
'Restoring the Database - Successful, with message shown below
RESTORE DATABASE MatriEdu2006
FROM DISK = 'C:\EducMatri06.db' WITH NORECOVERY,
MOVE 'EduMatri_Data' TO 'C:\MatriEdu2006.mdf',
MOVE 'EduMatri_Log' TO 'C:\MatriEdu2006.ldf'
Processed 920 pages for database 'MatriEdu2006', file 'Edu_Data' on
file 1.
Processed 1 pages for database 'MatriEdu2006', file 'Edu_Log' on file
1.
RESTORE DATABASE successfully processed 921 pages in 1.114 seconds
(6.766 MB/sec).
'Restore Log - Failed, with error message shown below
RESTORE LOG MatriEdu2006
FROM DISK = 'C:\EducationMatrix_Log'
WITH RECOVERY, STOPAT = 'Dec 11, 2006 03:14 PM'
Server: Msg 4326, Level 16, State 1, Line 1
The log in this backup set terminates at LSN 537000000112000001, which
is too early to apply to the database. A more recent log backup that
includes LSN 553000000066000001 can be restored.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE LOG is terminating abnormally.>> On 12/10/2006 at 5:40 PM, in message
<1165797639.616739.281890@.80g2000cwy.googlegroups.com>,
highflier<nbarnard@.au.loreal.com> wrote:
> Server: Msg 4326, Level 16, State 1, Line 1
> The log in this backup set terminates at LSN 537000000112000001,
> which
> is too early to apply to the database. A more recent log backup that
> includes LSN 553000000066000001 can be restored.
> Server: Msg 3013, Level 16, State 1, Line 1
> RESTORE LOG is terminating abnormally.
You need to find a full backup made *before* the data loss, along with
all the logs made between that full and the time of the data loss.
First off, any help will be appreciated.
The scenario is that a chunk of data from one of the tables in a
database have been mistakenly deleted. I have done a complete backup of
the database and the backed up the log. I attempted restoring the
Database first with teh Norecpvery option and that worked. when I tried
restoring the log file with the STOPAT clause I get an error. I am
reproducing the script at the error below. Please help if you can
'Restoring the Database - Successful, with message shown below
RESTORE DATABASE MatriEdu2006
FROM DISK = 'C:\EducMatri06.db' WITH NORECOVERY,
MOVE 'EduMatri_Data' TO 'C:\MatriEdu2006.mdf',
MOVE 'EduMatri_Log' TO 'C:\MatriEdu2006.ldf'
Processed 920 pages for database 'MatriEdu2006', file 'Edu_Data' on
file 1.
Processed 1 pages for database 'MatriEdu2006', file 'Edu_Log' on file
1.
RESTORE DATABASE successfully processed 921 pages in 1.114 seconds
(6.766 MB/sec).
'Restore Log - Failed, with error message shown below
RESTORE LOG MatriEdu2006
FROM DISK = 'C:\EducationMatrix_Log'
WITH RECOVERY, STOPAT = 'Dec 11, 2006 03:14 PM'
Server: Msg 4326, Level 16, State 1, Line 1
The log in this backup set terminates at LSN 537000000112000001, which
is too early to apply to the database. A more recent log backup that
includes LSN 553000000066000001 can be restored.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE LOG is terminating abnormally.>> On 12/10/2006 at 5:40 PM, in message
<1165797639.616739.281890@.80g2000cwy.googlegroups.com>,
highflier<nbarnard@.au.loreal.com> wrote:
> Server: Msg 4326, Level 16, State 1, Line 1
> The log in this backup set terminates at LSN 537000000112000001,
> which
> is too early to apply to the database. A more recent log backup that
> includes LSN 553000000066000001 can be restored.
> Server: Msg 3013, Level 16, State 1, Line 1
> RESTORE LOG is terminating abnormally.
You need to find a full backup made *before* the data loss, along with
all the logs made between that full and the time of the data loss.
Labels:
appreciated,
chunk,
database,
log,
microsoft,
mistakenly,
mysql,
oracle,
restoring,
scenario,
server,
sql,
tables,
transaction
Subscribe to:
Posts (Atom)