Solved

SQL 2005 Log Shipping

Posted on 2010-11-07
6
380 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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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 to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

747 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now