---
title: Database connection problems
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

If you encounter problems when connecting to the SQL server database during the installation or at a later point, make sure that:

- The target server has Microsoft SQL Server 2008 R2, 2012, 2014, 2016 or 2017 installed and running.
- You are using the correct instance of the SQL server if the server has multiple instances. The instance name must be entered in format _server\instance_.
- The TCP/IP protocol is enabled on the SQL server. You can check using the _SQL Server Configuration Manager_ utility, under _SQL Server Network Configuration/SQL Native Client Configuration -> Client Protocols_.
- Access to the database server is not blocked by a firewall (the default port number for the TCP/IP protocol is 1433).

## Failed authentication

**Error message**: _Login failed for user 'username'._

### SQL Server accounts

If you are using an SQL Server account with a password to authenticate against the database, make sure that:

- You are using a valid username and password.
- The login exists on the server, is enabled and has permissions to connect to the server (check the logins on your server using SQL Server Management Studio in the **Server -> Security -> Logins** section of the _Object Explorer_).
- Your server supports SQL Server authentication (check that the _**SQL Server and Windows Authentication mode**_ option is enabled in the **Server Properties -> Security** dialog in SQL Server Management Studio).

### Windows authentication mode

To resolve problems with database connections that utilize Windows authentication, you may need to contact your network administrator. The Kentico application runs under a specific local or domain account, depending on your environment (for example _NetworkService_).

When running the application on IIS, the account depends on the _**Identity**_ of the assigned application pool. If your SQL server is located on a different machine than your web server, you may need to configure the application pool to run under a domain account rather than a local account.

The account must have its own login created on the SQL server, configured for Windows authentication and with the appropriate permissions. You can manage the logins using SQL Server Management Studio, in the **Server -> Security -> Logins** section of the _Object Explorer._
