So when some event goes to event hub it triggers Azure Function App, which should now connect to my SQL Server on virtual machine Windows Server 2012 and do some command there.
My VM is online and has password, my SQL Server instance has no password.
How do I create right connection string for connecting to this instance and be able to execute commands?
Note 1
All resources are on the same Azure Subscription
Note 2
I have IP address of virtual machine, I made login user so I have username and password to login on SQL Server instance, I tried using this format of connection string(https://www.connectionstrings.com/sql-server/):
Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;
Still can't connect
Another option is that you use VNET integration in the Function App, though I am unaware how it works in Functions. Then you could use the private IP address, and by default only the VM firewall could block you.
Your connection string looks correct, the only thing that it is missing is the SQL Server instance name, but it will work if you are using the default name.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With