1

Hi all I'm getting the following error while installing Sitecore Experience commerce on Sitecore 9 Update 1:

Initializing deployment (Failed)
System.Management.Automation.MethodInvocationException: Exception calling      "Deploy" with "3" argument(s): "Could not deploy package." --->   Microsoft.SqlServer.Dac.DacServicesException: Could not deploy package. --->  Microsoft.Data.Tools.Schema.Sql.Deployment.DeploymentFailedException: Unable to connect to master or target server 'SitecoreCommerce9_Global'. You must have a user with the same password in master or target server 'SitecoreCommerce9_Global'.
at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeploymentEndpointServer.OnInit(ErrorManager errors, String targetDBName)
 at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeployment..ctor(SqlDeploymentConstructor constructor)
at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeploymentConstructor.ConstructServiceImplementation()
at Microsoft.SqlServer.Dac.DacServices.CreatePackageToDatabaseDeployment(SqlConnectionFactory connectionFactory, IPackageSource packageSource, String targetDatabaseName, DacDeployOptions options, ErrorManager errorManager)
at Microsoft.SqlServer.Dac.DeployOperation.<>c__DisplayClass3.<>c__DisplayClass5.<CreatePlanInitializationOperation>b__1()
at Microsoft.Data.Tools.Schema.Sql.Dac.OperationLogger.Capture(Action action)
at Microsoft.SqlServer.Dac.DeployOperation.<>c__DisplayClass3.<CreatePlanInitializationOperation>b__0(Object operation, CancellationToken token)
at Microsoft.SqlServer.Dac.Operation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
at Microsoft.SqlServer.Dac.ReportMessageOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
at Microsoft.SqlServer.Dac.OperationExtension.CompositeOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
at Microsoft.SqlServer.Dac.OperationExtension.CompositeOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
at Microsoft.SqlServer.Dac.DeployOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
--- End of inner exception stack trace ---
at Microsoft.SqlServer.Dac.DeployOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
at Microsoft.SqlServer.Dac.OperationExtension.Execute(IOperation operation, DacLoggingContext loggingContext, CancellationToken cancellationToken)
at Microsoft.SqlServer.Dac.DacServices.InternalDeploy(IPackageSource packageSource, Boolean isDacpac, String targetDatabaseName, DacDeployOptions options, CancellationToken cancellationToken, DacLoggingContext loggingContext, Action`3 reportPlanOperation, Boolean executePlan)
at Microsoft.SqlServer.Dac.DacServices.Deploy(DacPackage package, String targetDatabaseName, Boolean upgradeExisting, DacDeployOptions options, Nullable`1 cancellationToken)
at CallSite.Target(Closure , CallSite , Object , Object , Object , Boolean )
--- End of inner exception stack trace ---
at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
at System.Management.Automation.PSScriptCmdlet.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess)
at System.Management.Automation.PSScriptCmdlet.DoEndProcessing()
at System.Management.Automation.CommandProcessorBase.Complete()
Invoke-DeployCommerceDatabaseTask : Exception calling "Deploy" with "3" argument(s): "Could not deploy package."
At C:\Program
Files\WindowsPowerShell\Modules\SitecoreInstallFramework\1.1.0\Public\Install-SitecoreConfiguration.ps1:253 char:21
+                     & $entry.Task.Command @paramSet | Out-Default
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-DeployCommerceDatabaseTask
  • Error telling you, Unable to connect to master or target server 'SitecoreCommerce9_Global'. You must have a user with the same password in master or target server 'SitecoreCommerce9_Global'. Have you checked your server whether they met this requirement. – Foysal Mar 16 '18 at 12:55
  • The exception is related to DB deployments. Apart from the one @enthusiast suggested, there are couple of other possible reasons of this error like if your client computer fails to pass the firewall rules for the server or if your SSDT is not up to date etc.Please have a look at the solutions at the URLs below: blogs.msdn.microsoft.com/azuresqldbsupport/2017/09/19/… OR community.sitecore.net/developers/f/6/t/3532 – Amitabh Vyas Mar 16 '18 at 13:26
1

The exception is related to DB deployments. Apart from the one @enthusiast suggested in comments, there are couple of other possible reasons of this error like:

  1. Make sure SQL Server is running
  2. Use the correct SQL Server connection name
  3. Double-check SQL Server username/password
  4. SQL Server user needs correct server role
  5. Enable Mixed Mode Authenication
  6. If your client computer fails to pass the firewall rules for the server
  7. If your SSDT is not up to date

Please have a look at the solutions at the URLs below:

https://www.sitecorespark.com/blog/2017/11/sitecore-installation-framework-error-processing-pools

OR

https://blogs.msdn.microsoft.com/azuresqldbsupport/2017/09/19/deployment-fails-with-unable-to-connect-to-master-or-target-server-mydb_svr-you-must-have-a-user-with-the-same-password-in-master-or-target-server-mydb-db/

OR

https://community.sitecore.net/developers/f/6/t/3532

| improve this answer | |
  • In my case, I had to lower the compatibility level of my SQL Azure databases in order to get the package deployed. The dacpac files we were restoring were created with comp. level 140. SQL Azure upgraded to 150 for new databases, which broke the deployment. Also in this case, the solution is to upgrade your SSDT/dacpac file to a latest version. – Jan_V Jan 10 at 15:29
0

I got this error while installing the sitecore commerce with scaled scripts from https://github.com/CommerceMinion/Sitecore-Commerce-v902-Scaled-Installation

The reason was powershell script was communicating with SQL server with out user id and password.adding the user id and password to the connection string in https://github.com/CommerceMinion/Sitecore-Commerce-v902-Scaled-Installation/blob/master/Modules/DeployCommerceDatabase/DeployCommerceDatabase.psm1(line 38) fixed the issue.

So to fix this issue,i changed $connectionString = "Server=" + $CommerceServicesDbServer + ";Trusted_Connection=Yes;"

to
$connectionString = "Server=" + $CommerceServicesDbServer + ";user name="un";password="pw""

| improve this answer | |

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.