powershell - Invoke-SqlCmd "Login failed for user" - Stack Overflow

I am trying to run a Powershell script off of a VM using Azure to automate a report coming from a SQL D

I am trying to run a Powershell script off of a VM using Azure to automate a report coming from a SQL DB. I am running it via a job in Logic Apps but when testing the current script I am getting a "Login failed for user" error despite both the username and password matching the account with permissions. I have been trying to find a cause in other documentation but have been unable to find an answer in similar threads. Below is the line that is failing on me.

$Data = Invoke-SqlCmd -ServerInstance $SqlServer -Database $SqlDatabase -Query $SqlQuery -Username $SqlUser -Password $SqlPass

All of these variables get passed as parameters on job run with the exception of $SqlPass which is pulling credentials from Azure Key Vault. Any guidance on how to validate that these are going through as expected would be appreciated!

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744237634a4564548.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信