Resolving errors found when running Database Setup

Symptom

The following error message may be encountered when running Database Setup:

"An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)"

Resolution

To resolve the issue, follow the steps below.

1) Open the following file:
C:\Documents and Settings\All Users\Application Data\Lnl\application.config

2) Locate the line containing the following data in the application.config file:
add key="ConnectionString" value="Data Source=SERVERNAME; Integrated Security=SSPI; Initial Catalog=AccessControl"

3) Ensure that SERVERNAME in step 2 matches the hostname of the computer running the AccessControl database. If a change was required, save the file and close it.

4) Run Database Setup.

If the steps above do not resolve the issue, you may need to close any open connections to the AccessControl database. To do this, follow the steps below.

1) Start SQL Server Management Studio.

2) In the Object Explorer pane, right-click on the database engine (usually the name of the server) and select Properties.

3) In the Server Properties screen, select Connections.

4) Ensure that "Allow remote connections to this server" is selected under Remote server connections.

5) Check for open query windows/tabs using the AccessControl database in SQL Server Management Studio. Each window that is open creates a new connection to the database. Close these windows/tabs.

6) If there are no open query windows, there may be active remote connections using the AccessControl database. Open a new query window using the AccessControl database, type the following, and then press F5:
sp_who2

This will return all SQL process IDs (SPIDs) that are active.

7) Note any rows where the 'DBName' field value is 'AccessControl'. If there are any, kill the associated SPID by typing the following, then pressing F5 (where SPID is the actual SPID):

kill SPID

8) When there are no remaining SPIDs where 'DBName' = 'AccessControl', close the query window to close the final remaining active connection.

9) Run Database Setup.

Applies To

OnGuard (All Versions)
SQL Server 2005
SQL Server 2005 Express

Additional Information

The database engine may not allow remote connections. Remote connections must be enabled for Database Setup to connect to the database.

Active connections to the AccessControl database can prevent Database Setup from gaining exclusive access to the AccessControl database. These connections must be terminated for Database Setup to complete successfully.

This article was originally published in the Volume VI Technical Support Bulletin, and has been revised since then.