Skip to content

Commit 8669cd6

Browse files
v2.1.28
1 parent b6043dc commit 8669cd6

10 files changed

+50
-141
lines changed

bin/diagnosticquery/SQLServerDiagnosticQueries_2016SP2.sql

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
-- SQL Server 2016 SP2 Diagnostic Information Queries
33
-- Glenn Berry
4-
-- Last Modified: November 1, 2024
4+
-- Last Modified: November 13, 2024
55
-- https://glennsqlperformance.com/
66
-- https://sqlserverperformance.wordpress.com/
77
-- YouTube: https://bit.ly/2PkoAM1
@@ -94,6 +94,8 @@ SELECT @@SERVERNAME AS [Server Name], @@VERSION AS [SQL Server and OS Version In
9494
-- 13.0.6435.1 SP3 + GDR 10/10/2023 https://support.microsoft.com/en-us/topic/kb5029186-description-of-the-security-update-for-sql-server-2016-sp3-gdr-october-10-2023-618b034a-d575-48e0-804a-7b481ba2e600
9595
-- 13.0.6441.1 SP3 + GDR 7/9/2024 https://support.microsoft.com/en-us/topic/kb5040946-description-of-the-security-update-for-sql-server-2016-sp3-gdr-july-9-2024-e943f6a8-7a97-41b4-804c-c52ca775f5dd
9696
-- 13.0.6445.1 SP3 + GDR 9/10/2024 https://support.microsoft.com/en-us/topic/kb5042207-description-of-the-security-update-for-sql-server-2016-sp3-gdr-september-10-2024-e27a41df-009d-4a50-85e7-dc8f06b9a5a5
97+
-- 13.0.6450.1 SP3 + GDR 10/8/2024 https://support.microsoft.com/en-us/topic/kb5046063-description-of-the-security-update-for-sql-server-2016-sp3-gdr-october-8-2024-87f6091b-a0c0-48e7-8de4-b10381559ba7
98+
-- 13.0.6455.2 SP3 + GDR 11/12/2024 https://support.microsoft.com/en-us/topic/kb5046855-description-of-the-security-update-for-sql-server-2016-sp3-gdr-november-12-2024-736b0a32-912d-4ea5-baf8-50d046cbfa1a
9799

98100
-- Azure Connect Pack Builds
99101
-- 13.0.7000.253 Azure Connect Pack 5/19/2022 https://learn.microsoft.com/en-us/troubleshoot/sql/releases/sqlserver-2016/servicepack3-azureconnect
@@ -102,6 +104,9 @@ SELECT @@SERVERNAME AS [Server Name], @@VERSION AS [SQL Server and OS Version In
102104
-- 13.0.7029.3 Azure Connect Pack + GDR 10/10/2023 https://support.microsoft.com/en-us/topic/kb5029187-description-of-the-security-update-for-sql-server-2016-sp3-azure-connect-feature-pack-october-10-2023-e5541468-f243-4000-872c-ac782cfad99f
103105
-- 13.0.7037.1 Azure Connect Pack + GDR 7/9/2024 https://support.microsoft.com/en-us/topic/kb5040944-description-of-the-security-update-for-sql-server-2016-sp3-azure-connect-feature-pack-july-9-2024-72b636c9-0619-4c44-b263-f3d7478bcd75
104106
-- 13.0.7040.1 Azure Connect Pack + GDR 9/10/2024 https://support.microsoft.com/en-us/topic/kb5042207-description-of-the-security-update-for-sql-server-2016-sp3-gdr-september-10-2024-e27a41df-009d-4a50-85e7-dc8f06b9a5a5
107+
-- 13.0.7045.2 Azure Connect Pack + GDR 10/8/2024 https://support.microsoft.com/en-us/topic/kb5046062-description-of-the-security-update-for-sql-server-2016-sp3-azure-connect-feature-pack-october-8-2024-fb7d9289-bbef-4d1f-bd71-fb3e036d81ae
108+
-- 13.0.7050.2 Azure Connect Pack + GDR 11/12/2024 https://support.microsoft.com/en-us/topic/kb5046856-description-of-the-security-update-for-sql-server-2016-sp3-azure-connect-feature-pack-november-12-2024-b180cac0-187e-48eb-b6c6-3d48d0a00902
109+
105110

106111
-- How to determine the version, edition and update level of SQL Server and its components
107112
-- https://bit.ly/2oAjKgW

bin/diagnosticquery/SQLServerDiagnosticQueries_2017.sql

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
-- SQL Server 2017 Diagnostic Information Queries
33
-- Glenn Berry
4-
-- Last Modified: November 1, 2024
4+
-- Last Modified: November 13, 2024
55
-- https://glennsqlperformance.com/
66
-- https://sqlserverperformance.wordpress.com/
77
-- YouTube: https://bit.ly/2PkoAM1
@@ -108,6 +108,9 @@ SELECT @@SERVERNAME AS [Server Name], @@VERSION AS [SQL Server and OS Version In
108108
-- 14.0.3465.1 CU31 + GDR 10/10/2023 https://support.microsoft.com/en-us/topic/kb5029376-description-of-the-security-update-for-sql-server-2017-cu31-october-10-2023-ce23ddf7-b79e-4ba7-ba9d-2679f23a1ad8
109109
-- 14.0.3471.2 CU31 + GDR 7/9/2024 https://support.microsoft.com/en-us/topic/kb5040940-description-of-the-security-update-for-sql-server-2017-cu31-july-9-2024-bff7ab26-e882-4419-aebb-30356125f5c9
110110
-- 14.0.3475.1 CU31 + GDR 9/10/2024 https://support.microsoft.com/en-us/topic/kb5042215-description-of-the-security-update-for-sql-server-2017-cu31-september-10-2024-55bba26f-548d-466c-9c48-edfb51a53a8a
111+
-- 14.0.3480.1 CU31 + GDR 10/8/2024 https://support.microsoft.com/en-us/topic/kb5046061-description-of-the-security-update-for-sql-server-2017-cu31-october-8-2024-af669e75-bc43-4679-bfbe-e153e679dd2f
112+
-- 14.0.3485.1 CU31 + GDR 11/12/2024 https://support.microsoft.com/en-us/topic/kb5046858-description-of-the-security-update-for-sql-server-2017-cu31-november-12-2024-2984d3a5-0683-4f9b-9e6a-3888e67bd859
113+
111114

112115
-- How to determine the version, edition and update level of SQL Server and its components
113116
-- https://bit.ly/2oAjKgW

bin/diagnosticquery/SQLServerDiagnosticQueries_2019.sql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
-- SQL Server 2019 Diagnostic Information Queries
33
-- Glenn Berry
4-
-- Last Modified: November 1, 2024
4+
-- Last Modified: November 13, 2024
55
-- https://glennsqlperformance.com/
66
-- https://sqlserverperformance.wordpress.com/
77
-- YouTube: https://bit.ly/2PkoAM1
@@ -105,7 +105,8 @@ SELECT @@SERVERNAME AS [Server Name], @@VERSION AS [SQL Server and OS Version In
105105
-- 15.0.4382.1 CU27 + GDR 7/9/2024 https://support.microsoft.com/en-us/topic/kb5040948-description-of-the-security-update-for-sql-server-2019-cu27-july-9-2024-6447dc00-9f1b-484c-9d3d-9e1f1b9f915c
106106
-- 15.0.4385.2 CU28 8/1/2024 https://learn.microsoft.com/en-us/troubleshoot/sql/releases/sqlserver-2019/cumulativeupdate28
107107
-- 15.0.4390.2 CU28 + GDR 9/10/2024 https://support.microsoft.com/en-us/topic/kb5042749-description-of-the-security-update-for-sql-server-2019-cu28-september-10-2024-17402ce5-07d3-4e30-9037-9ef997104f34
108-
-- 15.0.4405.4 CU29 11/1/2024 https://learn.microsoft.com/en-us/troubleshoot/sql/releases/sqlserver-2019/cumulativeupdate29
108+
-- 15.0.4405.4 CU29 10/31/2024 https://learn.microsoft.com/en-us/troubleshoot/sql/releases/sqlserver-2019/cumulativeupdate29
109+
-- 15.0.4410.1 CU29 + GDR 11/12/2024 https://support.microsoft.com/en-us/topic/kb5046860-description-of-the-security-update-for-sql-server-2019-cu29-november-12-2024-4bddde28-482c-4628-a6e2-2d4f542088b7
109110

110111

111112
-- How to determine the version, edition and update level of SQL Server and its components

bin/diagnosticquery/SQLServerDiagnosticQueries_2022.sql

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
-- SQL Server 2022 Diagnostic Information Queries
33
-- Glenn Berry
4-
-- Last Modified: November 1, 2024
4+
-- Last Modified: November 15, 2024
55
-- https://glennsqlperformance.com/
66
-- https://sqlserverperformance.wordpress.com/
77
-- YouTube: https://bit.ly/2PkoAM1
@@ -84,6 +84,10 @@ SELECT @@SERVERNAME AS [Server Name], @@VERSION AS [SQL Server and OS Version In
8484
-- 16.0.4135.4 CU14 7/23/2024 https://learn.microsoft.com/en-us/troubleshoot/sql/releases/sqlserver-2022/cumulativeupdate14
8585
-- 16.0.4140.3 CU14 + GDR 9/10/2024 https://support.microsoft.com/en-us/topic/kb5042578-description-of-the-security-update-for-sql-server-2022-cu14-september-10-2024-560e6e4c-1f49-4c18-9eb7-054e9fdee3c7
8686
-- 16.0.4145.4 CU15 9/25/2024 https://learn.microsoft.com/en-us/troubleshoot/sql/releases/sqlserver-2022/cumulativeupdate15
87+
-- 16.0.4150.1 CU15 + GDR 10/8/2024 https://support.microsoft.com/en-us/topic/kb5046059-description-of-the-security-update-for-sql-server-2022-cu15-october-8-2024-b592d86f-3351-4f9f-9c80-ef495a0137c1
88+
-- 16.0.4155.4 CU15 + GDR 11/12/2024 https://support.microsoft.com/en-us/topic/kb5046862-description-of-the-security-update-for-sql-server-2022-cu15-november-12-2024-ab9f3a55-8264-44e9-9a40-0b32bcd83df0
89+
-- 16.0.4165.4 CU16 11/14/2024 https://learn.microsoft.com/en-us/troubleshoot/sql/releases/sqlserver-2022/cumulativeupdate16
90+
8791

8892
-- What's new in SQL Server 2022 (16.x)
8993
-- https://bit.ly/3MJEjR1

bin/maintenancesolution/CommandExecute.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ BEGIN
3636
--// Source: https://ola.hallengren.com //--
3737
--// License: https://ola.hallengren.com/license.html //--
3838
--// GitHub: https://github.com/olahallengren/sql-server-maintenance-solution //--
39-
--// Version: 2024-11-14 14:03:14 //--
39+
--// Version: 2022-12-03 17:23:44 //--
4040
----------------------------------------------------------------------------------------------------
4141

4242
SET NOCOUNT ON

bin/maintenancesolution/DatabaseBackup.sql

Lines changed: 10 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ ALTER PROCEDURE [dbo].[DatabaseBackup]
1616
@CleanupTime int = NULL,
1717
@CleanupMode nvarchar(max) = 'AFTER_BACKUP',
1818
@Compress nvarchar(max) = NULL,
19-
@CompressionAlgorithm nvarchar(max) = NULL,
2019
@CopyOnly nvarchar(max) = 'N',
2120
@ChangeBackupType nvarchar(max) = 'N',
2221
@BackupSoftware nvarchar(max) = NULL,
@@ -67,7 +66,6 @@ ALTER PROCEDURE [dbo].[DatabaseBackup]
6766
@ObjectLevelRecoveryMap nvarchar(max) = 'N',
6867
@ExcludeLogShippedFromLogBackup nvarchar(max) = 'Y',
6968
@DirectoryCheck nvarchar(max) = 'Y',
70-
@BackupOptions nvarchar(max) = NULL,
7169
@StringDelimiter nvarchar(max) = ',',
7270
@DatabaseOrder nvarchar(max) = NULL,
7371
@DatabasesInParallel nvarchar(max) = 'N',
@@ -82,7 +80,7 @@ BEGIN
8280
--// Source: https://ola.hallengren.com //--
8381
--// License: https://ola.hallengren.com/license.html //--
8482
--// GitHub: https://github.com/olahallengren/sql-server-maintenance-solution //--
85-
--// Version: 2024-11-14 14:03:14 //--
83+
--// Version: 2022-12-03 17:23:44 //--
8684
----------------------------------------------------------------------------------------------------
8785

8886
SET NOCOUNT ON
@@ -281,7 +279,6 @@ BEGIN
281279
SET @Parameters += ', @CleanupTime = ' + ISNULL(CAST(@CleanupTime AS nvarchar),'NULL')
282280
SET @Parameters += ', @CleanupMode = ' + ISNULL('''' + REPLACE(@CleanupMode,'''','''''') + '''','NULL')
283281
SET @Parameters += ', @Compress = ' + ISNULL('''' + REPLACE(@Compress,'''','''''') + '''','NULL')
284-
SET @Parameters += ', @CompressionAlgorithm = ' + ISNULL('''' + REPLACE(@CompressionAlgorithm,'''','''''') + '''','NULL')
285282
SET @Parameters += ', @CopyOnly = ' + ISNULL('''' + REPLACE(@CopyOnly,'''','''''') + '''','NULL')
286283
SET @Parameters += ', @ChangeBackupType = ' + ISNULL('''' + REPLACE(@ChangeBackupType,'''','''''') + '''','NULL')
287284
SET @Parameters += ', @BackupSoftware = ' + ISNULL('''' + REPLACE(@BackupSoftware,'''','''''') + '''','NULL')
@@ -553,7 +550,7 @@ BEGIN
553550
GROUP BY tmpDatabases.DatabaseName) SelectedDatabases2
554551
ON tmpDatabases.DatabaseName = SelectedDatabases2.DatabaseName
555552

556-
IF @Databases IS NOT NULL AND (NOT EXISTS(SELECT * FROM @SelectedDatabases) OR EXISTS(SELECT * FROM @SelectedDatabases WHERE DatabaseName IS NULL OR DATALENGTH(DatabaseName) = 0))
553+
IF @Databases IS NOT NULL AND (NOT EXISTS(SELECT * FROM @SelectedDatabases) OR EXISTS(SELECT * FROM @SelectedDatabases WHERE DatabaseName IS NULL OR DatabaseName = ''))
557554
BEGIN
558555
INSERT INTO @Errors ([Message], Severity, [State])
559556
SELECT 'The value for the parameter @Databases is not supported.', 16, 1
@@ -674,7 +671,7 @@ BEGIN
674671
SELECT @ErrorMessage = @ErrorMessage + QUOTENAME(DatabaseName) + ', '
675672
FROM @tmpDatabases
676673
WHERE Selected = 1
677-
AND DATALENGTH(DatabaseNameFS) = 0
674+
AND DatabaseNameFS = ''
678675
ORDER BY DatabaseName ASC
679676
IF @@ROWCOUNT > 0
680677
BEGIN
@@ -687,7 +684,7 @@ BEGIN
687684
FROM @tmpDatabases
688685
WHERE UPPER(DatabaseNameFS) IN(SELECT UPPER(DatabaseNameFS) FROM @tmpDatabases GROUP BY UPPER(DatabaseNameFS) HAVING COUNT(*) > 1)
689686
AND UPPER(DatabaseNameFS) IN(SELECT UPPER(DatabaseNameFS) FROM @tmpDatabases WHERE Selected = 1)
690-
AND DATALENGTH(DatabaseNameFS) > 0
687+
AND DatabaseNameFS <> ''
691688
ORDER BY DatabaseName ASC
692689
OPTION (RECOMPILE)
693690
IF @@ROWCOUNT > 0
@@ -964,7 +961,7 @@ BEGIN
964961
--// Check URLs //--
965962
----------------------------------------------------------------------------------------------------
966963

967-
IF EXISTS(SELECT * FROM @URLs WHERE Mirror = 0 AND NOT (DirectoryPath LIKE 'https://%/%' OR DirectoryPath LIKE 's3://%/%'))
964+
IF EXISTS(SELECT * FROM @URLs WHERE Mirror = 0 AND DirectoryPath NOT LIKE 'https://%/%')
968965
BEGIN
969966
INSERT INTO @Errors ([Message], Severity, [State])
970967
SELECT 'The value for the parameter @URL is not supported.', 16, 1
@@ -984,7 +981,7 @@ BEGIN
984981

985982
----------------------------------------------------------------------------------------------------
986983

987-
IF EXISTS(SELECT * FROM @URLs WHERE Mirror = 1 AND NOT (DirectoryPath LIKE 'https://%/%' OR DirectoryPath LIKE 's3://%/%'))
984+
IF EXISTS(SELECT * FROM @URLs WHERE Mirror = 1 AND DirectoryPath NOT LIKE 'https://%/%')
988985
BEGIN
989986
INSERT INTO @Errors ([Message], Severity, [State])
990987
SELECT 'The value for the parameter @MirrorURL is not supported.', 16, 1
@@ -1066,16 +1063,6 @@ BEGIN
10661063
WHEN @BackupSoftware IS NOT NULL AND @CompressionLevel = 0 THEN 'N' END
10671064
END
10681065

1069-
----------------------------------------------------------------------------------------------------
1070-
--// Get default compression algorithm //--
1071-
----------------------------------------------------------------------------------------------------
1072-
1073-
IF @CompressionAlgorithm IS NULL AND @BackupSoftware IS NULL AND @Version >= 16
1074-
BEGIN
1075-
SELECT @CompressionAlgorithm = CASE WHEN @BackupSoftware IS NULL AND EXISTS(SELECT * FROM sys.configurations WHERE name = 'backup compression algorithm' AND value_in_use = 1) THEN 'MS_XPRESS'
1076-
WHEN @BackupSoftware IS NULL AND EXISTS(SELECT * FROM sys.configurations WHERE name = 'backup compression algorithm' AND value_in_use = 2) THEN 'QAT_DEFLATE' END
1077-
END
1078-
10791066
----------------------------------------------------------------------------------------------------
10801067
--// Check input parameters //--
10811068
----------------------------------------------------------------------------------------------------
@@ -1194,32 +1181,6 @@ BEGIN
11941181

11951182
----------------------------------------------------------------------------------------------------
11961183

1197-
IF @CompressionAlgorithm NOT IN ('MS_XPRESS','QAT_DEFLATE')
1198-
BEGIN
1199-
INSERT INTO @Errors ([Message], Severity, [State])
1200-
SELECT 'The value for the parameter @CompressionAlgorithm is not supported. The allowed values are MS_XPRESS and QAT_DEFLATE.', 16, 1
1201-
END
1202-
1203-
IF @CompressionAlgorithm IS NOT NULL AND NOT (@Version >= 16)
1204-
BEGIN
1205-
INSERT INTO @Errors ([Message], Severity, [State])
1206-
SELECT 'The value for the parameter @CompressionAlgorithm is not supported. Specifying the compression algorithm is only supported in SQL Server 2022 and later.', 16, 2
1207-
END
1208-
1209-
IF @CompressionAlgorithm = 'QAT_DEFLATE' AND NOT (SERVERPROPERTY('EngineEdition') IN(2, 3))
1210-
BEGIN
1211-
INSERT INTO @Errors ([Message], Severity, [State])
1212-
SELECT 'The value for the parameter @CompressionAlgorithm is not supported. Setting the compression algorithm to QAT_DEFLATE is only supported in Standard and Enterprise Edition.', 16, 3
1213-
END
1214-
1215-
IF @CompressionAlgorithm IS NOT NULL AND @BackupSoftware IS NOT NULL
1216-
BEGIN
1217-
INSERT INTO @Errors ([Message], Severity, [State])
1218-
SELECT 'The value for the parameter @CompressionAlgorithm is not supported. Setting the compression algorithm is only supported with SQL Server native backup', 16, 4
1219-
END
1220-
1221-
----------------------------------------------------------------------------------------------------
1222-
12231184
IF @CopyOnly NOT IN ('Y','N') OR @CopyOnly IS NULL
12241185
BEGIN
12251186
INSERT INTO @Errors ([Message], Severity, [State])
@@ -1334,7 +1295,7 @@ BEGIN
13341295

13351296
----------------------------------------------------------------------------------------------------
13361297

1337-
IF @MaxTransferSize < 65536 OR @MaxTransferSize > 20971520
1298+
IF @MaxTransferSize < 65536 OR @MaxTransferSize > 4194304
13381299
BEGIN
13391300
INSERT INTO @Errors ([Message], Severity, [State])
13401301
SELECT 'The value for the parameter @MaxTransferSize is not supported.', 16, 1
@@ -1420,13 +1381,7 @@ BEGIN
14201381
SELECT 'The value for the parameter @NumberOfFiles is not supported.', 16, 9
14211382
END
14221383

1423-
IF @NumberOfFiles > 32 AND @URL LIKE 's3%' AND @MirrorURL LIKE 's3%'
1424-
BEGIN
1425-
INSERT INTO @Errors ([Message], Severity, [State])
1426-
SELECT 'The value for the parameter @NumberOfFiles is not supported. The maximum number of files when performing mirrored backups to S3 storage is 32.', 16, 10
1427-
END
1428-
1429-
----------------------------------------------------------------------------------------------------
1384+
----------------------------------------------------------------------------------------------------
14301385

14311386
IF @MinBackupSizeForMultipleFiles <= 0
14321387
BEGIN
@@ -1578,7 +1533,7 @@ BEGIN
15781533
SELECT 'The value for the parameter @Encrypt is not supported.', 16, 1
15791534
END
15801535

1581-
IF @Encrypt = 'Y' AND @BackupSoftware IS NULL AND NOT (@Version >= 12 AND (SERVERPROPERTY('EngineEdition') IN(3, 8) OR SERVERPROPERTY('EditionID') IN(-1534726760, 284895786)))
1536+
IF @Encrypt = 'Y' AND @BackupSoftware IS NULL AND NOT (@Version >= 12 AND (SERVERPROPERTY('EngineEdition') = 3) OR SERVERPROPERTY('EditionID') IN(-1534726760, 284895786))
15821537
BEGIN
15831538
INSERT INTO @Errors ([Message], Severity, [State])
15841539
SELECT 'The value for the parameter @Encrypt is not supported.', 16, 2
@@ -1783,7 +1738,7 @@ BEGIN
17831738
SELECT 'The value for the parameter @Credential is not supported.', 16, 2
17841739
END
17851740

1786-
IF @URL IS NOT NULL AND @Credential IS NULL AND NOT EXISTS(SELECT * FROM sys.credentials WHERE UPPER(credential_identity) IN('SHARED ACCESS SIGNATURE','MANAGED IDENTITY','S3 ACCESS KEY'))
1741+
IF @URL IS NOT NULL AND @Credential IS NULL AND NOT EXISTS(SELECT * FROM sys.credentials WHERE UPPER(credential_identity) = 'SHARED ACCESS SIGNATURE')
17871742
BEGIN
17881743
INSERT INTO @Errors ([Message], Severity, [State])
17891744
SELECT 'The value for the parameter @Credential is not supported.', 16, 3
@@ -3577,11 +3532,6 @@ BEGIN
35773532
SET @CurrentCommand += CASE WHEN @Compress = 'Y' AND (@CurrentIsEncrypted = 0 OR (@CurrentIsEncrypted = 1 AND ((@Version >= 13 AND @CurrentMaxTransferSize >= 65537) OR @Version >= 15.0404316 OR SERVERPROPERTY('EngineEdition') = 8))) THEN ', COMPRESSION' ELSE ', NO_COMPRESSION' END
35783533
END
35793534

3580-
IF @Compress = 'Y' AND @CompressionAlgorithm IS NOT NULL
3581-
BEGIN
3582-
SET @CurrentCommand += ' (ALGORITHM = ' + @CompressionAlgorithm + ')'
3583-
END
3584-
35853535
IF @CurrentBackupType = 'DIFF' SET @CurrentCommand += ', DIFFERENTIAL'
35863536

35873537
IF EXISTS(SELECT * FROM @CurrentFiles WHERE Mirror = 1)
@@ -3597,7 +3547,6 @@ BEGIN
35973547
IF @BufferCount IS NOT NULL SET @CurrentCommand += ', BUFFERCOUNT = ' + CAST(@BufferCount AS nvarchar)
35983548
IF @CurrentMaxTransferSize IS NOT NULL SET @CurrentCommand += ', MAXTRANSFERSIZE = ' + CAST(@CurrentMaxTransferSize AS nvarchar)
35993549
IF @Description IS NOT NULL SET @CurrentCommand += ', DESCRIPTION = N''' + REPLACE(@Description,'''','''''') + ''''
3600-
IF @BackupOptions IS NOT NULL SET @CurrentCommand += ', BACKUP_OPTIONS = N''' + REPLACE(@BackupOptions,'''','''''') + ''''
36013550
IF @Encrypt = 'Y' SET @CurrentCommand += ', ENCRYPTION (ALGORITHM = ' + UPPER(@EncryptionAlgorithm) + ', '
36023551
IF @Encrypt = 'Y' AND @ServerCertificate IS NOT NULL SET @CurrentCommand += 'SERVER CERTIFICATE = ' + QUOTENAME(@ServerCertificate)
36033552
IF @Encrypt = 'Y' AND @ServerAsymmetricKey IS NOT NULL SET @CurrentCommand += 'SERVER ASYMMETRIC KEY = ' + QUOTENAME(@ServerAsymmetricKey)
@@ -3837,7 +3786,6 @@ BEGIN
38373786
SET @CurrentCommand += ' WITH '
38383787
IF @CheckSum = 'Y' SET @CurrentCommand += 'CHECKSUM'
38393788
IF @CheckSum = 'N' SET @CurrentCommand += 'NO_CHECKSUM'
3840-
IF @BackupOptions IS NOT NULL SET @CurrentCommand += ', RESTORE_OPTIONS = N''' + REPLACE(@BackupOptions,'''','''''') + ''''
38413789
IF @URL IS NOT NULL AND @Credential IS NOT NULL SET @CurrentCommand += ', CREDENTIAL = N''' + REPLACE(@Credential,'''','''''') + ''''
38423790
END
38433791

0 commit comments

Comments
 (0)