Enable Remote Connections in SQL Server 2008

on Tuesday, October 20, 2009

To allow access to users in a Windows domain

  1. Open the SQL Server Management Tool.
  2. Log in to the machine. This step presumes that you are the administrator of the computer and the SQL Server installation.
  3. In the Object Explorer window, expand the Security node.
  4. Right-click Logins and click New Login....
  5. Type in the name of the user to allow using the domain\username format.
  6. Click Search and use the dialog to confirm that the user is a Windows authenticated user. Then close the New Login dialog.
  7. In the Object Explorer pane, expand the Databases node.
  8. Expand the node of the database you want to grant access to.
  9. Expand the Security node of the database.
  10. Right-click the Users node and click New User.
  11. In the User name box, type in any name you want for the user.
  12. In the Login name box, type the name of the user using the domain\username format.
  13. In the Role Members list box, check the box of the role you want to grant the user for the database. Common options are db_dataread and db_datawriter.

Enable a Port

This is a one-time procedure that is performed on the computer hosting the SQL Server installation. You must instruct the computer to allow access to the machine through a specific port. The default set by SQL Server is 1433. If you change the default, follow the directions below and change the port number as appropriate.

To enable port 1433

  1. On the Start menu, click Control Panel.
  2. Under Security, click Allow a program through Windows Firewall.
    Dd857537.note(en-us,VS.85).gifNote:
    Alternatively, click Start, and in the Search box type Windows Firewall. If two versions appear, select the simpler version (that is "Windows Firewall" and not "Windows Firewall with Advanced Security." In the dialog box, click Allow a program through Windows Firewall.

  3. If prompted, click Continue. This presumes you are the administrator of the computer.
  4. In the Windows Firewall Settings dialog box, click the Add Port button.
  5. In the Name box, type a name, such as "SQL Server Port".
  6. In the Port number box, type 1433. Use the default protocol TCP.
  7. Click OK.

Start sql server browser service



Restart the SQL Server Service

Set a Protocol

This is also a one-time procedure performed on the computer hosting SQL Server. You must instruct SQL Server about which protocol to use when communicating with remote clients. This procedure uses the TCP/IP protocol.

To set the protocol

  1. Open the SQL Server Configuration Manager application. This is found in the Configuration Tools folder of the Microsoft SQL Server 2008 folder.
  2. Expand the SQL Server Network Configuration node.
  3. Click Protocols for MSSQLSERVER.
  4. If the Named Pipes Status is set to Disabled:
    1. Double-click the Named Pipes row.

    2. Set the Enabled property to Yes and click OK.

  5. To stop and restart SQL Server:
    1. Open the SQL Server Management Studio application.

    2. Log into the computer. This presumes you are the administrator of the computer and the SQL Server installation.

    3. In the Object Explorer window, right-click the topmost node (by default, it is the name of the computer with a SQL Server version and other information) and click Restart.

  6. If the TCP/IP Status is set to Disabled:
    1. Double-click the TCP/IP row.

    2. Set the Enabled property to Yes and click OK.

0 comments: