title: How to connect from Azure function app to my SQL Server?
body: <p>So when some event goes to event hub it triggers Azure <strong>Function App</strong>, which should now connect to my SQL Server on virtual machine Windows Server 2012 and do some command there.</p>
  
  <p>My VM is online and has password, my SQL Server instance has no password.</p>
  
  <p>How do I create right connection string for connecting to this instance and be able to execute commands?</p>
  
  <p><strong>Note 1</strong></p>
  
  <p>All resources are on the same Azure Subscription</p>
  
  <p><strong>Note 2</strong></p>
  
  <p>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(<a href="https://www.connectionstrings.com/sql-server/" rel="nofollow noreferrer">https://www.connectionstrings.com/sql-server/</a>):</p>
  
  <p>Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;</p>
  
  <p>Still can't connect</p>