title: Logging data from on-premises SQL Server to Azure App Insights
body: <p><strong>Question</strong>: Data stored/generated in on-premises SQL server needs to be logged to app insights. This data represents both the <em>temporary</em> data that is passed to stored procedures and also <em>concrete</em> data that is stored in tables. I am asking this question to figure out if there is any direct way to do this. I have come up with the following options till now, in case there is no direct solution please let me know which is the most suited option for the task.</p>
  
  <p><strong>Options</strong>:</p>
  
  <ol>
  <li>Log that data into a temporary table and have a windows service/ azure web job that picks up that data in batches and does the logging.</li>
  <li>Use a SQL CLR stored procedure that logs the data directly to app insights using Azure App Insights DLL</li>
  <li>Use Azure Data Factory to export the data from on-premise SQL server to some Azure based storage and then to App Insights</li>
  </ol>