help.axcms.netAxinom Logo
Save Save Chapter Send Feedback
KB10032: Problems with Database Connections
This is the case when database connection is interrupted while trying to connect to the database.


There is a problem connecting to the database, some error or exception related to database connection is displayed.


As the problem-statement is quite general, there can be many causes to that and each cause it’s own resolution. Here we try to list the most common causes and their resolutions.

The database server does not allow SQL Server and Windows authentication.

To check this, go to your SQL server, login, and right click on the server's name (in left menu). A pop up opens. Now click on the Security tab in left menu and check the SQL Server and Windows Authentication mode (don't forget to click OK also).

The DB instance name is not correct in the configuration files

Check it in init_sample_exe.config (Change all (localhost) to .\SQLEXPRESS or whatever the db instance name is)

 Also do it in web.config files ->

          (the root names can be different, depending on your configuration)

There are 2 leading backslhashes in web.config fiels before the server name

Be sure that there are not 2 leading backslashes before the servers name in web.config files

The users in the web.config do not match the users of the database

Be sure that user in web.config and users of the database, e.g. AxCMS_Sample are the same and passwords are the same.

E.g. in web.config file UID=AxinomCMS, then database user, who must have connection permission, must be also AxinomCMS, and if in web.config is PWD=AxinomCMS1, the user made to the Login of SQL server and added to Users of AxCMS_Sample, should also have password inserted as AxinomCMS (for login making and users adding please visit help and support center )

The login user does not have sufficient rights

The login user should have db_reader and db_writer roles.

Also be sure that login database user (e.g. AxinomCMS) has permission to connect to database and login is enabled (SQL server -> Security -> right click on the user -> select Properties -> Status)

TCP/IP protocol is not enabled for the SQL Server and/or the wrong port is used.

TCP/IP protocol must be enabled for the SQL server and port 1433 must be used

  1. Check if you can connect to the SQL Server port 1433 by using telnet. In order to do that, open CMD (Start->run; type "cmd") and type: telnet localhost 1433 at the PC the SQL Server is installed
  2. If your check failed, then please check your firewall settings of the PC where the SQL Server is installed (look below to the point of enabling remote connection).
  3. Check if your SQL Server is configured to accept TCP/IP connections:
  • open Start->Programs->Microsoft SQL Server 2005->Configuration Tools->SQL Server Configuration Manager ->SQL Server Network Utility and add TCP/IP to the "enabled protocols" list. If its already in the list, but it is disabled, enable it.
  • additionally to look over after the TCP/IP is enabled : make a double click TCP/IP and switch to tab "IPAddresses". Then please check if TCP Dynamic Ports is blank and TCP Port is set to 1433.
  • restart your SQL Server (by stopping and starting it explicitly)

For more information please visit .

SQL Server is on another machine, but it does not allow remote connections

By default, SQL Server 2005 Express Edition and SQL Server 2005 Developer Edition do not allow remote connections.

Use the following steps to enable remote access to SQL Express:

  1. Programs, Microsoft SQL Server 2005, Configuration Tools, SQL Server Configuration Manager.
  2. In the left pane of the SQL Server Configuration Manger, expand the node for SQL Server 2005 Network Configuration and select Protocols for SQLEXPRESS.
  3. In the right pane, right-click Named Pipes and choose Enable (for more information ).
  4. Right-click TCP/IP and choose Enable.
  5. In the left pane, select SQL Server 2005 Services.
  6. In the right pane, right-click SQL Server Browser and choose Properties.
  7. Click the Services tab in the Properties dialog box.
  8. On the Services page, set the Start Mode property to Automatic and click OK.
  9. Right-click SQL Server Browser and choose Start.
  10. Right click SQL Server (SQLEXPRESS) and choose Restart.

Use the following steps to configure the Windows firewall.

  1. Open the Windows Firewall dialog box and click the
  2. Click Add Program and Browse to find sqlbrowser.exe and click OK.
  3. Click Add Program and Browse to find sqlservr.exe. Click OK.
  4. Click Add Port and enter "SQL Service" for Name, 1433 for Port number, and select the TCP radio button.
  5. Click OK on the Windows Firewall dialog

and some advanced tips to search more

  • Enable the TCP/IP protocol using the Surface Area Configuration Utility [Link]
  • Make sure the SQL Server browser is started. Note this step is optional. It is possible to set the SQL Server instance to use a fixed IP address - but this is non-standard for named instances. See sqlexpress's WebLog for details. [Link ]
  • Make sure SQL Server and SQL Server Browser are exempted by the firewall on the server machine. This is done by putting sqlservr.exe and sqlbrowser.exe as an exception in the windows firewall.

Note: In order to get things to work. You might need to completely reboot the server machine after making the changes. There have been reports (thanks P.C.) that starting and stopping the SQL Server and Browser software is not enough.

Even more information here:;EN-US;914277


Our customers and partners keep asking us, which version of SQL Server 2005 is the most convenient one. Use the following tables to determine which features are supported by the various editions of Microsoft SQL Server 2005.

APPLIES TO versions: All versions