Open mtengmo opened 7 years ago
Hey mtengmo,
An interesting idea. It's not an option that's been provided for in the current code. This could be achieved using xp_cmdshell from within SQL but I'd be more inclined to have a ps, vbs or cmd scheduled task either on the server or a remote machine to call the usp_GenerateRestoreScriptForThisServer stored proc to generate the restore script and write it to a file.
I think that should be a pretty straightforward approach and easy to achieve. I'll try to have a crack at it later this week though If you sort something out for yourself in the meantime please feel free to contribute it.
Cheers,
Mick.
Ok. I´m not using Ola Hallengren´s script because it can´t use retention on storage acct. The builtin SQL Managed Backup have the possibility to setup retention on storage acct, but this is not triggered from a SQL Agent. I see benefits to have it triggered from SQL, because you can probably trigger it after a backup job have finished. That makes it easier to keep the restore-script in sync with backups and keep low RPOs (1h).
Is it possible to send the restorescript to a UNC path /Azure File Services?