Showing posts with label sqlstate. Show all posts
Showing posts with label sqlstate. Show all posts

Monday, March 26, 2012

Log Shipping Restore Failing

**PLEASE help. Restore of Log Shippng is failing**
Job error is: sqlmaint.exe failed. [SQLSTATE 42000] (Error 22029). The step failed.
Detailed output of the job says: [Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 4305: [Microsoft][ODBC SQL Server Driver][SQL Server]The log in this backup set begins at LSN 31433000001386500001, which is too late to apply to the database. An earlier lo
g backup that includes LSN 314320
00002000300001 can be restored.[Microsoft][ODBC SQL Server Driver][SQL Server]RESTORE LOG is terminating abnormally. (null) [Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 4305: [Microsoft][ODBC SQL Server Driver][SQL Server]The log in this backup set be
gins at LSN 31433000001386500001, which is too late to apply to the database. An earlier log backup that includes LSN 31432000002000300001 can be restored. [Microsoft][ODBC SQL Server Driver][SQL Server]RESTORE LOG is terminating abnormally.(null) [Micros
oft SQL-DMO (ODBC SQLState: 42000)] Error 3201: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open backup device 'D:\SHIPPEDLOGS\LVBOEProd_tlog_200406272345.TRN'. Device error or device off-line. See the SQL Server error log for more details.[Micr
osoft][ODBC SQL Server Driver][SQL Server]RESTORE LOG is terminating abnormally.(null Loaded 0 files
**All of my shares/directories are correct. I have tried this at least a dozen times. It was successfull the 1st time the restore ran, but after that it has failed every time.
VC,
have a look at your chain of log backups and the log-shipping monitor. See
if you have any logs before 27th June 11:45pm which haven't been transfered
and/or restored. Manually restoring these 'missing' logs then restarting the
logshipping job should fix the problem.
HTH,
Paul Ibison
|||Paul, thank you very much for your reply. this is very important that i get this working ASAP. i have been fighting this day in and day out.
i re-did the log shipping and it's the same problem. do you have an email account that i can email the log to. it has been appending since the 1st restore. you can email me at v_c@.hotmail.com and i'll reply with the log.
there are no files earlier than the 1st file. in fact, this time around, it was successful.
|||VC,
no need to send over the log - it won't help me solve your issue.
I suspect that someone inadvertantly truncated the transaction log before
the first backup and hence the log sequence numbers were out of sync.
Alternatively it could be that the databases themselves were initially out
of sync. You could use LogExplorer (even the evaluation edn) to test if the
former is the case - to see if there are some records missing from the log.
Still, if it's running OK now then fine.
Regards,
Paul Ibison
|||VC,
no need to send over the log - it won't help me solve your issue.
I suspect that someone inadvertantly truncated the transaction log before
the first backup and hence the log sequence numbers were out of sync.
Alternatively it could be that the databases themselves were initially out
of sync. You could use LogExplorer (even the evaluation edn) to test if the
former is the case - to see if there are some records missing from the log.
Still, if it's running OK now then fine.
Regards,
Paul Ibison
|||i was doing this all night, like 2 in the morning. i doubt anyone was truncating logs. however, this is a good suspicion. any other ideas how the log could have gotten truncated?
|||i was doing this all night, like 2 in the morning. i doubt anyone was truncating logs. however, this is a good suspicion. any other ideas how the log could have gotten truncated?
|||2am - and I thought I worked too long hours ;-)
No other ideas really about how else your log got truncated.
I'd check out the transaction log using a 3rd party tool to try to make
sense of it.
Regards,
Paul Ibison
|||2am - and I thought I worked too long hours ;-)
No other ideas really about how else your log got truncated.
I'd check out the transaction log using a 3rd party tool to try to make
sense of it.
Regards,
Paul Ibison

Friday, March 23, 2012

Log Shipping question

Hi!
I managed to make a plan of log shipping and have some questions.
In the first trn back up I recieved an error
[Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 3201: [Microsoft][ODBC SQL
Server Driver][SQL Server]Cannot open backup device
'D:\logshipping\Pergam2_tlog_200312250945.TRN'. Device error or device
off-line. See the SQL Server error log for more details.
[Microsoft][ODBC SQL Server Driver][SQL Server]RESTORE LOG is terminating
abnormally.
All other back ups are fine and databases seeens to be identical. But Log
shipping monitor shows out of sync ?!!!
What it can be?
if backup/restore or restore fails what will be with databases in the next
step when all will work fine?
Thanks
DmitryI have seen messages like this sometimes on our log
shipping installation too. I believe Sql Server sometimes
starts reading the log files even before they have been
completely transferred. This seems to be best ignored. Set
your monitor to a higher out of sync value.
If the databases get out of sync, the best way is to back
up and restore them and restart log shipping.
>--Original Message--
>Hi!
>I managed to make a plan of log shipping and have some
questions.
>In the first trn back up I recieved an error
>[Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 3201:
[Microsoft][ODBC SQL
>Server Driver][SQL Server]Cannot open backup device
>'D:\logshipping\Pergam2_tlog_200312250945.TRN'. Device
error or device
>off-line. See the SQL Server error log for more details.
>[Microsoft][ODBC SQL Server Driver][SQL Server]RESTORE
LOG is terminating
>abnormally.
>All other back ups are fine and databases seeens to be
identical. But Log
>shipping monitor shows out of sync ?!!!
>What it can be?
>if backup/restore or restore fails what will be with
databases in the next
>step when all will work fine?
>Thanks
>Dmitry
>
>.
>