?
Solved

Log shipping fails when trying to restore transactional log

Posted on 2006-05-23
3
Medium Priority
?
539 Views
Last Modified: 2008-03-17
Hi,
I am trying to implement log shipping. For this purpose i did a back up of the databas from the production server and restored it on the stand-by server.Now for restoring the transaction log i am running a job that runs after every 1 hr . The steps in the jobs are as below:
Step 1: Backup Log
BACKUP LOG PrePaidCard TO PrePaidCard_log_backup_device WITH INIT, NO_TRUNCATE
WAITFOR DELAY '00:00:05'

Step 2: Copy Log
xcopy d:\SQL2000\MSSQL\BACKUP\PrePaidCard_log_backup_device.BAK   \\LEONING\d$\PrePaidCard-TransationBackUp\ /c

Step 3: Restore Log
EXEC LEONING.master.dbo.restore_PrePaidCard_log_backups

Now because the path was not correct in step 2 the job failed for the first instance. So i corrected the path and ran the job again.
But it failed in step 3 with the following error:

"RESTORE LOG is terminating abnormally. [SQLSTATE 42000] (Error 3013)  The log in this backup set begins at LSN 383150000002099800001, which is too late to apply to the database. An earlier log backup that includes LSN 383149000019189400001 can be restored."

Now ,if i do a back up of the database from Production server agian and restore it on backup server and then run the job for transaction log it works fine.

So ,is it that since the job failed initially i always need  to do back up of the database again and then restore it on the stand by server and then execute the job set for transaction log.OR is there some othere way with which successful restore of transaction log could be achived?
Pl. let me know

0
Comment
Question by:pumaken68
1 Comment
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 500 total points
ID: 16748191
I think SQL lost alog somehow,In order to solve thus take full backup, then restore & fire up  log shipping again.
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
MSSQL DB-maintenance also needs implementation of multiple activities. However, unprecedented errors can hamper the database management. In that case, deploying Stellar SQL Database Toolkit ensures fast and accurate database and backup repair as wel…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question