locked
desktop client connecting to Azure SQL VM RRS feed

  • Question

  • HI there,

    we are testing to see if Azure is a suitable step for us to centralise and host our application database.  We have installed SQL Express on a small VM, the VM is added to a VPN.  We have a connection to the database instance using SSMS, but cannot access from our application using the same details (both are on the same local machine connected via VPN).

    Any thoughts would be very helpful as I'm a little stuck and have spent hours searching for the blockage.  Since I can connect from SSMS I'm confused as to what might be stopping our application form connecting??

    Thanks,

    Tim


    Thank you for you time folks!

    Tuesday, March 10, 2015 9:04 PM

Answers

  • OK, So i'm sure this isn't the actual problem but - I ended up deleting and re-creating the Azure VPN Gateway as I figured it's the bit in the middle right ?!?! - By Jov' it worked!  I don't understand why, or how but it works now as expected.

    Thanks for the support to the guys that posted...


    Thank you for you time folks!

    • Marked as answer by Tim Windsor Tuesday, March 24, 2015 4:03 PM
    Tuesday, March 24, 2015 4:03 PM

All replies

  • Hi,

    Thank you for your post.

    Please have a check on the below link which refers to guidelines for connecting to Azure SQL Database.

    https://msdn.microsoft.com/en-us/library/azure/ee336282.aspx

    Regards,

    Mekh.

    Wednesday, March 11, 2015 9:56 AM
  • Thanks Mekh.  This is not a SQL Azure Database though.  It's a SQL Server instance installed on a VM. Let me know if I'm not understanding though!

    Thanks,

    Tim


    Thank you for you time folks!

    Wednesday, March 11, 2015 10:47 AM
  • Just to help expand on our problem.....

    Desktop management studio connects to 10.0.51.4\instancename when connected to Azure VM by Azure VPN

    Desktop udl file connects to 10.0.51.4\instancename + database when connected by Azure VPN

    our Desktop .net application just hangs on the connection.open and appears to completely ignore the timeout value too. ?????? 

    we have installed our application locally on the Azure VM, and connected successfully on 10.0.51.4\instancename .  I can see this is going to be painful - and I'm probably missing something very simple :-(


    Thank you for you time folks!

    Wednesday, March 11, 2015 12:40 PM
  • ok, so if I stop SQL server instance, then I instantly get a message from my app, which is stuck on the connection.open() command that the server isn't available. This explains the timeout value being ignored as it's clearly connecting to SQL Server\instance. But why is my app not receiving any response... is there a way to trace this???


    Thank you for you time folks!

    Wednesday, March 11, 2015 12:44 PM
  • Try each of these suggestions:

    - Are you able to ping the Virtual Machine?

    - Try making sure the SQL port is open in the firewall settings.

    - Do you have a valid login for the SQL Server instance on the VM.

    - Make sure the on-premises gateway allows for outgoing connections on the SQL port. If it does not, this may be why you cannot connect.
    - Try connecting to the directly to the IP of the VM in the Virtual Network. It may be a DNS server issue.

    Monday, March 16, 2015 10:31 PM
  • hi - i'm still working on this... am going to try the ideas today.  But I can confirm we don't have a DNS server, so everything we're doing here is with the IP address....

    Ping VM by IP - yes

    Firewall on both end (for Testing) is turned off completely

    Yes we have valid logins (when we run the software locally on the VM, we can successfully connect with the same credentials)

    We get stuck on the final point where it appears the IP address establishes a connection to the SQL Server (as I mentioned in previous post) .... 


    Thank you for you time folks!

    Wednesday, March 18, 2015 1:36 PM
  • OK, So i'm sure this isn't the actual problem but - I ended up deleting and re-creating the Azure VPN Gateway as I figured it's the bit in the middle right ?!?! - By Jov' it worked!  I don't understand why, or how but it works now as expected.

    Thanks for the support to the guys that posted...


    Thank you for you time folks!

    • Marked as answer by Tim Windsor Tuesday, March 24, 2015 4:03 PM
    Tuesday, March 24, 2015 4:03 PM