Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database Marked Restoring 1

Status
Not open for further replies.

bikerboy718

Programmer
Feb 11, 2005
195
US
I have to make active a database that is marked recovering and I am not quite sure how this is done. Any help is greatly appreciated.



With Great Power Comes Great Responsibility!!! [afro]

Michael
 
Check sp_resetstatus in BOL. If this a 2005 database you can change the status with an ALTER database command.


- Paul
- If at first you don't succeed, find out if the loser gets anything.
 
Okay...how did you do the restore? Did you use WITH NORECOVERY?

Try running this: (change dbname to the name of the database)
Code:
RESTORE DATABASE dbname
 WITH RECOVERY

-SQLBill

Posting advice: FAQ481-4875
 
For the most part I am testing out how log shipping works in 2005. I have log shipping set up but if I wanted to make the secondary database active how would I go about doing so?

With Great Power Comes Great Responsibility!!! [afro]

Michael
 
Oh... Just restore the last log again with recovery

- Paul
- If at first you don't succeed, find out if the loser gets anything.
 
HEre is a little more detail.

You disable the restore job on the source server. Then manually restore the last TRN file with recovery. There are also some procedure like sp_change_log_shipping_primary_database

Check them out in BOL.

- Paul
- If at first you don't succeed, find out if the loser gets anything.
 
Keep in mind once you apply the last log with recovery you won't be able to apply more logs to that database. You will have to create a new backup, restore it with norecover and restart log shipping. There is no need to delete log shipping , you can just disable all the jobs while you restore the database.


- Paul
- If at first you don't succeed, find out if the loser gets anything.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top