• AlexSQLForums - Wednesday, February 7, 2018 5:48 PM

    Hi Mike
    I think you have to specify log directory as well

    EXEC dbo.sp_DatabaseRestore
    @Database = 'TEST1',
    @BackupPathFull = '\\PATHTOFILE\FULL\',
    @BackupPathDiff = '\\PATHTOFILE\DIFF\',
    @BackupPathLog = '\\PATHTOFILE\LOG\',
    @RestoreDiff = 1,
    @ContinueLogs = 0,
    @RunRecovery = 1;

    Alex,

    Thank you for the suggestion. Even though I don't think specifying a log path should be a requirement for diffs, I gave it a try. Unfortunately, it still didn't restore the diff. Now, to be fair, I didn't actually put any log files in the directory--I only specified a path in the call. Also, as you can see, for simplicity, all of my paths are the same. I'm not sure if either of these two things (not putting actual log files in the directory and using the same directory for everything) had anything to do with the diff not getting picked up, but I'll keep digging...

    EXEC DBA_Utils.dbo.sp_DatabaseRestore
                @TestRestore = 0,
                @Database = 'production',
                @RestoreDatabaseName = 'production_restored',
                @MoveFiles = 1,
                @MoveDataDrive = 'E:\temporary\',
                @MoveLogDrive = 'E:\temporary\',
                @BackupPathFull = 'E:\temporary\',
                @BackupPathDiff = 'E:\temporary\',
                @BackupPathLog = 'E:\temporary\',
                @RestoreDiff = 1,
                @ContinueLogs = 0,
                @RunRecovery = 1,
                @Debug = 1;

    Again, thanks for your help with this.

    Mike

    Mike Scalise, PMP
    https://www.michaelscalise.com