November 11, 2003 at 10:20 am
Hi, All,
I am trying to restore database file group, and got error at the last step for restoring log with recovery:
Server: Msg 4305, Level 16, State 1, Line 1
The log in this backup set begins at LSN 6000000012800001, which is too late to apply to the database. An earlier log backup that includes LSN 6000000011600001 can be restored.
Please help me walk out from this issue.
Thanks.
the following is the steps what i was doing.
-- create db and add file group
CREATE DATABASE test ON PRIMARY
(NAME = 'testDefault',
FILENAME = 'd:\mssql\data\test\testDefault.mdf',
SIZE = 10,
MAXSIZE = 30,
FILEGROWTH = 10)
LOG ON
(NAME = 'testLog',
FILENAME = 'd:\mssql\data\test\testLog.ldf',
SIZE = 3,
FILEGROWTH = 10)
GO
ALTER DATABASE test
ADD FILEGROUP Data01
GO
ALTER DATABASE test
ADD FILE
(NAME = 'testData01',
FILENAME = 'd:\mssql\data\test\testData01.ndf',
SIZE = 10,
FILEGROWTH = 10)
TO FILEGROUP Data01
GO
-- add dump devices
EXEC sp_addumpdevice 'disk', 'test', 'd:\mssql\backup\test.bak'
EXEC sp_addumpdevice 'disk', 'dumplog', 'd:\mssql\backup\dumplog.bak'
-- backup db complate
BACKUP DATABASE test to test WITH INIT, NAME = 'test', NOSKIP, STATS = 10, NOFORMAT
-- modify test database
use test
create table test(test char(10))
create table data1(data char(10)) on 'data01'
-- backup db file group and log
use master
ALTER DATABASE test
SET RECOVERY FULL
BACKUP DATABASE test
FILE = 'testDefault',
FILEGROUP = 'PRIMARY',
FILE = 'testData01',
FILEGROUP = 'data01'
TO test
WITH NOINIT, NAME = 'testfiledata01', NOSKIP, STATS = 10, NOFORMAT
BACKUP LOG test
TO test
WITH NOINIT, NAME = 'testlog', NOSKIP, STATS = 10, NOFORMAT
-- modify db
use test
drop table test
drop table data1
-- restore file group data01
use master
BACKUP LOG test to dumplog WITH INIT, NO_TRUNCATE
RESTORE DATABASE test
FILE = 'testDefault',
FILEGROUP = 'PRIMARY',
FILE = 'testData01',
FILEGROUP = 'data01'
FROM test
WITH NORECOVERY,
FILE = 2
RESTORE LOG test
FROM test
WITH NORECOVERY,
FILE =3
RESTORE LOG test
FROM dumplog
WITH RECOVERY,
FILE = 1
-- failed with Msg 4305
/*
Server: Msg 4305, Level 16, State 1, Line 1
The log in this backup set begins at LSN 6000000012800001, which is too late to apply to the database. An earlier log backup that includes LSN 6000000011600001 can be restored.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE LOG is terminating abnormally.
*/
Edited by - xyz on 11/11/2003 12:35:53 PM
Edited by - xyz on 11/11/2003 12:36:57 PM
Edited by - xyz on 11/11/2003 12:39:14 PM
November 11, 2003 at 10:30 am
we are running SQL Server 2000 with sp3 on Windows 2000 advanced server with sp3.
November 12, 2003 at 5:40 am
I didn't see anything wrong with your methodology (other than your model database apparently not being set to the Full recovery model), so I ran your script and it worked okay on my server. Try again.
--Jonathan
--Jonathan
November 12, 2003 at 7:44 am
Hi, Jonathan,
Thanks for testing my script.
I did many tests yesterday, and only one time successed.
I will try it again.
xyz
November 12, 2003 at 7:57 am
it worked today.
how?why?
yesterday, i even got a un-documneted error:
Server: Msg 4330, Level 16, State 1, Line 1
The log in this backup set cannot be applied because it is on a recovery path inconsistent with the database.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE LOG is terminating abnormally.
November 12, 2003 at 8:32 am
i guess it was a holiday yesterday (11.11). it suppose not working.
i tried again, no more errors.
this practice is for a scheduled job that will copy updated file group to a different server.
i'm not sure it is a trust way to do it.
November 12, 2003 at 9:34 am
My guess is that you were not always dropping the backup devices between trial runs.
--Jonathan
--Jonathan
November 12, 2003 at 9:46 am
nod; nod;
i used the same device for whole yesterday. but i did clean it with INIT option sometime.
i tested it from scratch today.
so, if i use a brand new device for each run, it should not error out any more.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply