473,406 Members | 2,387 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

How to properly restore transaction log

Hi,

Currently, I am on SQL2000 SP3 and Windows 2003.

I am trying to restore the full database backup and transaction log
backup on the development server. The full database restore is not a
problem, but the transaction log restore happened during the day is.
Everytime when I try to compare the transaction in the database
(select the last update date from one of my table as a benchmark, then
backup the transaction log for restore) to the development db with the
restored transaction log, I got none of the transaction from the log
backup.

What did I do wrong? Is my concept about using the transaction log
restore wrong?

Thanks in advance.
Jul 20 '05 #1
4 2069
Hi,

Follow this

Execute the RESTORE DATABASE statement using the NORECOVERY clause.
Execute the RESTORE LOG statement to apply each transaction log
backup, specifying:
The name of the database to which the transaction log will be applied.
The backup device from where the transaction log backup will be
restored.
The RECOVERY and STOPAT clauses. If the transaction log backup does
not contain the requested time (for example, if the time specified is
beyond the end of the time covered by the transaction log), a warning
is generated and the database remains unrecovered.
RESTORE LOG MyNwind
FROM MyNwind_log1
WITH RECOVERY, STOPAT = 'Jul 1, 1998 10:00 AM'

This should work.

Regards,
-Manoj Rajshekar
Jul 20 '05 #2
Hi Manoj,

Thank you very much for the steps on restoring. Actually from your
restore logs description, I have a question. It seems that you are
expecting that there are multiple log backups to restore and they
should be done with the backup option WITH INIT. However, I am trying
to use the backup option WITH NOINIT, NO_TRUNCATE, NOUNLOAD, NOSKIP,
STATS = 10. And from the restore of that one log backup, I am unable
to obtain any transaction which is supposed to be backup all through
the day. Am I using the wrong backup options?

Thanks in advance.

ma**********@yahoo.com (Manoj Rajshekar) wrote in message news:<ab*************************@posting.google.c om>...
Hi,

Follow this

Execute the RESTORE DATABASE statement using the NORECOVERY clause.
Execute the RESTORE LOG statement to apply each transaction log
backup, specifying:
The name of the database to which the transaction log will be applied.
The backup device from where the transaction log backup will be
restored.
The RECOVERY and STOPAT clauses. If the transaction log backup does
not contain the requested time (for example, if the time specified is
beyond the end of the time covered by the transaction log), a warning
is generated and the database remains unrecovered.
RESTORE LOG MyNwind
FROM MyNwind_log1
WITH RECOVERY, STOPAT = 'Jul 1, 1998 10:00 AM'

This should work.

Regards,
-Manoj Rajshekar

Jul 20 '05 #3
Hi Manoj,

Thank you very much for the steps on restoring. Actually from your
restore logs description, I have a question. It seems that you are
expecting that there are multiple log backups to restore and they
should be done with the backup option WITH INIT. However, I am trying
to use the backup option WITH NOINIT, NO_TRUNCATE, NOUNLOAD, NOSKIP,
STATS = 10. And from the restore of that one log backup, I am unable
to obtain any transaction which is supposed to be backup all through
the day. Am I using the wrong backup options?

Thanks in advance.

ma**********@yahoo.com (Manoj Rajshekar) wrote in message news:<ab*************************@posting.google.c om>...
Hi,

Follow this

Execute the RESTORE DATABASE statement using the NORECOVERY clause.
Execute the RESTORE LOG statement to apply each transaction log
backup, specifying:
The name of the database to which the transaction log will be applied.
The backup device from where the transaction log backup will be
restored.
The RECOVERY and STOPAT clauses. If the transaction log backup does
not contain the requested time (for example, if the time specified is
beyond the end of the time covered by the transaction log), a warning
is generated and the database remains unrecovered.
RESTORE LOG MyNwind
FROM MyNwind_log1
WITH RECOVERY, STOPAT = 'Jul 1, 1998 10:00 AM'

This should work.

Regards,
-Manoj Rajshekar

Jul 20 '05 #4

"xo55ox" <xo****@hotmail.com> wrote in message
news:ab**************************@posting.google.c om...
Hi Manoj,

Thank you very much for the steps on restoring. Actually from your
restore logs description, I have a question. It seems that you are
expecting that there are multiple log backups to restore and they
should be done with the backup option WITH INIT. However, I am trying
to use the backup option WITH NOINIT, NO_TRUNCATE, NOUNLOAD, NOSKIP,
STATS = 10. And from the restore of that one log backup, I am unable
to obtain any transaction which is supposed to be backup all through
the day. Am I using the wrong backup options?
Yes, you need with NO_RECOVERY or STANDBY.

Otherwise all transactions are rolled back or forward and no further
restores can be applied.


Thanks in advance.

ma**********@yahoo.com (Manoj Rajshekar) wrote in message

news:<ab*************************@posting.google.c om>...
Hi,

Follow this

Execute the RESTORE DATABASE statement using the NORECOVERY clause.
Execute the RESTORE LOG statement to apply each transaction log
backup, specifying:
The name of the database to which the transaction log will be applied.
The backup device from where the transaction log backup will be
restored.
The RECOVERY and STOPAT clauses. If the transaction log backup does
not contain the requested time (for example, if the time specified is
beyond the end of the time covered by the transaction log), a warning
is generated and the database remains unrecovered.
RESTORE LOG MyNwind
FROM MyNwind_log1
WITH RECOVERY, STOPAT = 'Jul 1, 1998 10:00 AM'

This should work.

Regards,
-Manoj Rajshekar

Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: A.M. de Jong | last post by:
In the hereunder written message I talk about point in time restore. It is now based upon the fact that there are no hardware problems or what so ever. I just would like to roll back to a...
2
by: Rajesh Garg | last post by:
I will make it simpler to look... I have DB1 - as backup for day 1 LOg1 as backup of logs T1 T2 T3 T4 T5 ...some transaction on day 2 Now i backup again DB2 Log2
0
by: xo55ox | last post by:
Hi, I have been trying to set up an automated restore process from prod to backup server. First, I schedule the full database backup nightly, transfer the backup file and restore it to the...
1
by: sumGirl | last post by:
When you restore a backup from a point in time, how do you then know which transaction ID to start with when you want to roll forward from that point in time to another point in time?
5
by: Pagus | last post by:
I have full backup of database at 13:00 and another full backup at 17:00. I've made backup of transaction log at 17:05 When I try to restore database to state at 15:10 (point in time) , the...
2
by: Michael Bourgon | last post by:
I need to build an automated email that gives the completion messages when a database is restored (i.e. "Executed as user: sa. Executing RESTORE DATABASE DB1 FROM...
2
by: si.downes | last post by:
Using SQL Server 2000 SP3 I'm developing a data warehouse where data will be archived off to a filegroup, this filegroup backed up and the tables in this filegroup truncated to free up space on...
3
by: t2581 | last post by:
Hi , I run restore with rollforward In job in output, last commited transaction time less then backup image time Is it normal ? RESTORE DATABASE PRICE_V8 FROM "E:\BACKUP" TAKEN AT...
5
by: patrick | last post by:
Mysql 4.1.15 on Win2k. Using InnoDB. Using the mysql administrator gui to create a backup, everything goes fine, and restores quickly. Using the command line: mysqldump %dbname%...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.