SQL Backup failed with exit code: 507 SQL error code: 0
I just upgraded to the latest version of RedGate backup and now my automated restore has stopped working. I can restore this particular .sqb using a script generated by the RedGate GUI, however the (almost) same command in scheduled task it does not work.
We have been using a wildcard search and the LATEST_FULL for a few years and this appears to be the problem. I think it is something to do with this combination of wildcard search of the latest full backup as I can "break" the new scripted command by adding in "LATEST_FULL" these commands in.
My input folder has a file in this format:
EXECUTE master..sqlbackup '-SQL "RESTORE DATABASE [TestDb] FROM DISK = ''I:\Transfers\Inbound\GXB_LIVE\FULL*TestDb*.sqb'' LATEST_FULL WITH MOVETO=''I:\Transfers\Inbound\TestDb\Done\'', ERASEFILES = 1b, MAILTO = ''[email protected]'', RECOVERY, DISCONNECT_EXISTING, REPLACE, ORPHAN_CHECK, LOGTO=''I:\Transfers\Inbound\TestDb_Restore_20181609.log'', CHECKDB = ''NO_INFOMSGS, ALL_ERRORMSGS''"
Scripted code from RG GUI (working)
Same code as above but including the LATEST_FULL (not working).
TestDb is not a real db and is just used to test this. I have tried my original command with and without a database called TestDb existing on the server. Both times I get the same result.
Can anyone tell me what I have done wrong.