[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
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
Jenkins
1) Tick "Trust Server Certificate" in Jenkins Sync Database Package tasks
Was this article helpful?
Articles in this section
- Method not found: 'System.Security.CodeAccessPermission'
- 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
- Could not install SqlChangeAutomation from any registered PSRepository
- System.Exception: No match was found for the specified search criteria and module name 'SQLChangeAutomation'. Try Get-PSRepository to see all available registered module repositories
- No match was found for the specified search criteria and module name 'SqlChangeAutomation'.
- Online index operations can only be performed in Enterprise edition of SQL Server
- Unable to resolve package source
- error 5(Access is denied.) while attempting to open or create the physical file
- SQL Change Automation Installation freezes at 99%
- SQL Change Automation Powershell permissions