Connect to Sql Server of Windows Azure VM from local Sql Server - azure

I am trying to connect to my Sql server 2012 which is setup on Azure VM. I am trying to connect it from my local Sql server 2012. I have tried all these steps
http://azure.microsoft.com/en-us/documentation/articles/virtual-machines-provision-sql-server/
But still not able to connect. I getting this error
Can Some please help me to solve this problem?

Since you're connecting to cloudnet.app domain address I assume you don't use VPN. This means:
- SQL Server authentication should be set to mixed mode
- SQL login should be created or enabled
- In case enabling SA login make sure you set the password
For connectivity part I agree with Jason's suggestions, but I would not disable firewall, since with endpoints facing public internet it is your last line of defense on the VM. Just make sure you have allow rule for the SQL Server port (most likely 1433).

Confirm the following:
You have configured the cloud service port 57500 (from the screenshot) to forward to the port that SQL is configured on, typically 1433.
Turn off the firewall within the VM. Once you get a working connection, I would reconfigure the firewall to only open the port(s) you need for security. The instructions you provided show how to open a specific port, but you should first disable the firewall to rule out a misconfiguration there.
Remote into the VM and ensure that you're able to use the management tools on that machine to make a local connection. This will help rule firewalls and the load balancer for the cloud service.

Related

Can connect to one Azure DB but not another

Two years ago I created a SQL Server .database.windows.net and that works fine, I can connect through the azure portal and my local SSMS.
Today I created a new SQL Server .database.windows.net
But I can not connect through SSMS or even the Azure Portal
The azure portal gives the error
A connection to the server 'youtube-mb.database.windows.net' could not be established. This might indicate an issue with your local firewall configuration or your network proxy settings.
I know it complains about a firewall but I can't believe that is the issue is due to my local firewall since one server works and the other does not. And other on premise SQL Servers connect.
I also check
the password is correct (by resetting it)
the firewall configurations in azure are the same
Minimum TLS > 1.0
Connection Policy - Default
Allow Azure services and resources access to this server
My IP whitelisted
Not sure what else to look at, especially if Quick Query is not working in the portal itself.
The firewall rule is set at the server level, so you have to add an firewall rule exception for each Azure SQL Server instance you create to access it from your PC.

Allow remote web server administration of Azure server core VM

I am trying to configure a server code 2016 VM on Azure to allow access from IIS on a remote server (outside of Azure) - I have been following documentation from here and here.
When I try to connect to the Azure servercore server from IIS (File, Connect to a Server, provide server name/port and credentials), I am getting the following error:
"Could not connect to the specified computer.
Details: Unable to connect to the remote server"
I have added the firewall rule as noted in the steps I have been following with no success. I believe that this may be a security group issue, but web searching has drawn a blank - I have not been able to find anything on connecting IIS to a VM on Azure in order to allow web server administration.
Any help would be much appreciated, preferably in simple steps - I'm a programmer who has had a devops task dropped on him, and as such have minimal understanding of Azure's mechanics and terminology!
Thanks!
So the error was due to the misconfigured NSG. Need to open up port 8172.

End points option is not available in Azure Virtual Machine settings

I have created a virtual machine on Azure with windows server 2012 and I have hosted SQL server in that machine. Now I am unable to connect that sql server through internet so I verified few of the blogs on defining end point for sql server port.
I have followed setps provided in following post with no luck...
Access SQL Server on Azure VM via SQL Server Management Studio on my local Machine
When I look at my VM settings I did not find "end points" section and hence I am unable to connect to sql server from outside network.
So please help me to connect sql server via internet.
I have also tested inbound rules of my Network Security Group and it has sql server port defined in "Inbound Security Rules", please look at below image
I found a useful information in below post which explained about configuring VM to allow connection from public network.
https://azure.microsoft.com/en-in/documentation/articles/virtual-machines-windows-sql-connect/
And one more problem I noticed is "Configuring Sql Server with named instance", And connectivity problem got resolved after I configured SQL Server with default instance.
Thanks,
Vasu Ravuri.

connect to windows azure database from VS 2012 Express

I have been following this example
http://www.windowsazure.com/en-us/develop/net/tutorials/web-site-with-sql-database/
and I could not connect to windows azure database. It gives me the following error
"A network-related error occurred while establishing a connection to SQL Server. The server was not found or was not accessible."
I have the IP address set, and made a firewall role already.
Any ideas :(
First test whether your ISP (Internet Provider) or corporate system administrator is not blocking outgoing connections on port 1433! This is very common issue with accessing SQL Azure from own laptop/computer.
To test firewall setting just navigate to the web management portal for your SQL Azure Instance. It has a default address:
https://[your_server_name].database.windows.net/?langid=en-us
This will open web management (Silverlight) portal for your SQL Azure Server. You can use to test whether you have correctly configured Firewall Rules on the Azure side. If you have done so, you will be able to log-in from the browser. Note that even if it uses the browser the management portal still respects the Firewall rules for the SQL Azure database.
If cannot log-in from the SQL Azure management portal, then check again your real IP address and make sure it matches the firewall rules.
If you can login from the portal, but not from Visual Studio - then check with your system administrators (or Internet provider support line) whether they have blocked outgoing connections on port 1433. If this is the case you cannot do anything, but just work from the web portal.

How to: Connect to Windows Azure SQL Server Database Through Windows virtual machin

Hi guys,
i created sql server database in windows azure. after i integrate this database with my application its working fine.i want to move my application also windows azure virtual machine.i created required Environment(means install java and tomcat) for this.and also allow the ip address in azure sql server database also.but it showing
Connect open connection error
while connecting database.i also allow the port number in wirewall settings but still i am not able to connect database.
please give any suggestions.
From your question it is a little bit unclear which database you're using -
If you're using 'Windows Azure SQL Database' (i.e. the PaaS version), than you need to ensure that your server's firewall, through the Windows Azure Management Portal, is configured to allow Windows Azure Services and then, of course, you need to use the fully qualified name of the server when trying to connect (i.e. ABCD.database.windows.net)
If you have deployed SQL Server as a VM on IaaS you have two options - either define an endpoint for the VM to open port 1433 (or any other port mapped to 1433 for that matter) to the outside world and then use the cloud service's DNS entry to connect to the database or define a virtual network onto which you will deploy both your database VM and your application VM. if you do the latter you will be able to refer to the database using it's private IP.
this might be somewhat useful

Resources