{"id":4099,"date":"2015-01-07T18:54:53","date_gmt":"2015-01-07T10:54:53","guid":{"rendered":"http:\/\/rmohan.com\/?p=4099"},"modified":"2015-01-07T19:01:05","modified_gmt":"2015-01-07T11:01:05","slug":"enable-remote-connections-for-sql-server-express-2012","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=4099","title":{"rendered":"Enable remote connections for SQL Server Express 2012"},"content":{"rendered":"<p>On my installation of SQL Server 2012 Developer Edition, installed with default settings, I just had to load the SQL Server Configuration Manager -&gt; SQL Server Network Configuration -&gt; Protocols for MSSQLSERVER and change TCP\/IP from Disabled to Enabled.<\/p>\n<p>&nbsp;<\/p>\n<table>\n<tbody>\n<tr>\n<td class=\"votecell\">\n<div class=\"vote\"><a class=\"vote-down-off\" title=\"This answer is not useful\">down vote<\/a><span class=\"vote-accepted-on load-accepted-answer-date\" title=\"loading when this answer was accepted...\">accepted<\/span><\/div>\n<\/td>\n<td class=\"answercell\">\n<div class=\"post-text\">\n<p>Well, <a href=\"http:\/\/blog.stackoverflow.com\/2012\/05\/encyclopedia-stack-exchange\/\">glad I asked<\/a>. The solution I finally discovered was here:<\/p>\n<p><a href=\"http:\/\/support.webecs.com\/KB\/a868\/how-do-i-configure-sql-server-express-to-allow-remote.aspx\">How do I configure SQL Server Express to allow remote tcp\/ip connections on port 1433?<\/a><\/p>\n<ol>\n<li>Run SQL Server Configuration Manager.<\/li>\n<li>Go to SQL Server Network Configuration &gt; Protocols for SQLEXPRESS.<\/li>\n<li>Make sure TCP\/IP is enabled.<\/li>\n<\/ol>\n<p>So far, so good, and entirely expected. But then:<\/p>\n<ol>\n<li>Right-click on TCP\/IP and select <strong>Properties<\/strong>.<\/li>\n<li>Verify that, under IP2, the IP Address is set to the computer&#8217;s IP address on the local subnet.<\/li>\n<li>Scroll down to IPAll.<\/li>\n<li>Make sure that <strong>TCP Dynamic Ports<\/strong> is <strong>blank<\/strong>. (Mine was set to some 5-digit port number.)<\/li>\n<li>Make sure that <strong>TCP Port<\/strong> is set to <strong>1433<\/strong>. (Mine was blank.)<\/li>\n<\/ol>\n<p>(Also, if you follow these steps, it&#8217;s <em>not<\/em> necessary to enable SQL Server Browser, and you only need to allow port 1433, not 1434.)<\/p>\n<p>These extra five steps are something I can&#8217;t remember ever having had to do in a previous version of SQL Server, Express or otherwise. They appear to have been necessary because I&#8217;m using a named instance (myservername\\SQLEXPRESS) on the server instead of a default instance. See here:<\/p>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<div class=\"LW_CollapsibleArea_HrDiv\">\n<hr class=\"LW_CollapsibleArea_Hr\" \/>\n<\/div>\n<div class=\"sectionblock\">\n<h3 class=\"procedureSubHeading\">To assign a TCP\/IP port number to the SQL Server Database Engine<\/h3>\n<div class=\"subSection\">\n<ol>\n<li>In SQL Server Configuration Manager, in the console pane, expand <span class=\"label\">SQL Server Network Configuration<\/span>, expand <span class=\"label\">Protocols for &lt;instance name&gt;<\/span>, and then double-click <span class=\"label\">TCP\/IP<\/span>.<\/li>\n<li>In the <span class=\"label\">TCP\/IP Properties<\/span> dialog box, on the <span class=\"label\">IP Addresses<\/span> tab, several IP addresses appear in the format <span class=\"label\">IP1<\/span>, <span class=\"label\">IP2<\/span>, up to <span class=\"label\">IPAll<\/span>. One of these is for the IP address of the loopback adapter, 127.0.0.1. Additional IP addresses appear for each IP Address on the computer. Right-click each address, and then click <span class=\"label\">Properties<\/span> to identify the IP address that you want to configure.<\/li>\n<li>If the <span class=\"label\">TCP Dynamic Ports<\/span> dialog box contains <span class=\"label\">0<\/span>, indicating the Database Engine is listening on dynamic ports, delete the 0.<\/li>\n<li>In the <span class=\"label\">IP<\/span><em>n<\/em><span class=\"label\"> Properties<\/span> area box, in the <span class=\"label\">TCP Port<\/span> box, type the port number you want this IP address to listen on, and then click <span class=\"label\">OK<\/span>.<\/li>\n<li>In the console pane, click <span class=\"label\">SQL Server Services<\/span>.<\/li>\n<li>In the details pane, right-click <span class=\"label\">SQL Server (<\/span>&lt;instance name&gt;<span class=\"label\">)<\/span> and then click <span class=\"label\">Restart<\/span>, to stop and restart SQL Server.<\/li>\n<\/ol>\n<p>After you have configured SQL Server to listen on a specific port, there are three ways to connect to a specific port with a client application:<\/p>\n<ul>\n<li>Run the SQL Server Browser service on the server to connect to the Database Engine instance by name.<\/li>\n<li>Create an alias on the client, specifying the port number.<\/li>\n<li>Program the client to connect using a custom connection string.<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<p>You can use this to solve this issue:<\/p>\n<p>Go to START &gt; EXECUTE, and run <strong>CLICONFG.EXE.<\/strong><\/p>\n<p>The Named Pipes protocol will be first in the list.Demote it, and promote TCP\/IP.<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/rmohan.com\/wp-content\/uploads\/2015\/01\/test.bmp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter  wp-image-4100\" src=\"http:\/\/rmohan.com\/wp-content\/uploads\/2015\/01\/test.bmp\" alt=\"test\" width=\"655\" height=\"545\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>On my installation of SQL Server 2012 Developer Edition, installed with default settings, I just had to load the SQL Server Configuration Manager -&gt; SQL Server Network Configuration -&gt; Protocols for MSSQLSERVER and change TCP\/IP from Disabled to Enabled.<\/p>\n<p>&nbsp;<\/p>\n<p> down voteaccepted <\/p>\n<p>Well, glad I asked. The solution I finally discovered was here:<\/p>\n<p>How do [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[44],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/4099"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4099"}],"version-history":[{"count":2,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/4099\/revisions"}],"predecessor-version":[{"id":4102,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/4099\/revisions\/4102"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4099"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4099"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4099"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}