简体   繁体   中英

Access SQL Server on Azure VM via SQL Server Management Studio on my local Machine

I'm sure this is out there somewhere but I can't find it and my brain hurts.

I have a VM on Azure. It has SQL Server running on it. I can access it locally on the VM no problem but I would like to manage it from my dev computer via SQL Server Management Studio.

Is this possible and what creds would I use? the VM Login?

Thanks, R

You need to complete all of the following to achieve what you want:

  • Add a TCP endpoint for that VM on port 1433 - public & private (you can change the public port if you will).
  • Configure the SQL Server Instance to listen to TCP.
  • Enable the incomping TCP port 1433 in the local FireWall rules of the VM.
  • Enable mixed mode authentication on the SQL Server
  • Make sure your ISP does not block outgoing port 1433 (a common practice for most of ISVs since 2003' SQL Slammer ) - this is overridable with custom Public port for your TCP endpoint.

Than you will be able to connect to the SQL Server in the Azure VM using your local SSMS.

Faced this issue with Azure VM, I can't connect to SQL server. Completed all steps described in answer above but didn't get success..

It started to work when I set specific port for TCP/IP protocol.

So open SQL Server Configuration Manager, find TCP/IP protocol for your instance, open Properties and set port to 1433 in IPAll section.

I had the same problem, what I should change was: click on the VM in AzurePortal --> SQL Server configuration --> Change SQL Connectivity to public

then it works for me!

Instead of SSMS you can also use Powershell to check connectivity with SQL server on Azure VM. The detailed powershell script is at the following link -

http://sanganakauthority.blogspot.in/2014/02/connecting-to-sql-server-virtual.html

This saves you from the installation of SSMS on the machine from which you wih to connect to SQL server virtual machine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM