"Cannot connect to the configuration database orUnable to connect to database. Check database connection information and make sure the database server is running."
This is “the” error that everyone has once in their life seen on SharePoint Product Configuration Wizard..
There are many reasons why:
"Cannot connect to the configuration database or Unable to connect to database. Check database connection information and make sure the database server is running."
This is the error that everyone has once in his life seen on SharePoint Product Configuration Wizard.
Review the PSCDiagnostics log at, C:\program files\common files\Microsoft shared\web server extensions\15 or \14 for the SharePoint logs
This is the kind error that you can receive with maybe more information: System.Data.SqlClient.SqlException was thrown. Additional exception information: 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)
In the list of services, locate the MSSQLSERVER service and be sure that it’s running.
Be even sure that on the Microsoft SQL Server, the following services are running:
Firewall can block access and communication with your Microsoft SQL Server so you have 2 possibilities.
1433: SQL Server is a Winsock application that communicates over TCP/IP by using the sockets network library. SQL Server listens for incoming connections on a particular port. The default port
for SQL Server is 1433. The port doesn't need to be 1433, but 1433 is the official Internet Assigned Number Authority (IANA) socket number for SQL Server.
TCP port 2383 should be open when installing a default instance or creating an Analysis Services failover cluster.
2382: TCP port 2382 should be open when installing a named instance. Named instances use dynamic port assignments. As the discovery service for Analysis Services, SQL Server
Browser service listens on TCP port 2382 and redirects the connection request to the port currently used by Analysis Services.
1434: the client computer would need to open a random UDP port and the server UDP port 1434 will be used to send the instance name, and if the instance is clustered, the
version of the SQL instance, the TCP port number that the instance is listening on, and the named pipe that the instance is using. However, if the goal is to minimize the number of ports open on the firewall, a static port number should be chosen for the default
instance and any named instance. The client computers would need to be configured to connect to a particular ServerName or ServerName instance and specific port number.
Is actually your SQL server correctly setup? Are you sure about the steps that you executed? If not please check here. All these links are official TechNet articles:
Next, you have to verify that your account has the required permissions on the SQL Server database.
Please be sure that if you made a copy of a Virtual Machine that you used sysprep before to avoid getting the same SID! You can use PSTOOLS to change this if it’s not the case.
The installation account is used to set up each server in your farm by running the SharePoint Configuration Wizard, the initial Farm Creation Wizard, and Windows PowerShell. For the examples in the setup user administrator account is used for farm administration,
and you can use Central Administration to manage it. Some configuration options, for example, configuration of the SharePoint 2013 Search query server, require local administration permissions. The setup user administrator account requires the following permissions:
Gokan Ozcifci [MVP]
Good article I ran into an error like this trying to run PSConfig for MOSS 2007 w/ SP1 on Server 2003 R2 x86 with the SQL Server 2008 R2 box running on a remote machine in the same domain. The exact error was:
"SharePoint Products and Technologies Configuration Failed to connect to the database server or the database name does not exist. Ensure the database server exists, is a Sql server, and that you have the appropriate permissions to access the database server. To diagnose the problem, review the extended error information located at <path>. Please consult the SharePoint Products and Technologies Configuration Wizard help for additional information regarding database server security configuration and network access."
I was getting the error on the Specify Configuration Database Settings page of the wizard.
Database server filed had a value of contoso\sp2010 where contoso is the domain and sp2010 is the database server running SQL 2008 R2.
Remove 'contoso\' from the Database server field so it's just sp2010 and click Next > button.
Sometimes the stadm part doesnt work id that is so then you need to follow the instructions i found on this blog heresjaken.com/sharepoint-cannot-connect-to-configuration-database-error-after-installing-kb-update-on-sbs-server-2008
Thanks Peter for your help !
I noticed a few typos that I corrected for other users' benefit - great article though!
This article was highlighted in the TechNet Wiki Ninja Top Contributors weekly blog , Most Updated Article Award, 18/01/2014 - blogs.technet.com/.../top-contributors-awards-sharepoint-troubleshooting-mega-azure-pack-portal-gurus-c-and-well-lessons-learnt-o-o.aspx