1

On my development machine, I had installed Sitecore 9.0.2 months ago and now, for POC purposes, I am trying to install the second instance of Sitecore 9.0.2. While doing that I am facing a strange issue, where-in SQL execution is failing whilst creating marketing automation DB. Here is complete stack trace (snippet from the SIF log file): How can it be solved?

> msdeploy.exe : Error Code: ERROR_SQL_EXECUTION_FAILURE At C:\Program
> Files\WindowsPowerShell\Modules\SitecoreInstallFramework\1.2.1\Public\Tasks\Invoke-CommandTask.ps1:31
> char:13
> +             & $Path $Arguments | Out-Default
> +             ~~~~~~~~~~~~~~~~~~
>     + CategoryInfo          : NotSpecified: (Error Code: ERROR_SQL_EXECUTION_FAILURE:String) [], RemoteException
>     + FullyQualifiedErrorId : NativeCommandError msdeploy.exe : Error Code: ERROR_SQL_EXECUTION_FAILURE At C:\Program
> Files\WindowsPowerShell\Modules\SitecoreInstallFramework\1.2.1\Public\Tasks\Invoke-CommandTask.ps1:31
> char:13
> +             & $Path $Arguments | Out-Default
> +             ~~~~~~~~~~~~~~~~~~
>     + CategoryInfo          : NotSpecified: (Error Code: ERROR_SQL_EXECUTION_FAILURE:String) [], RemoteException
>     + FullyQualifiedErrorId : NativeCommandError
> 
> More Information: An error occurred during execution of the database
> script. The error occurred between the following  lines of the script:
> "12" and "16". The verbose log might have more information about the
> error. The command started  with the following: More Information: An
> error occurred during execution of the database script. The error
> occurred between the following lines of the script: "12" and "16". The
> verbose log might have more information about the error. The command
> started with the following:
> 
> "EXEC sp_addrolemember 'db_datareader', [marketin"  Execution Timeout
> Expired.  The timeout period elapsed prior to completion of the
> operation or the server is not  responding.
> http://go.microsoft.com/fwlink/?LinkId=178587  Learn more at: 
> http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_SQL_EXECUTION_FAILURE.
> "EXEC sp_addrolemember 'db_datareader', [marketin"  Execution Timeout
> Expired.  The timeout period elapsed prior to completion of the
> operation or the server is not responding.
> http://go.microsoft.com/fwlink/?LinkId=178587  Learn more at:
> http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_SQL_EXECUTION_FAILURE.
> 
> Error: Execution Timeout Expired.  The timeout period elapsed prior to
> completion of the operation or the server is not  responding. Error:
> Execution Timeout Expired.  The timeout period elapsed prior to
> completion of the operation or the server is not responding.
> 
> Error: The wait operation timed out Error: The wait operation timed
> out
> 
> Error count: 1. Error count: 1.
> 
> ********************** Command start time: 20180918054113
> ********************** PS>TerminatingError(Invoke-CommandTask): "The running command stopped because the preference variable
> "ErrorActionPreference" or common parameter is set to Stop: Command
> C:\Program Files\iis\Microsoft Web Deploy V3\msdeploy.exe returned a
> non-zero exit code - (-1)"
> >> TerminatingError(Invoke-CommandTask): "The running command stopped because the preference variable "ErrorActionPreference" or common
> parameter is set to Stop: Command C:\Program Files\iis\Microsoft Web
> Deploy V3\msdeploy.exe returned a non-zero exit code - (-1)"
> >> TerminatingError(Invoke-CommandTask): "The running command stopped because the preference variable "ErrorActionPreference" or common
> parameter is set to Stop: Command C:\Program Files\iis\Microsoft Web
> Deploy V3\msdeploy.exe returned a non-zero exit code - (-1)"
> Install-SitecoreConfiguration : Command C:\Program Files\iis\Microsoft
> Web Deploy V3\msdeploy.exe returned a non-zero  exit code - (-1) At
> D:\Sitecore SCG\Sitecore91XP\install_sitecore.ps1:50 char:1
> + Install-SitecoreConfiguration @xconnectParams
> + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>     + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
>     + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration
> Install-SitecoreConfiguration : Command C:\Program Files\iis\Microsoft
> Web Deploy V3\msdeploy.exe returned a non-zero exit code - (-1) At
> D:\Sitecore SCG\Sitecore91XP\install_sitecore.ps1:50 char:1
> + Install-SitecoreConfiguration @xconnectParams
> + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>     + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
>     + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-SitecoreConfiguration
2

Thanks everyone for your pointers. The issue was occurring, because SIF was trying to create duplicate DB users.

I narrowed down the issue with SIF parameters configuration. It seems that SIF doesn't anticipate 2 Sitecore instances DBs over one SQL server and hence DB user names are hard coded.

SIF powershell scripts package comes with set of parameters - ranging from site names to Db users. SIF powershell script (named install_sitecore.ps1) allows to dynamically set some of the parameters, but most of parameters are hardcoded in the {SIF root folder}\sitecore-XP0.json file.

Refer the snippet below:

Hard coded DB user names

If you install second instances of the Sitecore 9.x over same SQL Server instances, it doesn't allow 2 DB users with same name and throw the ERROR_SQL_EXECUTION_FAILURE as mentioned above.

Hope it helps.

0

Please try unblocking the Microsoft.Web.XmlTransform.dll. Normally you get such kind of errors when you extract the SIF zip files without doing unblock before the extract.

enter image description here

I did got something same with error but with the unblock and re-execution everything worked fine.

0

I got similar error during installation of Sitecore 9.1. My previous installation attempts were unsuccessful due to other errors. While retrying the installation after fixing the earlier errors, I got similar error. I retried the installation by updating the value for Prefix to a new unique value in my XP0-SingleDeveloper.ps1 and the installation script ran successfully.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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