Solved

SQL 2005 Log Shipping

Posted on 2010-11-07
6
383 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
  • 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

837 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