dbops icon indicating copy to clipboard operation
dbops copied to clipboard

Unable to connect to Azure Synapse Analytics Dedicated SQL Pool using dbops.

Open DesaCh01 opened this issue 3 years ago • 3 comments

While trying to connect to Azure Synapse Analytics dedicated SQL Pool via dbops, I encountered the following errors;

Login failed for user '*'

But, with the same credentials, I was able to login into the SQL pool via SSMS.

DesaCh01 avatar Apr 19 '22 09:04 DesaCh01

Are you using native SQL Login credentials or Azure Active Directory credentials? Please show the command you're using (with an extra -Debug switch) and full output. I don't have access to Azure Synapse Analytics to test your configuration, but, to simplify things, you should be able to run Invoke-DBOQuery instead of whatever you're running.

nvarscar avatar Apr 21 '22 20:04 nvarscar

Hi @nvarscar ,

Thanks for your help. Apologies for the late reply.

I'm using native SQL login credentials stored as Github secrets. The command that I'm using is as follows:

$SecurePw=ConvertTo-SecureString ${{ secrets.SYNAPSE_PASSWORD }} –asplaintext –force

Install-DBOScript -ScriptPath scripts -sqlinstance ${{ secrets.SYNAPSE_INSTANCE_DEV }} -Database ${{ secrets.SYNAPSE_DATABASE }} -UserName ${{ secrets.SYNAPSE_USERNAME }} -Password $SecurePw -SchemaVersionTable $null -Debug

Also, I'm attaching the log output for this. logs_309.zip

DesaCh01 avatar May 06 '22 08:05 DesaCh01

In your logs, the error looks like this:

System.Data.SqlClient.SqlException (0x80131904): Login failed for user '***'.

this seems to be an authentication issue rather than a driver problem. Your command was:

Install-DBOScript -ScriptPath scripts -sqlinstance *** -Database *** -UserName *** *** -SchemaVersionTable $null -Debug

Not sure if that's the problem but I don't see a -Password parameter.

nvarscar avatar Jun 03 '22 21:06 nvarscar