{"id":136,"date":"2015-11-10T00:00:00","date_gmt":"2013-01-01T00:00:00","guid":{"rendered":"https:\/\/www.sqlhammer.com\/blog\/connect-to-sql-server-on-azure-vm-via-local-ssms"},"modified":"2026-03-18T21:52:15","modified_gmt":"2026-03-18T21:52:15","slug":"connect-to-sql-server-on-azure-vm-via-local-ssms","status":"publish","type":"post","link":"https:\/\/sqlhammer.com\/index.php\/2015\/11\/10\/connect-to-sql-server-on-azure-vm-via-local-ssms\/","title":{"rendered":"Connect to SQL Server on Azure VM via Local SSMS &#8211; SQL Hammer"},"content":{"rendered":"<p>After you provision a Microsoft Azure VM with SQL Server there are a few more steps that you need to take to make remote connections. The procedure below starts with a fresh Azure VM provisioned and walks through the process of establishing a connection via SQL Server Management Studio, installed on an on-premises work station.<\/p>\n<h2>Create a new Azure TCP\/IP endpoint<\/h2>\n<p>Start by accessing the Azure portal and navigating to your new VM.<\/p>\n<p><a href=\"http:\/\/www.sqlhammer.com\/blog\/wp-content\/uploads\/2015\/11\/azure-tcp-endpoint-1.png\"><img decoding=\"async\" src=\"http:\/\/www.sqlhammer.com\/blog\/wp-content\/uploads\/2015\/11\/azure-tcp-endpoint-1.png\" alt=\"\" \/><\/a><\/p>\n<p>Drill into your VM, navigate to the ENDPOINTS tab, and click ADD to create a new endpoint.<\/p>\n<p><a href=\"http:\/\/www.sqlhammer.com\/blog\/wp-content\/uploads\/2015\/11\/azure-tcp-endpoint-2.png\"><img decoding=\"async\" src=\"http:\/\/www.sqlhammer.com\/blog\/wp-content\/uploads\/2015\/11\/azure-tcp-endpoint-2.png\" alt=\"\" \/><\/a><\/p>\n<p>A wizard will appear. Select ADD A STAND-ALONE ENDPOINT and click the right-arrow.<\/p>\n<p><a href=\"http:\/\/www.sqlhammer.com\/blog\/wp-content\/uploads\/2015\/11\/azure-tcp-endpoint-3.png\"><img decoding=\"async\" src=\"http:\/\/www.sqlhammer.com\/blog\/wp-content\/uploads\/2015\/11\/azure-tcp-endpoint-3.png\" alt=\"\" \/><\/a><\/p>\n<p>Use the drop-down box to select MSSQL and edit the ports, if you choose.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.sqlhammer.com\/blog\/wp-content\/uploads\/2015\/11\/azure-tcp-endpoint-4.png\" alt=\"\" \/><\/p>\n<p>Click the check mark to complete and then wait for the Azure portal to tell you that the endpoint has been created.<\/p>\n<p><a href=\"http:\/\/www.sqlhammer.com\/blog\/wp-content\/uploads\/2015\/11\/azure-tcp-endpoint-5.png\"><img decoding=\"async\" src=\"http:\/\/www.sqlhammer.com\/blog\/wp-content\/uploads\/2015\/11\/azure-tcp-endpoint-5.png\" alt=\"\" \/><\/a><\/p>\n<h2>Remote desktop into your VM<\/h2>\n<p>Once our endpoint is created we will need to do some work with Windows and SQL Server. Navigate to your Azure VM Dashboard and download your customized .rdp file with the CONNECT button.<\/p>\n<p><a href=\"http:\/\/www.sqlhammer.com\/blog\/wp-content\/uploads\/2015\/11\/azure-rdp-1.png\"><img decoding=\"async\" src=\"http:\/\/www.sqlhammer.com\/blog\/wp-content\/uploads\/2015\/11\/azure-rdp-1.png\" alt=\"\" \/><\/a><\/p>\n<p>Connect to your VM via the downloaded .rdp file.<\/p>\n<p><a href=\"http:\/\/www.sqlhammer.com\/blog\/wp-content\/uploads\/2015\/11\/azure-rdp2.png\"><img decoding=\"async\" src=\"http:\/\/www.sqlhammer.com\/blog\/wp-content\/uploads\/2015\/11\/azure-rdp2.png\" alt=\"\" \/><\/a><\/p>\n<h2>Verify TCP\/IP is enabled for SQL Server<\/h2>\n<p>Open up SQL Server Configuration Manager and enable the TCP\/IP protocol, if it is not already.\u00a0In the VM image that I provisioned for SQL Server 2016 CTP 3.0 the TCP\/IP protocol was enabled but it is always good to verify.<\/p>\n<p><a href=\"http:\/\/www.sqlhammer.com\/blog\/wp-content\/uploads\/2015\/11\/azure-sql-tcp-1.png\"><img decoding=\"async\" src=\"http:\/\/www.sqlhammer.com\/blog\/wp-content\/uploads\/2015\/11\/azure-sql-tcp-1.png\" alt=\"\" \/><\/a><\/p>\n<h2>Configure SQL Server for Mixed Mode authentication<\/h2>\n<p>Open SQL Server Management Studio, right-click on your instance in the object explorer and select Properties. On\u00a0the Security page, select\u00a0the SQL Server and Windows Authentication mode radio button and hit OK. Finish up by restarting your SQL Server instance for the setting to take effect.<\/p>\n<p><a href=\"http:\/\/www.sqlhammer.com\/blog\/wp-content\/uploads\/2015\/11\/azure-sql-tcp-2.png\"><img decoding=\"async\" src=\"http:\/\/www.sqlhammer.com\/blog\/wp-content\/uploads\/2015\/11\/azure-sql-tcp-2.png\" alt=\"\" \/><\/a><\/p>\n<h2>Open your SQL Server connection port<\/h2>\n<p>Finally we have to open up the SQL Server connection port in the Windows Firewall with Advanced Security by creating a new inbound rule.<\/p>\n<p><a href=\"http:\/\/www.sqlhammer.com\/blog\/wp-content\/uploads\/2015\/11\/azure-firewall-rule-1.png\"><img decoding=\"async\" src=\"http:\/\/www.sqlhammer.com\/blog\/wp-content\/uploads\/2015\/11\/azure-firewall-rule-1.png\" alt=\"\" \/><\/a><\/p>\n<p>When the wizard opens, select the rule type Port and click Next.<\/p>\n<p><a href=\"http:\/\/www.sqlhammer.com\/blog\/wp-content\/uploads\/2015\/11\/azure-firewall-rule-2.png\"><img decoding=\"async\" src=\"http:\/\/www.sqlhammer.com\/blog\/wp-content\/uploads\/2015\/11\/azure-firewall-rule-2.png\" alt=\"\" \/><\/a><\/p>\n<p>Specify your port and click Next.<\/p>\n<p><a href=\"http:\/\/www.sqlhammer.com\/blog\/wp-content\/uploads\/2015\/11\/azure-firewall-rule-3.png\"><img decoding=\"async\" src=\"http:\/\/www.sqlhammer.com\/blog\/wp-content\/uploads\/2015\/11\/azure-firewall-rule-3.png\" alt=\"\" \/><\/a><\/p>\n<p>Allow the connection and then click Next.<\/p>\n<p><a href=\"http:\/\/www.sqlhammer.com\/blog\/wp-content\/uploads\/2015\/11\/azure-firewall-rule-4.png\"><img decoding=\"async\" src=\"http:\/\/www.sqlhammer.com\/blog\/wp-content\/uploads\/2015\/11\/azure-firewall-rule-4.png\" alt=\"\" \/><\/a><\/p>\n<p>Another Next\u2026<\/p>\n<p><a href=\"http:\/\/www.sqlhammer.com\/blog\/wp-content\/uploads\/2015\/11\/azure-firewall-rule-5.png\"><img decoding=\"async\" src=\"http:\/\/www.sqlhammer.com\/blog\/wp-content\/uploads\/2015\/11\/azure-firewall-rule-5.png\" alt=\"\" \/><\/a><\/p>\n<p>\u2026followed by a name for your rule and click Finish.<\/p>\n<p><a href=\"http:\/\/www.sqlhammer.com\/blog\/wp-content\/uploads\/2015\/11\/azure-firewall-rule-6.png\"><img decoding=\"async\" src=\"http:\/\/www.sqlhammer.com\/blog\/wp-content\/uploads\/2015\/11\/azure-firewall-rule-6.png\" alt=\"\" \/><\/a><\/p>\n<h2>Connect<\/h2>\n<p>Now it is time to test. Disconnect from your remote desktop session and launch SSMS on your work station. Connect using your Azure DNS name\u2026<\/p>\n<p><a href=\"http:\/\/www.sqlhammer.com\/blog\/wp-content\/uploads\/2015\/11\/azure-ssms-1.png\"><img decoding=\"async\" src=\"http:\/\/www.sqlhammer.com\/blog\/wp-content\/uploads\/2015\/11\/azure-ssms-1.png\" alt=\"\" \/><\/a><\/p>\n<p><strong>\u2026SUCCESS!<\/strong><\/p>\n<p><a href=\"http:\/\/www.sqlhammer.com\/blog\/wp-content\/uploads\/2015\/11\/azure-ssms-2.png\"><img decoding=\"async\" src=\"http:\/\/www.sqlhammer.com\/blog\/wp-content\/uploads\/2015\/11\/azure-ssms-2.png\" alt=\"\" \/><\/a><\/p>\n<hr \/>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/hammer-derik-172x140.png\" alt=\"\" \/><strong>Written by Derik Hammer of <a href=\"http:\/\/www.sqlhammer.com\/\">SQL Hammer<\/a><\/strong><\/p>\n<p>Derik is a data professional focusing on Microsoft SQL Server. His passion focuses around <a href=\"http:\/\/www.sqlhammer.com\/blog\/category\/high-availability\/\">high-availability<\/a>, <a href=\"http:\/\/www.sqlhammer.com\/blog\/category\/general\/disaster-recovery\/\">disaster recovery<\/a>, continuous integration, and automated maintenance. his experience has spanned long-term database administration, consulting, and\u00a0entrepreneurial ventures.<\/p>\n<p>Derik gives the SQL community credit for plugging the gaps in his knowledge when he was a junior DBA and, now that his skills have matured, started <a href=\"http:\/\/www.sqlhammer.com\/\">SQLHammer.com<\/a> as one small way to give back and continue the cycle of shared learning.<\/p>\n<p>Derik is the owner and lead author of SQL Hammer, a <a href=\"http:\/\/www.sqlhammer.com\/\">Microsoft SQL Server resource<\/a>.<\/p>\n<p>For more information, visit <a href=\"http:\/\/www.sqlhammer.com\/\">http:\/\/www.sqlhammer.com<\/a>. Follow Derik on <a href=\"http:\/\/twitter.com\/SQLHammer\">Twitter<\/a> for <strong>SQL tips and chat<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>After you provision a Microsoft Azure VM with SQL Server there are a few more steps that you need to take to make remote connections. The procedure below starts with a fresh Azure VM provisioned and walks through the process of establishing a connection via SQL Server Management Studio, installed on an on-premises work station. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-136","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/sqlhammer.com\/index.php\/wp-json\/wp\/v2\/posts\/136","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sqlhammer.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sqlhammer.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sqlhammer.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sqlhammer.com\/index.php\/wp-json\/wp\/v2\/comments?post=136"}],"version-history":[{"count":1,"href":"https:\/\/sqlhammer.com\/index.php\/wp-json\/wp\/v2\/posts\/136\/revisions"}],"predecessor-version":[{"id":398,"href":"https:\/\/sqlhammer.com\/index.php\/wp-json\/wp\/v2\/posts\/136\/revisions\/398"}],"wp:attachment":[{"href":"https:\/\/sqlhammer.com\/index.php\/wp-json\/wp\/v2\/media?parent=136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sqlhammer.com\/index.php\/wp-json\/wp\/v2\/categories?post=136"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sqlhammer.com\/index.php\/wp-json\/wp\/v2\/tags?post=136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}