Solved

SQL 2005 Log Shipping

Posted on 2010-11-07
6
386 Views
Last Modified: 2012-06-27
Hi

I am trying to setup log shipping on my test server. This is what I did.

I created a test database on primary server (SQL 2005) with full recovery model
Took a full backup of this database and restored on secondary server (SQL 2005)
On primary server, selected the database and enabled log shipping using wizard. I left most of the options to default. Selected the "Network path to Backup folder" as a shared folder on secondary server (shared folder with write permission to everyone). Same folder is mentioned as "Destination folder for copied files". Selected "No, the secondary database is initialized".

After this two jobs are created in primary server and three jobs created in secondary server. The two jobs in primary server and two jobs in secondary server executed without any errors. But the job LSRestore_PrimaryServer_TestDB on secondary server fails with the below messages

Date            08/11/2010 11:15:01 AM
Log            Job History (LSRestore_PrimaryServer_TestDB)

Step ID            1
Server            SecondaryServer
Job Name            LSRestore_PrimaryServer_TestDB
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: CHSAPTEC\Administrator. The step failed.

Any ideas?

Thanks.
0
Comment
Question by:bijualex
[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
  • 4
  • 2
6 Comments
 
LVL 10

Expert Comment

by:Humpdy
ID: 34082427
when you restored your secondary database,
did you leave the database non-operational (restore with norecovery) ?
You have to do this so the transaction logs can be restored.
0
 
LVL 10

Expert Comment

by:Humpdy
ID: 34082464
On the restore tab, under database state when restoring backups, choose the no recovery mode.
On Books Online, type in
How to: Enable Log Shipping (SQL Server Management Studio).

It gives a step by step approach on how to configure it correctly.
0
 

Author Comment

by:bijualex
ID: 34082501
Thank you very much for your feedback. No it was not restored with no recovery. I restored it again with "no recovery " option and now the database on the sec server is showing TestDB (Restoring...). Then I started the log shipping wizard again, but the time when I choose sec server, I get the below error.

Cannot open database "TestDB" requested by the login. The login failed.
Login failed for user 'sa'. (Microsoft SQL Server, Error: 4060)

The credentials are given correctly, may be because the database is in non-operational mode? How to select the sec server here?
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
LVL 10

Expert Comment

by:Humpdy
ID: 34082509
Hi,

So it's restoring correctly now ?
You just can't connect to any of the databases on the secondary server to query the data is it ?
0
 
LVL 10

Accepted Solution

by:
Humpdy earned 500 total points
ID: 34082529
sorry, I misread your second post.

have a look through, it's a very good step by step example with print screens which has worked for me.
http://alexsdba.spaces.live.com/blog/cns!F86565E81CD9BC16!182.entry
0
 

Author Comment

by:bijualex
ID: 34084116
I created an empty database in the sec server and then selected "Generate a full back and restore to secondary" option and it worked :)
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

Creating and Managing Databases with phpMyAdmin in cPanel.
This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

752 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