Tuesday, February 14, 2012

Bkp Restore Failed

I am trying to restore backup and the system gives me error for LSN. No error no. is displayed but it seems that the system doesnot accept trn log restore.

My bkp strategy is:

Full Backup: weekly

Diff bkp: daily

T Log Bkp : every 2 hours.

But sometime I need to shrink Log file due to heavy growth. Hope that is not creating problem. The following is what i do for shrinking TLog file.

BACKUP LOG ABC TO ABC_BackUp

DBCC SHRINKFILE(ABC_Log, 500)

pL. guide why my restore fails.

you are right on the track... THe shrinking is creating the problem. shrinking log file step will invalidate the transaction log backup chain. So what you should have done after shrinking was take fullbackup of your database. If the transaction log size is the problem, then increase the frequency of the TL Backup. Now you have every 2 hourse, keep it every 15 min or so... it will control the size of the log and then there will be no need to shrink. If you are shrinking then the first step after the shrinking of log should be Full backup remember that.

Read follwing links

FileSize -How to stop the log file from growing
http://www.support.microsoft.com/?id=873235

FileSize -Log file filling up
http://www.support.microsoft.com/?id=110139

FileSize -Log File Grows too big
http://www.support.microsoft.com/?id=317375

FileSize -Log File issues
http://www.nigelrivett.net/TransactionLogFileGrows_1.html

FileSize -Shrinking Log in SQL Server 2000 with DBCC SHRINKFILE
http://www.support.microsoft.com/?id=272318

Madhu|||

Thanks. I tried restoring full bkp, diff bkp and trn bkp which is without any shrinkage and i get the same error.

ERROR:

The log in this backup set begins at LNS .....502600001, which is too recent to apply to the database. An earlier log backup
that includes LSN .....478700001 can be restored.

what is this error and why my restore fails.

|||I would recommend that you do a RESTORE HEADERONLY on all you backups and check the FirstLSN and LastLSN fields of your backup series. The values should not have any gaps. If there are, the backup would be invalid...more of like a "do 5 first after 4 and not 6" kind of thing is how I would explain LSNs|||

Thanks. When i try to exclude filed with gaps, i get the error:

System.Data.sqlclient.sqlerror: Invalid column name 'lightweight'

Following is the bkp procedure i follow;

Full bkp-Weekly
BACKUP DATABASE [abc] TO [abc_Backup] WITH INIT
RESTORE VERIFYONLY
FROM DISK = 'C:\Database Backup\User Databases\abc\abc_BackUp.BAK'

Diff bkp-Daily
BACKUP DATABASE [abc] TO [abc_BackUp] WITH DIFFERENTIAL;

Tlog bkp-Every 2 hr
BACKUP LOG [abc] TO [abc_BackUp];

Pl. guide

|||

Thanks. When i see the LSN of my TLog bkp, the last 6 doenot match and hence i tried to restore the first files Full bkp - TLog - TLog - Diff bkp.

This gave me error:

Msg 207, Level 16, State 1, Procedure sp_MSremovedbreplication, Line 242

Invalid column name 'lightweight'.

Msg 3165, Level 16, State 1, Line 1

Database 'ABC' was restored, however an error was encountered while replication was being restored/removed. The database has been left offline. See the topic MSSQL_ENG003165 in SQL Server Books Online.

Msg 3167, Level 16, State 1, Line 1

RESTORE could not start database 'ABC'.

Msg 3013, Level 16, State 1, Line 1

RESTORE DATABASE is terminating abnormally.

Que1 why my LSN of TLogbkps are not matching?

Que2 why i got the error as above?

Following steps i follow to take bkps;

Full bkp-Weekly
BACKUP DATABASE [abc] TO [abc_Backup] WITH INIT
RESTORE VERIFYONLY
FROM DISK = 'C:\Database Backup\User Databases\abc\abc_BackUp.BAK'

Diff bkp-Daily
BACKUP DATABASE [abc] TO [abc_BackUp] WITH DIFFERENTIAL;

Tlog bkp-Every 2 hr
BACKUP LOG [abc] TO [abc_BackUp];

Pls. guide. Thanks in advance

|||

Thanks. When i see the LSN of my TLog bkp, the last 6 doenot match and hence i tried to restore the first files Full bkp - TLog - TLog - Diff bkp.

This gave me error:

Msg 207, Level 16, State 1, Procedure sp_MSremovedbreplication, Line 242

Invalid column name 'lightweight'.

Msg 3165, Level 16, State 1, Line 1

Database 'ABC' was restored, however an error was encountered while replication was being restored/removed. The database has been left offline. See the topic MSSQL_ENG003165 in SQL Server Books Online.

Msg 3167, Level 16, State 1, Line 1

RESTORE could not start database 'ABC'.

Msg 3013, Level 16, State 1, Line 1

RESTORE DATABASE is terminating abnormally.

Que1 why my LSN of TLogbkps are not matching?

Que2 why i got the error as above?

Following steps i follow to take bkps;

Full bkp-Weekly
BACKUP DATABASE [abc] TO [abc_Backup] WITH INIT
RESTORE VERIFYONLY
FROM DISK = 'C:\Database Backup\User Databases\abc\abc_BackUp.BAK'

Diff bkp-Daily
BACKUP DATABASE [abc] TO [abc_BackUp] WITH DIFFERENTIAL;

Tlog bkp-Every 2 hr
BACKUP LOG [abc] TO [abc_BackUp];

Pls. guide. Thanks in advance

No comments:

Post a Comment