Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

restoring transacton log file

Status
Not open for further replies.

ISChana

Programmer
Dec 18, 2002
32
0
0
IN
Dear All,

I was reading the SQL Online help and doing practical work also as written Restorign a database to a prior state title i did all the steps as per Online SQL Server books Online..but I Failed to achive the result

Pl. look what i did
I took the database backup and log file backup at 1 pm as

backup database tt to disk='c:\bkup\bk1'
backup log tt to disk='c:\bkup\tlog1'

now I changed some tables and then took the transaction log backup on 1:15pm as
backup log tt to disk='c:\bkup\tlog2' with no_truncate

no i deletd tt database and tried to restore database as

restore database tt from disk='c:\bkup\bk1' with norecovery
go
restore log tt from disk='c:\bkup\tlog1' with norecovery
go
restore log tt from disk='c:\bkup\tlog2' with Recovery


SO As per Help I should get my actual database but I got the following message

Processed 1 pages for database 'tt', file 'tt_log' on file 1.
RESTORE DATABASE successfully processed 121 pages in 0.444 seconds (2.216 MB/sec).
Processed 1 pages for database 'tt', file 'tt_log' on file 1.
RESTORE LOG successfully processed 1 pages in 0.004 seconds (0.640 MB/sec).
Server: Msg 4305, Level 16, State 1, Line 1
The log in this backup set begins at LSN 6000000121100001, which is too late to apply to the database. An earlier log backup that includes LSN 6000000120500001 can be restored.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE LOG is terminating abnormally.


So pl. Suggest the solution( I am still learning )

regards
inder
 
basically says that there's another log file in between file 1 and file 2....
 
You probably have a maintenance plan or some other backups happening on a scheduled basis (or you ran a BACKUP LOG command twice by accident). As Gawaine79 stated, there must be another log backup that occured between the two you did manually.

-SQLBill

Posting advice: FAQ481-4875
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top