Link to home
Start Free TrialLog in
Avatar of bibi92
bibi92Flag for France

asked on

script automatically restore all full since the last diff backup

Hello,

I search a script automatically restore all full since the last diff backup.

Thanks
Avatar of James Elliott
James Elliott
Flag of United Kingdom of Great Britain and Northern Ireland image

Avatar of bibi92

ASKER

Thanks I know that I search how I can restore automatically log since the last differential.
ASKER CERTIFIED SOLUTION
Avatar of EugeneZ
EugeneZ
Flag of United States of America 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
Could you explain what it is you are trying to achieve?  A direct answer to your question might make things worse than they are leading to data loss.

Was a command executed that resulted in alteration of data that you wish to restore to a time prior to the issuance of the command?
Avatar of bibi92

ASKER

Hello,
I have to restore the last backup log.
Thanks
Regards
Restoring anything "Automatically" is a risky thing i.e. any failure in an automated process that does not include the complex preprogrammed check, will lead to more issues.
Is this a repettitive issue that you need to perform?

Using Eugene7's script with additional modification that deal with setting up a criteria check to identify the starting point, type, etc.

I believe, one does not restore a backup log without first restoring a DB to a date/time prior to the event and then using the backup logs, to bring the DB state forward to a specific date/time.


usually, diffs, come after full, the LATEST full includes all prior fulls.

transaction log backups do not have FULL, I believe they are incremental backups since the last backup (DB or Log)
you may like to read about "Tail-Log Backups" if your sql server is 2005+
http://msdn.microsoft.com/en-us/library/ms179314(v=sql.100).aspx