Link to home
Start Free TrialLog in
Avatar of CodeJunky
CodeJunkyFlag for United States of America

asked on

SQL Log Restores (No Full Backups)

I'm trying to setup an environment where I can restore log files from a primary database to a secondary database (different servers) every 30 minutes.  I do not want to have to restore a full backup each time.  This secondary database will be used as a read-only instances as well. At this point I'm getting an error "The log or differential backup cannot be restored because no files are ready to rollforward."  I understand that this is maybe because the database is in recovery mode at the time.

Any help would be greatly appreciated.
Oh, the SQL Versions are both 2016.

thanks,
John.
Avatar of Vitor Montalvão
Vitor Montalvão
Flag of Switzerland image

The solution you want is available natively in SQL Server and it's called Log Shipping.
Avatar of CodeJunky

ASKER

HI Vitor,
I need to restore the log files without creating any kind of connection between the primary and secondary database/instances.  In our situation we have access, only, to the log files, and not the SQL Instance of the primary.
Still the same requirements for Log Shipping. Only thing that it needs is access to a file share where the transaction log backups will be stored.
Ok, that's good news.  I think the problem I may be having is that when I initially restored the full backup I did not put it into Standby Mode.  I'll have to try that again.
Yes, you'll need to put the replicated database in Standby Mode if you need to access to the database.
Remove the Standby Mode so you can apply next transaction log restore.
Yup, that makes sense and it works.  My only question is that when I put it into NoRecovery mode the transaction log restore wont restore objects that have changed.
Do you get any error message during the restore when that happens?
Nothing other than a comment, not an error, stating that it can't restore objects because it does not have write permissions.  Although it states that it did restore a certain number of pages.
Please post the full message here. It may have some clue for me.
Thunder did you abandoned this question?
I'm sorry if I didn't get back to this question.  Thought I did.  I ended up working it out and my log shipping is working fine. The only thing I'm trying figure out is if it is possible to get object changes restored to database from transaction logs.  I'm leaving the database in Standby (read-only).  When restoring the trans logs I place it into NoRecovery first, than back to standby.
ASKER CERTIFIED SOLUTION
Avatar of Vitor Montalvão
Vitor Montalvão
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial