1

I am using Sitecore Azure Toolkit 2.5 and template https://github.com/Sitecore/Sitecore-Azure-Quickstart-Templates/blob/master/Sitecore%209.3.0/XPSingle/azuredeploy.json

Here are my scripts besides all parameter files

$SCSDK="F:\sitecore\azure\SAT250"
$SCTemplates="https://github.com/Sitecore/Sitecore-Azure-Quickstart-Templates/tree/master/Sitecore%209.3.0/XPSingle/azuredeploy.json"
$DeploymentId = "sandstorm"
$LicenseFile = "C:\sc930_install\license.xml"
$SubscriptionId = "<subscriptionid>"
$Location="South Central US"
$ParamFile="F:\sitecore\azure\XPSingle\azuredeploy.parameters.json"
$ArmTemplatePath = "F:\sitecore\azure\XPSingle\azuredeploy.json"
$CertificateFile = "C:\certificates\star.demo789.pfx"

$Parameters = @{
     #set the size of all recommended instance sizes   
     #"sitecoreSKU"="Medium";
     "deploymentId"=$DeploymentId;
     "authCertificateBlob" = [System.Convert]::ToBase64String([System.IO.File]::ReadAllBytes($CertificateFile));
     #by default this installs azuresearch
     #if you uncomment the following it will use an existing solr connectionstring that
     # you have created instead of using AzureSearch
     #"solrConnectionString"= "https://myinstancesomewhere/solr";
}

Import-Module $SCSDK\tools\Sitecore.Cloud.Cmdlets.psm1 -Verbose

Connect-AzAccount -tenantid <tenantid>

Set-AzContext -SubscriptionId $SubscriptionId

Start-SitecoreAzureDeployment -Verbose -Name $DeploymentId -Location $Location -ArmTemplateUrl $SCTemplates -ArmParametersPath $ParamFile  -LicenseXmlPath $LicenseFile  -SetKeyValue $Parameters

Unfortunately, I always got the following error:

New-AzResourceGroupDeployment : 5:13:53 AM - Error: Code=InvalidTemplate; Message=Deployment template parse failed: 'Unexpected character encountered 
while parsing value: <. Path '', line 0, position 0.'.
At F:\sitecore\azure\SAT250\tools\Sitecore.Cloud.Cmdlets.psm1:115 char:35
+ ... eployment = New-AzResourceGroupDeployment -Name $Name -ResourceGroupN ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [New-AzResourceGroupDeployment], Exception
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDeploymentCmdlet
 
New-AzResourceGroupDeployment : The deployment validation failed
At F:\sitecore\azure\SAT250\tools\Sitecore.Cloud.Cmdlets.psm1:115 char:35
+ ... eployment = New-AzResourceGroupDeployment -Name $Name -ResourceGroupN ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [New-AzResourceGroupDeployment], InvalidOperationException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDeploymentCmdlet
 

Any help is appreciated!

The template validation passed after making changes to the url of the template path to https://raw.githubusercontent.com/Sitecore/Sitecore-Azure-Quickstart-Templates/master/Sitecore%209.3.0/XPSingle/azuredeploy.json

The certificate is a wildcard certificate *.demo789.com and I verified the the password can successfully import the pfx into local computer cert store. but the deployment script show the following errors now (but many resources are created in the resource group):

New-AzResourceGroupDeployment : 2:55:26 PM - The deployment 'sandstorm' failed with error(s). Showing 2 out of 2 error(s).
Status Message: At least one certificate is not valid (Certificate failed validation because it could not be loaded). (Code: BadRequest)
 - At least one certificate is not valid (Certificate failed validation because it could not be loaded). (Code:)
 -  (Code:BadRequest)
 -  (Code:)
Status Message: At least one resource deployment operation failed. Please list deployment operations for details. Please see 
https://aka.ms/arm-deployment-operations for usage details. (Code: DeploymentFailed)
 - {
  "Code": "BadRequest",
  "Message": "At least one certificate is not valid (Certificate failed validation because it could not be loaded).",
  "Target": null,
  "Details": [
    {
      "Message": "At least one certificate is not valid (Certificate failed validation because it could not be loaded)."
    },
    {
      "Code": "BadRequest"
    },
    {
      "ErrorEntity": {
        "ExtendedCode": "04023",
        "MessageTemplate": "At least one certificate is not valid ({0}).",
        "Parameters": [
          "Certificate failed validation because it could not be loaded"
        ],
        "Code": "BadRequest",
        "Message": "At least one certificate is not valid (Certificate failed validation because it could not be loaded)."
      }
    }
  ],
  "Innererror": null
} (Code:BadRequest)
CorrelationId: c54130dc-0b88-4058-8844-a6d94d74dd8f
At F:\sitecore\azure\SAT250\tools\Sitecore.Cloud.Cmdlets.psm1:115 char:35
+ ... eployment = New-AzResourceGroupDeployment -Name $Name -ResourceGroupN ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [New-AzResourceGroupDeployment], Exception
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDeploymentCmdlet

DeploymentName          : sandstorm
ResourceGroupName       : sandstorm
ProvisioningState       : Failed
Timestamp               : 10/12/2023 2:55:25 PM
Mode                    : Incremental
TemplateLink            : 
                          Uri            : https://raw.githubusercontent.com/Sitecore/Sitecore-Azure-Quickstart-Templates/master/Sitecore%209.3.0/XPSi
                          ngle/azuredeploy.json
                          ContentVersion : 1.0.0.0
                          
Parameters              : 
                          Name                                                                  Type                       Value     
                          ====================================================================  =========================  ==========
                          modules                                                               SecureObject               null      
...

the certificate issue is gone after using a self-signed certificate but now there is a sql server timeout error - I will try it again

New-AzResourceGroupDeployment : 3:51:46 PM - The deployment 'sandstorm' failed with error(s). Showing 1 out of 1 error(s).
Status Message: At least one resource deployment operation failed. Please list deployment operations for details. Please see 
https://aka.ms/arm-deployment-operations for usage details. (Code: DeploymentFailed)
 - {
  "status": "failed",
  "error": {
    "code": "ResourceDeploymentFailure",
    "message": "The resource write operation failed to complete successfully, because it reached terminal provisioning state 'failed'.",
    "details": [
      {
        "code": "Failed",
        "message": "Package deployment failed\r\nARM-MSDeploy Deploy Failed: 'Microsoft.Web.Deployment.DeploymentDetailedClientServerException: An 
error occurred during execution of the database script. The error occurred between the following lines of the script: \"1\" and \"8\". The verbose 
log might have more information about the error. The command started with the following:\r\n\"DECLARE @sqlCommand nvarchar(1000)=''\"\r\n ODBC error: 
State: 08001: Error: 258 Message:'[Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: Timeout error [258]. '.\r\nALTER DATABASE statement failed. 
http://go.microsoft.com/fwlink/?LinkId=178587  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_SQL_EXECUTION_FAILURE. ---&gt; 
System.Data.SqlClient.SqlException: ODBC error: State: 08001: Error: 258 Message:'[Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: Timeout 
error [258]. '.\r\nALTER DATABASE statement failed.\r\n   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean 
breakConnection, Action`1 wrapCloseInAction)\r\n   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean 
callerHasConnectionLock, Boolean asyncClose)\r\n   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, 
SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean&amp; dataReady)\r\n   at 
System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)\r\n   at 
System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, 
Boolean&amp; usedCache, Boolean asyncWrite, Boolean inRetry)\r\n   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()\r\n   at 
Microsoft.Web.Deployment.DBStatementInfo.Execute(DbConnection connection, DbTransaction transaction, DeploymentBaseContext baseContext, Int32 
timeout)\r\n   --- End of inner exception stack trace ---\r\n   at Microsoft.Web.Deployment.DBStatementInfo.Execute(DbConnection connection, 
DbTransaction transaction, DeploymentBaseContext baseContext, Int32 timeout)\r\n   at 
Microsoft.Web.Deployment.DBConnectionWrapper.ExecuteSql(DBStatementInfo sqlStatement, DeploymentBaseContext baseContext, Int32 timeout)\r\n   at 
Microsoft.Web.Deployment.SqlScriptToDBProvider.AddHelper(DeploymentObject source, Boolean whatIf)\r\n   at 
Microsoft.Web.Deployment.DeploymentObject.AddChild(DeploymentObject source, Int32 position, DeploymentSyncContext syncContext)\r\n   at 
Microsoft.Web.Deployment.DeploymentSyncContext.HandleAddChild(DeploymentObject destParent, DeploymentObject sourceObject, Int32 position)\r\n   at 
Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenOrder(DeploymentObject dest, DeploymentObject source)\r\n   at 
Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenOrder(DeploymentObject dest, DeploymentObject source)\r\n   at 
Microsoft.Web.Deployment.DeploymentSyncContext.ProcessSync(DeploymentObject destinationObject, DeploymentObject sourceObject)\r\n   at 
Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, 
ContentRootTable contentRootTable, Nullable`1 syncPassId, String syncSessionId)\r\n   at 
Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentSyncOptions 
syncOptions)\r\n   at Microsoft.Web.Deployment.WebApi.AppGalleryPackage.Deploy(String deploymentSite, String siteSlotId, Boolean doNotDelete) in 
C:\\__w\\1\\s\\src\\hosting\\wdeploy\\Microsoft.Web.Deployment.WebApi\\AppGalleryPackage.cs:line 343\r\n   at 
Microsoft.Web.Deployment.WebApi.DeploymentController.&lt;DownloadAndDeployPackage&gt;d__25.MoveNext() in 
C:\\__w\\1\\s\\src\\hosting\\wdeploy\\Microsoft.Web.Deployment.WebApi\\Controllers\\DeploymentController.cs:line 505'"
      }
    ]
  }
} (Code:Conflict)
CorrelationId: 9567582c-8a07-43dc-81c3-a316f63428a4
At F:\sitecore\azure\SAT250\tools\Sitecore.Cloud.Cmdlets.psm1:115 char:35
+ ... eployment = New-AzResourceGroupDeployment -Name $Name -ResourceGroupN ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [New-AzResourceGroupDeployment], Exception
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDeploymentCmdlet

more sql errors:

New-AzResourceGroupDeployment : 4:13:42 PM - The deployment 'sandstorm' failed with error(s). Showing 2 out of 2 error(s).
Status Message: At least one resource deployment operation failed. Please list deployment operations for details. Please see 
https://aka.ms/arm-deployment-operations for usage details. (Code: DeploymentFailed)
 - {
  "status": "failed",
  "error": {
    "code": "ResourceDeploymentFailure",
    "message": "The resource write operation failed to complete successfully, because it reached terminal provisioning state 'failed'.",
    "details": [
      {
        "code": "Failed",
        "message": ".Net SqlClient Data Provider: Msg 22115, Level 16, State 1, Line 5 Change tracking is enabled for one or more tables in database 
'sandstorm-shard0-db'. Disable change tracking on each table before disabling it for the database. Use the sys.change_tracking_tables catalog view to 
obtain a list of tables for which change tracking is enabled.\r\n.Net SqlClient Data Provider: Msg 22115, Level 16, State 1, Line 5 Change tracking 
is enabled for one or more tables in database 'sandstorm-shard0-db'. Disable change tracking on each table before disabling it for the database. Use 
the sys.change_tracking_tables catalog view to obtain a list of tables for which change tracking is enabled.\r\nScript execution error.  The executed 
script:\r\nIF EXISTS (SELECT 1\r\n           FROM   [sys].[databases]\r\n           WHERE  [name] = N'$(DatabaseName)')\r\n    BEGIN\r\n        ALTER 
DATABASE [$(DatabaseName)]\r\n            SET CHANGE_TRACKING = OFF \r\n            WITH ROLLBACK IMMEDIATE;\r\n    END\r\n\r\n\r\nScript execution 
error.  The executed script:\r\nIF EXISTS (SELECT 1\r\n           FROM   [sys].[databases]\r\n           WHERE  [name] = N'$(DatabaseName)')\r\n    
BEGIN\r\n        ALTER DATABASE [$(DatabaseName)]\r\n            SET CHANGE_TRACKING = OFF \r\n            WITH ROLLBACK IMMEDIATE;\r\n    
END\r\n\r\n\r\n.Net SqlClient Data Provider: Msg 5069, Level 16, State 1, Line 5 ALTER DATABASE statement failed.\r\n.Net SqlClient Data Provider: 
Msg 5069, Level 16, State 1, Line 5 ALTER DATABASE statement failed.\r\nScript execution error.  The executed script:\r\nIF EXISTS (SELECT 1\r\n      
     FROM   [sys].[databases]\r\n           WHERE  [name] = N'$(DatabaseName)')\r\n    BEGIN\r\n        ALTER DATABASE [$(DatabaseName)]\r\n          
  SET CHANGE_TRACKING = OFF \r\n            WITH ROLLBACK IMMEDIATE;\r\n    END\r\n\r\n\r\nScript execution error.  The executed script:\r\nIF EXISTS 
(SELECT 1\r\n           FROM   [sys].[databases]\r\n           WHERE  [name] = N'$(DatabaseName)')\r\n    BEGIN\r\n        ALTER DATABASE 
[$(DatabaseName)]\r\n            SET CHANGE_TRACKING = OFF \r\n            WITH ROLLBACK IMMEDIATE;\r\n    END\r\n\r\n\r\nPackage deployment 
failed\r\nARM-MSDeploy Deploy Failed: 'Microsoft.Web.Deployment.DeploymentDetailedClientServerException: Could not deploy package.\r\nWarning 
SQL72030: If this deployment is executed, changes to [xdb_collection].[ContactFacets] might introduce run-time errors in 
[xdb_collection].[GetContactFacetsChanges].\r\nWarning SQL72030: If this deployment is executed, changes to [xdb_collection].[Contacts] might 
introduce run-time errors in [xdb_collection].[GetContactsChanges].\r\nWarning SQL72030: If this deployment is executed, changes to 
[xdb_collection].[InteractionFacets] might introduce run-time errors in [xdb_collection].[GetInteractionFacetsChanges].\r\nWarning SQL72030: If this 
deployment is executed, changes to [xdb_collection].[Interactions] might introduce run-time errors in 
[xdb_collection].[GetInteractionsChanges].\r\nError SQL72014: .Net SqlClient Data Provider: Msg 22115, Level 16, State 1, Line 5 Change tracking is 
enabled for one or more tables in database 'sandstorm-shard0-db'. Disable change tracking on each table before disabling it for the database. Use the 
sys.change_tracking_tables catalog view to obtain a list of tables for which change tracking is enabled.\r\nError SQL72045: Script execution error.  
The executed script:\r\nIF EXISTS (SELECT 1\r\n           FROM   [sys].[databases]\r\n           WHERE  [name] = N'$(DatabaseName)')\r\n    BEGIN\r\n 
       ALTER DATABASE [$(DatabaseName)]\r\n            SET CHANGE_TRACKING = OFF \r\n            WITH ROLLBACK IMMEDIATE;\r\n    END\r\n\r\n\r\nError 
SQL72014: .Net SqlClient Data Provider: Msg 5069, Level 16, State 1, Line 5 ALTER DATABASE statement failed.\r\nError SQL72045: Script execution 
error.  The executed script:\r\nIF EXISTS (SELECT 1\r\n           FROM   [sys].[databases]\r\n           WHERE  [name] = N'$(DatabaseName)')\r\n    
BEGIN\r\n        ALTER DATABASE [$(DatabaseName)]\r\n            SET CHANGE_TRACKING = OFF \r\n            WITH ROLLBACK IMMEDIATE;\r\n    
END\r\n\r\n\r\n\r\n  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXECUTING_METHOD. ---&gt; 
Microsoft.SqlServer.Dac.DacServicesException: Could not deploy package.\r\nWarning SQL72030: If this deployment is executed, changes to 
[xdb_collection].[ContactFacets] might introduce run-time errors in [xdb_collection].[GetContactFacetsChanges].\r\nWarning SQL72030: If this 
deployment is executed, changes to [xdb_collection].[Contacts] might introduce run-time errors in [xdb_collection].[GetContactsChanges].\r\nWarning 
SQL72030: If this deployment is executed, changes to [xdb_collection].[InteractionFacets] might introduce run-time errors in 
[xdb_collection].[GetInteractionFacetsChanges].\r\nWarning SQL72030: If this deployment is executed, changes to [xdb_collection].[Interactions] might 
introduce run-time errors in [xdb_collection].[GetInteractionsChanges].\r\nError SQL72014: .Net SqlClient Data Provider: Msg 22115, Level 16, State 
1, Line 5 Change tracking is enabled for one or more tables in database 'sandstorm-shard0-db'. Disable change tracking on each table before disabling 
it for the database. Use the sys.change_tracking_tables catalog view to obtain a list of tables for which change tracking is enabled.\r\nError 
SQL72045: Script execution error.  The executed script:\r\nIF EXISTS (SELECT 1\r\n           FROM   [sys].[databases]\r\n           WHERE  [name] = 
N'$(DatabaseName)')\r\n    BEGIN\r\n        ALTER DATABASE [$(DatabaseName)]\r\n            SET CHANGE_TRACKING = OFF \r\n            WITH ROLLBACK 
IMMEDIATE;\r\n    END\r\n\r\n\r\nError SQL72014: .Net SqlClient Data Provider: Msg 5069, Level 16, State 1, Line 5 ALTER DATABASE statement 
failed.\r\nError SQL72045: Script execution error.  The executed script:\r\nIF EXISTS (SELECT 1\r\n           FROM   [sys].[databases]\r\n           
WHERE  [name] = N'$(DatabaseName)')\r\n    BEGIN\r\n        ALTER DATABASE [$(DatabaseName)]\r\n            SET CHANGE_TRACKING = OFF \r\n            
WITH ROLLBACK IMMEDIATE;\r\n    END\r\n\r\n\r\n\r\n   at Microsoft.SqlServer.Dac.DeployOperation.ThrowIfErrorManagerHasErrors()\r\n   at 
Microsoft.SqlServer.Dac.DeployOperation.&lt;&gt;c__DisplayClass14.&lt;&gt;c__DisplayClass16.&lt;CreatePlanExecutionOperation&gt;b__13()\r\n   at 
Microsoft.Data.Tools.Schema.Sql.Dac.OperationLogger.Capture(Action action)\r\n   at 
Microsoft.SqlServer.Dac.DeployOperation.&lt;&gt;c__DisplayClass14.&lt;CreatePlanExecutionOperation&gt;b__12(Object operation, CancellationToken 
token)\r\n   at Microsoft.SqlServer.Dac.Operation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)\r\n   at 
Microsoft.SqlServer.Dac.ReportMessageOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)\r\n   at 
Microsoft.SqlServer.Dac.DeployOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)\r\n   at 
Microsoft.SqlServer.Dac.OperationExtension.Execute(IOperation operation, DacLoggingContext loggingContext, CancellationToken cancellationToken)\r\n   
at Microsoft.SqlServer.Dac.DacServices.InternalDeploy(IPackageSource packageSource, Boolean isDacpac, String targetDatabaseName, DacDeployOptions 
options, CancellationToken cancellationToken, DacLoggingContext loggingContext, Action`3 reportPlanOperation, Boolean executePlan)\r\n   at 
Microsoft.SqlServer.Dac.DacServices.Deploy(DacPackage package, String targetDatabaseName, Boolean upgradeExisting, DacDeployOptions options, 
Nullable`1 cancellationToken)\r\n   --- End of inner exception stack trace ---\r\n   at 
Microsoft.Web.Deployment.SqlReflectionHelper.ExecuteFunction(Object targetObject, String methodName, Object[] argArray)\r\n   at 
Microsoft.Web.Deployment.DacServices.ProcessDacpac(Stream packageStream, DacPacAction action)\r\n   at 
Microsoft.Web.Deployment.SqlDacPacProvider.Add(DeploymentObject source, Boolean whatIf)\r\n   at 
Microsoft.Web.Deployment.DeploymentObject.Add(DeploymentObject source, DeploymentSyncContext syncContext)\r\n   at 
Microsoft.Web.Deployment.DeploymentSyncContext.HandleAdd(DeploymentObject destObject, DeploymentObject sourceObject)\r\n   at 
Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildren(DeploymentObject dest, DeploymentObject source)\r\n   at 
Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenOrder(DeploymentObject dest, DeploymentObject source)\r\n   at 
Microsoft.Web.Deployment.DeploymentSyncContext.ProcessSync(DeploymentObject destinationObject, DeploymentObject sourceObject)\r\n   at 
Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, 
ContentRootTable contentRootTable, Nullable`1 syncPassId, String syncSessionId)\r\n   at 
Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentSyncOptions 
syncOptions)\r\n   at Microsoft.Web.Deployment.WebApi.AppGalleryPackage.Deploy(String deploymentSite, String siteSlotId, Boolean doNotDelete) in 
C:\\__w\\1\\s\\src\\hosting\\wdeploy\\Microsoft.Web.Deployment.WebApi\\AppGalleryPackage.cs:line 343\r\n   at 
Microsoft.Web.Deployment.WebApi.DeploymentController.&lt;DownloadAndDeployPackage&gt;d__25.MoveNext() in 
C:\\__w\\1\\s\\src\\hosting\\wdeploy\\Microsoft.Web.Deployment.WebApi\\Controllers\\DeploymentController.cs:line 495'"
      }
    ]
  }
} (Code:Conflict)
Status Message: At least one resource deployment operation failed. Please list deployment operations for details. Please see 
https://aka.ms/arm-deployment-operations for usage details. (Code: DeploymentFailed)
 - {
  "status": "Failed",
  "error": {
    "code": "ResourceDeploymentFailure",
    "message": "The resource write operation failed to complete successfully, because it reached terminal provisioning state 'Failed'.",
    "details": [
      {
        "code": "DeploymentFailed",
        "message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see 
https://aka.ms/arm-deployment-operations for usage details.",
        "details": [
          {
            "code": "Conflict",
            "message": "{\r\n  \"status\": \"failed\",\r\n  \"error\": {\r\n    \"code\": \"ResourceDeploymentFailure\",\r\n    \"message\": \"The 
resource write operation failed to complete successfully, because it reached terminal provisioning state 'failed'.\",\r\n    \"details\": [\r\n      
{\r\n        \"code\": \"Failed\",\r\n        \"message\": \".Net SqlClient Data Provider: Msg 22115, Level 16, State 1, Line 5 Change tracking is 
enabled for one or more tables in database 'sandstorm-shard0-db'. Disable change tracking on each table before disabling it for the database. Use the 
sys.change_tracking_tables catalog view to obtain a list of tables for which change tracking is enabled.\\r\\n.Net SqlClient Data Provider: Msg 
22115, Level 16, State 1, Line 5 Change tracking is enabled for one or more tables in database 'sandstorm-shard0-db'. Disable change tracking on each 
table before disabling it for the database. Use the sys.change_tracking_tables catalog view to obtain a list of tables for which change tracking is 
enabled.\\r\\nScript execution error.  The executed script:\\r\\nIF EXISTS (SELECT 1\\r\\n           FROM   [sys].[databases]\\r\\n           WHERE  
[name] = N'$(DatabaseName)')\\r\\n    BEGIN\\r\\n        ALTER DATABASE [$(DatabaseName)]\\r\\n            SET CHANGE_TRACKING = OFF \\r\\n           
 WITH ROLLBACK IMMEDIATE;\\r\\n    END\\r\\n\\r\\n\\r\\nScript execution error.  The executed script:\\r\\nIF EXISTS (SELECT 1\\r\\n           FROM   
[sys].[databases]\\r\\n           WHERE  [name] = N'$(DatabaseName)')\\r\\n    BEGIN\\r\\n        ALTER DATABASE [$(DatabaseName)]\\r\\n            
SET CHANGE_TRACKING = OFF \\r\\n            WITH ROLLBACK IMMEDIATE;\\r\\n    END\\r\\n\\r\\n\\r\\n.Net SqlClient Data Provider: Msg 5069, Level 16, 
State 1, Line 5 ALTER DATABASE statement failed.\\r\\n.Net SqlClient Data Provider: Msg 5069, Level 16, State 1, Line 5 ALTER DATABASE statement 
failed.\\r\\nScript execution error.  The executed script:\\r\\nIF EXISTS (SELECT 1\\r\\n           FROM   [sys].[databases]\\r\\n           WHERE  
[name] = N'$(DatabaseName)')\\r\\n    BEGIN\\r\\n        ALTER DATABASE [$(DatabaseName)]\\r\\n            SET CHANGE_TRACKING = OFF \\r\\n           
 WITH ROLLBACK IMMEDIATE;\\r\\n    END\\r\\n\\r\\n\\r\\nScript execution error.  The executed script:\\r\\nIF EXISTS (SELECT 1\\r\\n           FROM   
[sys].[databases]\\r\\n           WHERE  [name] = N'$(DatabaseName)')\\r\\n    BEGIN\\r\\n        ALTER DATABASE [$(DatabaseName)]\\r\\n            
SET CHANGE_TRACKING = OFF \\r\\n            WITH ROLLBACK IMMEDIATE;\\r\\n    END\\r\\n\\r\\n\\r\\nPackage deployment failed\\r\\nARM-MSDeploy Deploy 
Failed: 'Microsoft.Web.Deployment.DeploymentDetailedClientServerException: Could not deploy package.\\r\\nWarning SQL72030: If this deployment is 
executed, changes to [xdb_collection].[ContactFacets] might introduce run-time errors in [xdb_collection].[GetContactFacetsChanges].\\r\\nWarning 
SQL72030: If this deployment is executed, changes to [xdb_collection].[Contacts] might introduce run-time errors in 
[xdb_collection].[GetContactsChanges].\\r\\nWarning SQL72030: If this deployment is executed, changes to [xdb_collection].[InteractionFacets] might 
introduce run-time errors in [xdb_collection].[GetInteractionFacetsChanges].\\r\\nWarning SQL72030: If this deployment is executed, changes to 
[xdb_collection].[Interactions] might introduce run-time errors in [xdb_collection].[GetInteractionsChanges].\\r\\nError SQL72014: .Net SqlClient 
Data Provider: Msg 22115, Level 16, State 1, Line 5 Change tracking is enabled for one or more tables in database 'sandstorm-shard0-db'. Disable 
change tracking on each table before disabling it for the database. Use the sys.change_tracking_tables catalog view to obtain a list of tables for 
which change tracking is enabled.\\r\\nError SQL72045: Script execution error.  The executed script:\\r\\nIF EXISTS (SELECT 1\\r\\n           FROM   
[sys].[databases]\\r\\n           WHERE  [name] = N'$(DatabaseName)')\\r\\n    BEGIN\\r\\n        ALTER DATABASE [$(DatabaseName)]\\r\\n            
SET CHANGE_TRACKING = OFF \\r\\n            WITH ROLLBACK IMMEDIATE;\\r\\n    END\\r\\n\\r\\n\\r\\nError SQL72014: .Net SqlClient Data Provider: Msg 
5069, Level 16, State 1, Line 5 ALTER DATABASE statement failed.\\r\\nError SQL72045: Script execution error.  The executed script:\\r\\nIF EXISTS 
(SELECT 1\\r\\n           FROM   [sys].[databases]\\r\\n           WHERE  [name] = N'$(DatabaseName)')\\r\\n    BEGIN\\r\\n        ALTER DATABASE 
[$(DatabaseName)]\\r\\n            SET CHANGE_TRACKING = OFF \\r\\n            WITH ROLLBACK IMMEDIATE;\\r\\n    END\\r\\n\\r\\n\\r\\n\\r\\n  Learn 
more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXECUTING_METHOD. ---&gt; Microsoft.SqlServer.Dac.DacServicesException: Could not deploy 
package.\\r\\nWarning SQL72030: If this deployment is executed, changes to [xdb_collection].[ContactFacets] might introduce run-time errors in 
[xdb_collection].[GetContactFacetsChanges].\\r\\nWarning SQL72030: If this deployment is executed, changes to [xdb_collection].[Contacts] might 
introduce run-time errors in [xdb_collection].[GetContactsChanges].\\r\\nWarning SQL72030: If this deployment is executed, changes to 
[xdb_collection].[InteractionFacets] might introduce run-time errors in [xdb_collection].[GetInteractionFacetsChanges].\\r\\nWarning SQL72030: If 
this deployment is executed, changes to [xdb_collection].[Interactions] might introduce run-time errors in 
[xdb_collection].[GetInteractionsChanges].\\r\\nError SQL72014: .Net SqlClient Data Provider: Msg 22115, Level 16, State 1, Line 5 Change tracking is 
enabled for one or more tables in database 'sandstorm-shard0-db'. Disable change tracking on each table before disabling it for the database. Use the 
sys.change_tracking_tables catalog view to obtain a list of tables for which change tracking is enabled.\\r\\nError SQL72045: Script execution error. 
 The executed script:\\r\\nIF EXISTS (SELECT 1\\r\\n           FROM   [sys].[databases]\\r\\n           WHERE  [name] = N'$(DatabaseName)')\\r\\n    
BEGIN\\r\\n        ALTER DATABASE [$(DatabaseName)]\\r\\n            SET CHANGE_TRACKING = OFF \\r\\n            WITH ROLLBACK IMMEDIATE;\\r\\n    
END\\r\\n\\r\\n\\r\\nError SQL72014: .Net SqlClient Data Provider: Msg 5069, Level 16, State 1, Line 5 ALTER DATABASE statement failed.\\r\\nError 
SQL72045: Script execution error.  The executed script:\\r\\nIF EXISTS (SELECT 1\\r\\n           FROM   [sys].[databases]\\r\\n           WHERE  
[name] = N'$(DatabaseName)')\\r\\n    BEGIN\\r\\n        ALTER DATABASE [$(DatabaseName)]\\r\\n            SET CHANGE_TRACKING = OFF \\r\\n           
 WITH ROLLBACK IMMEDIATE;\\r\\n    END\\r\\n\\r\\n\\r\\n\\r\\n   at Microsoft.SqlServer.Dac.DeployOperation.ThrowIfErrorManagerHasErrors()\\r\\n   at 

 
1
  • sql timeout issue gone after re-run... but got different sql error - see post edits
    – John
    Oct 12, 2023 at 16:16

2 Answers 2

1

I see a potential issue with your $SCTemplates parameter value, You need to change the template path to pass a valid template path. Follow below sptes to get the correct template path.

  1. Go to Sitecore 9.3 XPSingle github link and click on azuredeploy.parameters.json (here)

enter image description here

  1. Click on the Raw button.

enter image description here

  1. Copy the full url and set $SCTemplates="https://raw.githubusercontent.com/Sitecore/Sitecore-Azure-Quickstart-Templates/master/Sitecore%209.3.0/XPSingle"

enter image description here

Also, If you downloaded the Sitecore Azure Toolkit as a .ZIP and unzip it, the individual files will be marked as blocked files. if they are all blocked your Powershell script won't work.

Before unzipping, right click the zip file, go to security and select the Unblock button on the .ZIP file, then extract.

Reference: https://navansitecorenotes.blogspot.com/2020/08/sitecore-xp-10-xm0-deployment-using-sat.html

Script reference: https://raw.githubusercontent.com/navancommits/sitecore10/master/xm0%20dep%20ps%20script.ps1

Hope it helps!

4
  • Thank you very much! adding the raw in the url helped passing the template validation error. now I am facing different type of error - certificate loading error
    – John
    Oct 12, 2023 at 14:58
  • Check the reference link it there is a way for certification generation solution for other related errors in the link. Oct 12, 2023 at 15:10
  • generated self-signed cert and now got sql server timeout error :)
    – John
    Oct 12, 2023 at 15:57
  • I'd say you should create a new question and share all the necessary details there so community members can help you. Also, mark this answer accepted as it resolves the issue. Oct 12, 2023 at 16:13
0

The original issue was solved by Sumit's suggestion by adding the raw to my template url.

the certificate error is addressed by using a self-signed certificate instead of a commercial wildcard certificate.

sql errors now in this question: SQL execution errors while deploying Sitecore 9.3 to Azure app service

1
  • 1
    This answer may better be appended to your original question instead of being posted as an answer. You can create a new heading titled "EDIT". Oct 12, 2023 at 19:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.