Monday 17 December 2012

Enable Remote Access to SQL Server 2008 R2 on Win 2008 R2

Enable Remote Access to SQL Server 2008 R2 hosted on Window Server 2008 R2

Grant User Access
To allow access to users in a Windows domain
1.Open the SQL Server Management Tool.
2.Log on to the instance of SQL Server. This step presumes that you are the administrator of the computer and the instance of SQL Server.
3.In Object Explorer, expand the Security node.
4.Right-click Logins and click New Login....
5.Type the name of the user to allow by 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 Object Explorer, expand the Databases node.
8.Expand the node of the database that 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 a name for the user.
12.In the Login name box, type the name of the user by using the domain\username format.
13.In the Role Members list box, select the role that you want to grant the user for the database. Common options are db_dataread and db_datawriter.

Enable a Port
1.On the Start menu, click Run, type WF.msc, and then click OK.
2.In the Windows Firewall with Advanced Security, in the left pane, right-click Inbound Rules, and then click New Rule in the action pane.
3.In the Rule Type dialog box, select Port, and then click Next.
4.In the Protocol and Ports dialog box, select TCP. Select Specific local ports, and then type the port number of the instance of the Database Engine, such as 1433 for the default instance. Click Next.
5.In the Action dialog box, select Allow the connection, and then click Next.
6.In the Profile dialog box, select any profiles that describe the computer connection environment when you want to connect to the Database Engine, and then click Next.
7.In the Name dialog box, type a name and description for this rule, and then click Finish.

Set a Protocol
This is also a one-time procedure that you perform on the computer that hosts the instance of SQL Server to indicate 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 Manager node.
3.Expand the SQL Server Network Configuration node.
4.Click Protocols for MSSQLSERVER.
5.Right-click TCP/IP and click Enable.

After setting the protocol you must restart the SQL Server service.
To restart the SQL Server service
1.In the SQL Server Configuration Manager application, click the SQL Server Services node.
2.Right-click SQL Server (MSSQLSERVER) and click Restart.

No comments:

Post a Comment