Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 419
  • Last Modified:

Alter database into Recovery mode Sql Server

Hello ,

I have a 2 sql servers one on site and the other offsite , they are both currently at the same state as both been restored with same bak file. I want to be able to on the onsite database make some transactions then take a Log File Backup and the use that TRN file to restore on the other site. If the database is in NonRecovery Mode , how do i get it into Recovery mode without having to to a restore of bak file?

Thanks
0
deanmachine333
Asked:
deanmachine333
  • 3
  • 3
1 Solution
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
Just run the restore command with recovery option:
RESTORE DATABASE YourDatabaseNameHere  WITH RECOVERY

Open in new window

0
 
deanmachine333Author Commented:
Hello ,

thanks for response but the database is in RECOVERY MODE , i ment to get get the database in NORECOVERY MODE so i will be able to apply the Log File ( TRN ) - So need it non-operational

cheers
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
You can't do it without restoring a full backup first.
And because transactions are sequential you can't restore a transactional backup without restoring all the previous transactions backups that you may have.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
deanmachine333Author Commented:
Thanks for reply , ok was just checking there was not a way to get the database into NORECOVERY mode without doing a full backup.

cheers
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
Not doing a full backup but restoring from a full backup. It's always the first step from a restore. And NORECOVERY is not the default option so you always need to add that option to the restore command.
0
 
deanmachine333Author Commented:
Hiya , yep i know how to do that i was looking for a way to put the database in nonrecovery with out doing restore from backup.

cheers
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now