Archive

Archive for the ‘Data’ Category

How To Install MS SQL Express 2005 from the Command-Line

April 24th, 2009 No comments

Installing MS SQL Server Express 2005 using the installer is not too difficult, but there are a number of dialogs that need to be navigated in the install process. The entire installation can be automated with a batch file and configuration file which I describe below.

Read more…

Categories: Data Tags:

How to configure SQL Server 2005 to allow remote connections

April 20th, 2009 No comments

By default, SQL Server 2005 Express Edition and SQL Server 2005 Developer Edition do not allow remote connections. To configure SQL Server 2005 to allow remote connections, complete all the following steps:

  • Enable remote connections on the instance of SQL Server that you want to connect to from a remote computer.
  • Turn on the SQL Server Browser service.
  • Configure the firewall to allow network traffic that is related to SQL Server and to the SQL Server Browser service.

This article describes how to complete each of these steps.

To enable remote connections on the instance of SQL Server 2005 and to turn on the SQL Server Browser service, use the SQL Server 2005 Surface Area Configuration tool. The Surface Area Configuration tool is installed when you install SQL Server 2005.

Enable remote connections for SQL Server 2005 Express or SQL Server 2005 Developer Edition

You must enable remote connections for each instance of SQL Server 2005 that you want to connect to from a remote computer. To do this, follow these steps:

  1. Click Start, point to Programs, point to Microsoft SQL Server 2005, point to Configuration Tools, and then click SQL Server Surface Area Configuration.
  2. On the SQL Server 2005 Surface Area Configuration page, click Surface Area Configuration for Services and Connections.
  3. On the Surface Area Configuration for Services and Connections page, expand Database Engine, click Remote Connections, click Local and remote connections, click the appropriate protocol to enable for your environment, and then click Apply.
    Note Click OK when you receive the following message: Changes to Connection Settings will not take effect until you restart the Database Engine service.
  4. On the Surface Area Configuration for Services and Connections page, expand Database Engine, click Service, click Stop, wait until the MSSQLSERVER service stops, and then click Start to restart the MSSQLSERVER service.

Inserted from <http://support.microsoft.com/kb/914277>

Categories: Data Tags:

SQL Network Interfaces Error: 26

April 20th, 2009 No comments

When trying to connect an ASP.NET web application to an instance MS SQL Server Express 2005, I get the following error:

Error: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 – Error Locating Server/Instance Specified)

At first reading I thought that this was the result of the server not being configured for remote connections. As it turns out we needed to change the database connection string to use {hostname}\{name of instance} instead of {IP address}\{name of instance}.

In regards to the issue of allowing remote connections, instructions for doing so can be found at Configuring SQL Server Express 2005 for Remote Access when SQL Server does not allow remote connections

Basically, you go to SQL Server Configuration Manager and under client protocol make sure TCP/IP, named pipes and shared memory is enabled.  Also, go to to SQL Server Surface Area Configuration and under Database –> Remote Connection choose both TCP/IP and Named Pipes.

Categories: Data Tags: ,