Couldn't connect to the database specified by the Target parameter: A connection was successfully established with the server, but then an error occurred during the login process

[error] Couldn't connect to the database specified by the Target parameter: A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.)

Recommended solutions:

Azure DevOps

1. Fix the certificate trust issue on the Azure DevOps agent (if using RDS https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html)

2. Tick "Trust Server Certificate" in Azure DevOps Build or Release pipeline tasks

blobid1.png

3. Use a PowerShell task instead and use the SCA PS cmdlets directly: you will be able to add Trust Server Certificate=True to the connection strings this way): https://documentation.red-gate.com/sca/reference/powershell-cmdlets/new-databaseconnection

$staging = New-DatabaseConnection -ServerInstance "exampleServer\ExampleDB" -Database "Staging" -Username "AutomationUser" -Password "P@ssw0rd" -TrustServerCertificate true

Octopus Deploy

1. Fix your certificate validation issues
2. Edit the SQL Change Automation template so that it adds TrustServerCertificate=True

TeamCity

1) Tick "Trust Server Certificate" in TeamCity Build or Release pipeline tasks

mceclip0.png

Jenkins

1) Tick "Trust Server Certificate" in Jenkins Sync Database Package tasks

mceclip0.png

 

 

 

 

Was this article helpful?

1 out of 13 found this helpful
Have more questions? Submit a request