Saturday, December 14, 2013

Tutorial: Microsoft SQL Server Network Access

14 December 2013

Last week I was deploying an application for one of my clients and I had some trouble getting it to work on a brand new work station connected to a network. So I have decided to create a simple tutorial for the required setup for future references for me and others.

Before you start any thing make sure the following is properly setup:
  • You workstation is properly connected to the network.
  • You have management studio and sql server installed.
  • If you are using any firewall, make sure to add exception/rules to allow network access for MSSQL Server

Step 1: Make sure that the SQL Browser Service is running.

  • Go to Run (Window + R) and type "services.msc" . Hit enter.
  • Look for SQL Server Brower  in the list.  If the service is disabled, enable it. (Right click -> Properties -> Startup Type = Automatic -> OK).
  • Right click on the SQL Server Browser   and click Start/Restart.


Step 2: Enable TCP/IP access on SQL Server
  • Start SQL Server Configuration Manager
  • From the Left Pane Select SQL Server Configuration Manager -> SQL Server Network Configuration ->Protocols for <Instance Name> (Instance name is SQLEXPRESS by default)

  •  From the Right Pane Double Click  TCP/IP and Set Enabled = Yes
  • Switch to IP Addresses Tab, Go to the bottom of the list and Put "1433" in TCP Port
 
  • Click OK to apply the changes.


You need to restart the SQL Service for these changes to take effect. You can do it from Services.msc window or from this configuration manager.


Step 3: Allow remote connection to your server


  • Open Microsoft SQL Server Management Studio & Login using your SQL credentials.
  • Right Click on your Database Server and Click Properties.





  • Enable "Allow remote connections to this server" option in the window. 


  • Click OK. 


Thats it! You are all set up!. You can run your applications and access the sql server over your network.

If you have an questions, feel free to leave a comment about this tutorial.



No comments:

Post a Comment