WEBfactory 2010

Accessing a remote SQL Server database with WEBfactoryStudio

Abstract

Check ou this tutorial and learn how to access a remote SQL server database with WEBfactory 2010 Studio.

The following tutorial explains the steps needed to remotely access a SQL Server database and it is structured in two parts:

In order to be able to access a remote SQL Server database, the following prerequisites need to be met:

  • SQL Native Client needs to be installed on the client PC.

  • SQL Server Service needs to be enabled on the server PC.

Enabling remote access to SQL Server 2008 R2
Allow remote connections to the desired SQL server
  1. Open the SQL Server Management Tool. Right-click on the SQL server for which you need to allow remote access. Select Properties.

    Capture2224.jpg
  2. In the Server Properties windows, go to the Connections page. Make sure that the Allow remote connections to this server option is enabled.

    Capture2225.jpg
  3. Click OK to confirm the change. The change will be applied without needing to restart the SQL server.

Grant User Access

To allow access to users in a Windows domain

  1. In SQL Server Management Tool, log in the desired instance of SQL Server. This step presumes that you are the administrator of the computer and the instance of SQL Server.

    Capture2136.jpg
  2. In Object Explorer, expand the Security node. Right-click Logins and click New Login....

    Capture2137.jpg
  3. Type the name of the user to allow by using the domain\username format. Optional, you can click Search and use the dialog to confirm that the user is a Windows authenticated user.

    Capture2138.jpg
  4. Click OK to close the Login - New dialog.

  5. In Object Explorer, expand the Databases node. Expand the node of the database that you want to grant access to. Expand the Security node of the database. Right-click the Users node and click New User.

    Capture2139.jpg
  6. In the User name box, type in a name for the user. In the Login name box, type the name of the user by using the domain\username format. In the Database role membership section, select the role that you want to grant the user for the database.

    Capture2140.jpg
  7. Click OK to confirm the Database User dialog.

Enable a Port
  1. On the Start menu, click Run, type WF.msc, and then click OK.

    Capture2141.jpg
  2. In the Windows Firewall with Advanced Security, in the left pane, right-click Inbound Rules, and then click New Rule in the action panel.

    Capture2142.jpg
  3. In the Rule Type dialog box, select Port, and then click Next.

    Capture2143.jpg
  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.

    Capture2144.jpg
  5. In the Action dialog box, select Allow the connection, and then click Next.

    Capture2145.jpg
  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.

    Capture2146.jpg
  7. In the Name dialog box, type a name and description for this rule, and then click Finish.

    Capture2147.jpg
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.

    Capture2148.jpg
  2. Expand the SQL Server Network Configuration Manager node. Expand the SQL Server Network Configuration node. Click Protocols for MSSQLSERVER (If SQL Server Express is installed, the name of the node will be Protocols for SQLEXPRESS).

    Capture2149.jpg
  3. Right-click TCP/IP and click Enable.

    Capture2150.jpg

    After setting the protocol you must restart the SQL Server service. To restart the SQL Server service:

  4. In the SQL Server Configuration Manager application, click the SQL Server Services node.

  5. Right-click SQL Server (MSSQLSERVER) and click Restart.

    Capture2151.jpg
Accessing the remote database using WEBfactoryStudio
  • To access the database remotely, open the WEBfactoryStudio. The remote options will be available in the login dialog.

WEBfactoryStudio login dialog

  1. Select the Database Server that hosts the remote database.

  2. Enter the login credentials to connect to the database.

  3. Choose the desired database from the SQL Server.

  4. Press Login to log in that database with WEBfactoryStudio.

You now have access to all the information of the remote database in the Studio.