Skip to content

Commit f170798

Browse files
fvanderhaegenBrentOzar
authored andcommitted
#1998 sp_DatabaseRestore (#1999)
Set @DiffLastLSN in case no DIFF backup files are found, otherwise the logs won't get restored
1 parent 9268e37 commit f170798

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

sp_DatabaseRestore.sql

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -826,6 +826,11 @@ BEGIN
826826
FROM #Headers
827827
WHERE BackupType = 5;
828828
END;
829+
830+
IF @DiffLastLSN IS NULL
831+
BEGIN
832+
SET @DiffLastLsn=@FullLastLSN
833+
END
829834
END
830835

831836

0 commit comments

Comments
 (0)