Skip to content

Quick Tip: Access SQL Server Across Local Area Network / Internet

To access your SQL Server 2005 / 2008 instance across a LAN or the Internet you must first ensure that TCP/IP is enabled on the SQL Server instance you are trying to access and you are connecting on the correct port (by default, TCP 1433).

So as quoted on MSDN, this is how you enable TCP/IP support for your instance from within SQL Server Configuration Manager (which can be found in your start menu):

All network protocols are installed by SQL Server Setup, but may or may not be enabled.

Use SQL Server Configuration Manager to enable or disable network protocols.

The Database Engine must be stopped and restarted for the change to take effect.  To enable a server network protocol:

  1. In SQL Server Configuration Manager, in the console pane, expand SQL Server Network Configuration.
  2. In the console pane, click Protocols for <instance name>.
  3. In the details pane, right-click the protocol you want to change, and then click Enable or Disable.
  4. In the console pane, click SQL Server Services.
  5. In the details pane, right-click SQL Server (<instance name>), and then click Restart, to stop and restart the SQL Server service.

Once this is done you may test your login (using SQL Server Management Studio or via your application if applicable etc.) by connecting to ‘MACHINE_NAME_OR_IP‘ or ‘MACHINE_NAME_OR_IP\SQLEXPRESS‘ if it is a SQL Server Express instance.

You might want to also check your Windows Firewall to ensure you can accept incoming connections on the hosting SQL server machine.

VN:F [1.9.1_1087]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.1_1087]
Rating: 0 (from 0 votes)
Bookmark and Share
kick it on DotNetKicks.com
Shout it

NOW, FOR A WORD FROM OUR SPONSORS

3 Comments

  1. JohnP

    And you believe that allowing internet access to any database server is a good idea?

    Bad developer, bad.

    VA:F [1.9.1_1087]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.1_1087]
    Rating: 0 (from 0 votes)
    Posted on 28-Sep-09 at 1:10 pm | Permalink
  2. Graham O'Neale

    I don’t recall saying that. I shouldn’t need explain security risks by opening up SQL Server across the Internet. If you don’t know what precautions to take or how to only allow access for services that require it, then that’s at your own demise.

    VN:F [1.9.1_1087]
    Rating: 0.0/5 (0 votes cast)
    VN:F [1.9.1_1087]
    Rating: 0 (from 0 votes)
    Posted on 29-Sep-09 at 3:40 am | Permalink
  3. Chris

    LoL no one said anything about putting your SQL Server in the DMZ trolling failure.

    VA:F [1.9.1_1087]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.1_1087]
    Rating: 0 (from 0 votes)
    Posted on 29-Sep-09 at 5:26 pm | Permalink

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*
My name is Graham O'Neale and I'm a software architect from Gold Coast, Australia. I am an overtime thinker, full time coder and awake part time in the real world. I have a keen interest in software development, particularly in the realm of programming (C#, ASP.NET, ASP.NET MVC, LINQ (2 SQL), Entity Framework, Silverlight, Blend, WCF, WPF) and a keen interest in the cutting edge and innovation. I have a new found love for design patterns, ALT.NET practices and well crafted software architecture. The purpose of this blog is to express any thoughts, findings, tips and gripes along my travels in the wonderful world of coding and technology...