You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ANDPATINDEX('%[_]%',REVERSE(@LastFullBackup)) <=7-- there is a 1 or 2 digit index at the end of the string which indicates split backups. Olla only supports up to 64 file split.
478
492
493
+
-- File list can be obtained by running RESTORE FILELISTONLY of any file from the given BackupSet therefore we do not have to cater for split backups when building @FileListParamSQL
IF @Execute ='Y'RAISERROR('@ContinueLogs set to 0', 0, 1) WITHNOWAIT;
623
639
624
-
SET @sql =N'RESTORE DATABASE '+ @RestoreDatabaseName +N' FROM DISK = '''+ @BackupPathFull + @LastFullBackup +N''' WITH NORECOVERY, REPLACE'+ @MoveOption +NCHAR(13);
640
+
/* now take split backups into account */
641
+
IF (SELECTCOUNT(*) FROM #SplitBackups) >0
642
+
BEGIN
643
+
RAISERROR('Split backups found', 0, 1) WITHNOWAIT
644
+
SELECT @sql =N'RESTORE DATABASE '+ @RestoreDatabaseName +N' FROM '+STUFF((
FOR XMLPATH('')),1,2,'') +N' WITH NORECOVERY, REPLACE'+ @MoveOption +NCHAR(13);
649
+
END
650
+
ELSE
651
+
BEGIN
652
+
SET @sql =N'RESTORE DATABASE '+ @RestoreDatabaseName +N' FROM DISK = '''+ @BackupPathFull + @LastFullBackup +N''' WITH NORECOVERY, REPLACE'+ @MoveOption +NCHAR(13);
0 commit comments