Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Restore job fails in SQL Server

Posted on 2009-05-16
7
Medium Priority
?
1,557 Views
Last Modified: 2012-05-07
I have a job LSRestore_IHS_MAIN-SQL-02-P51 that fails.
When I go in the steps I just see
"C:\Program Files\Microsoft SQL Server\90\Tools\Binn\sqllogship.exe" -Restore C95BF037-BDE6-4B38-9985-2A0E3E2E6595 -server IHS-MAIN-IMG-01.  Nothing else.

Now when I see history I see------
The job failed. The job was invoked by schedule 136 (DefaultRestoreJobSchedule). The last step to run was step 1. (Log Shipping Restore Log job step).

More in  detail--------------
Executed as user HIS\Sqlrptuser. The step failed.


so what is the problem. let me tell you that P51 database does not exist. if you see the first line it says that  LSRestore_IHS_MAIN-SQL-02-P51
0
Comment
Question by:aatishpatel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
7 Comments
 
LVL 60

Expert Comment

by:chapmandew
ID: 24404800
post screenshots, please.
0
 

Author Comment

by:aatishpatel
ID: 24406271
this happens step by step:------------
Date            5/17/2009 10:00:00 AM
Log            Job History (LSRestore_IHS-MAIN-SQL-02_P51)

Step ID            1
Server            IHS-MAIN-IMG-01
Job Name            LSRestore_IHS-MAIN-SQL-02_P51
Step Name            Log shipping restore log job step.
Duration            00:00:00
Sql Severity            0
Sql Message ID            0
Operator Emailed            
Operator Net sent            
Operator Paged            
Retries Attempted            0

Message
Microsoft (R) SQL Server Log Shipping Agent
[Assembly Version = 9.0.242.0, File Version = 9.00.3042.00]
c Microsoft Corp. All rights reserved.

2009-05-17 10:00:00.90      ----- START OF TRANSACTION LOG RESTORE   -----


then

Log            Job History (LSRestore_IHS-MAIN-SQL-02_P51)

Step ID            1
Server            IHS-MAIN-IMG-01
Job Name            LSRestore_IHS-MAIN-SQL-02_P51
Step Name            Log shipping restore log job step.
Duration            00:00:01
Sql Severity            0
Sql Message ID            0
Operator Emailed            
Operator Net sent            
Operator Paged            
Retries Attempted            0

Message
2009-05-17 10:00:00.99      Starting transaction log restore. Secondary ID: 'c95bf037-bde6-4b38-9985-2a0e3e2e6595'
2009-05-17 10:00:01.00      Retrieving restore settings. Secondary ID: 'c95bf037-bde6-4b38-9985-2a0e3e2e6595'
2009-05-17 10:00:01.04      Retrieved common restore settings. Primary Server: 'IHS-MAIN-SQL-02', Primary Database: 'P51', Backup Destination Directory: 'S:\Transaction\P51', File Retention Period: 2880 minute(s)
2009-05-17 10:00:01.04      Retrieved database restore settings. Secondary Database: 'P51', Restore Delay: 0, Restore All: True, Restore Mode: No Recovery, Disconnect Users: False, Last Restored File: S:\Transaction\P51\P51_20081102183004.trn, Block Size: Not Specified, Buffer Count: Not Specified, Max Transfer Size: Not Specified


then


Step ID            1
Server            IHS-MAIN-IMG-01
Job Name            LSRestore_IHS-MAIN-SQL-02_P51
Step Name            Log shipping restore log job step.
Duration            00:00:01
Sql Severity            0
Sql Message ID            0
Operator Emailed            
Operator Net sent            
Operator Paged            
Retries Attempted            0

Message
2009-05-17 10:00:01.15      *** Error: The restore operation cannot proceed because the secondary database 'P51' is not in NORECOVERY/STANDBY mode.(Microsoft.SqlServer.Management.LogShipping) ***
2009-05-17 10:00:01.18      Deleting old log backup files. Primary Database: 'P51'


then

Log            Job History (LSRestore_IHS-MAIN-SQL-02_P51)

Step ID            1
Server            IHS-MAIN-IMG-01
Job Name            LSRestore_IHS-MAIN-SQL-02_P51
Step Name            Log shipping restore log job step.
Duration            00:00:01
Sql Severity            0
Sql Message ID            0
Operator Emailed            
Operator Net sent            
Operator Paged            
Retries Attempted            0

Message
2009-05-17 10:00:01.18      The restore operation completed with errors. Secondary ID: 'c95bf037-bde6-4b38-9985-2a0e3e2e6595'


then

Date            5/17/2009 10:00:00 AM
Log            Job History (LSRestore_IHS-MAIN-SQL-02_P51)

Step ID            1
Server            IHS-MAIN-IMG-01
Job Name            LSRestore_IHS-MAIN-SQL-02_P51
Step Name            Log shipping restore log job step.
Duration            00:00:01
Sql Severity            0
Sql Message ID            0
Operator Emailed            
Operator Net sent            
Operator Paged            
Retries Attempted            0

Message
2009-05-17 10:00:01.24      ----- END OF TRANSACTION LOG RESTORE     -----

Exit Status: 1 (Error)



then
ate            5/17/2009 10:00:00 AM
Log            Job History (LSRestore_IHS-MAIN-SQL-02_P51)

Step ID            1
Server            IHS-MAIN-IMG-01
Job Name            LSRestore_IHS-MAIN-SQL-02_P51
Step Name            Log shipping restore log job step.
Duration            00:00:01
Sql Severity            0
Sql Message ID            0
Operator Emailed            
Operator Net sent            
Operator Paged            
Retries Attempted            0

Message
Executed as user: IHS\sqlrptuser. The step failed.


so these are all the detailed error steps.
0
 
LVL 60

Accepted Solution

by:
chapmandew earned 2000 total points
ID: 24408378
The problem is that you're doing log shipping, but the last restore you did on your 2ndary server, RECOVER was specified...so no further backups can be applied.  You'll need to reinitialize the backups starting with a full....really need to start it all over again.  That is really the only thing you can do here.
0
 

Author Closing Comment

by:aatishpatel
ID: 31582259
thanx
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 24476525
this wasn't a B answer...
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

704 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