Cannot connect to the configuration database
Cannot connect to the configuration database
Issue
“Cannot connect to the configuration database or Unable to connect to database. Check data base connection information and make sure the database server is running.”
This is the error that every Administrator faced once in his seen on SharePoint Product Configuration Wizard.
Causes
This error could be of many reasons. I am giving some here as per my experience.
1. SQL database and services are down.
2. The SQL database may not be running correctly
3. You applied a Hot fix or Service Pack and did not reboot.
4. The Firewall is blocking the communication
5. The SharePoint Installation Account does not have the required permissions to the SQL Server database.
6. Network connectivity is not optimal between the SharePoint Server and SQL Server.
I am mentioning the steps here, where to look and how to trouble shoot the issue.
Verify that the SQL database is running and services
Ensure that the SQL services are up and running under System Services.
Firewall
Firewall can block access and communication with your Microsoft SQL Server so you have 2 possibilities.
Disable Firewall, easiest way on development machine but not secure and recommended for a Production environment.
So you can create 2 rules on the Firewall:
1. One inbound TCP rule with ports:1433,2383,2382
2. One inbound UPD rule with port: 1434
User Permissions
Ensure that the user running on SharePoint has the required permissions on SQL.
1. Click Start, point to Programs, point to Microsoft SQL Server, and click Enterprise Manager
2. In the left pane, double-click Microsoft SQL Servers, and then double-click your SQL server group.
3. Double-click your server.
4. Double-click Security.
5. In the left pane, click Logins.
6. In the right pane, double-click the user for your Farm Admin Global Administrator.
7. In the SQL Server Login Properties dialog box, click Server Roles.
And select the following: Security Administrators and the Database Creators check boxes and then click Database Access.
Connection between SharePoint and SQL server
1. Verify that SharePoint is using the correct IP address for the SQL server. To do this, run the ping command on the Windows SharePoint Services server.
2. Verify that the SharePoint server is obtaining the correct IP address for the SQL server from DNS. To do this, run the nslookup command from the SharePoint Server.
3. Make sure that there are no incorrect entries for the SQL server. To do this, examine the Hosts file on the SharePoint server. This file is in the following location:
%systemroot%\system32\drivers\etc\Hosts
4. On the SharePoint server, look for SQL client aliases. To do this, follow these steps: Click
1. Start, click Run, and then type cliconfg in the open box.
2. Click the Alias tab. By default, there are no SQL client aliases. If you have any aliases for the SQL server, verify that they are correct, or remove them.
5. Open the SQL Server Configuration Manager (Start SQL Server 2008 Configuration Tools SQL Server Configuration Manager
1. Navigate to the SQL Server Network Configuration Protocols for MSSQLSERVER node in the tree view
2. Enable TCP/IP and Named Pipes (you’ll be warned that these changes will not apply until the service is shut down)
To assign a TCP/IP port number to the SQL Server Database Engine
· In SQL Server Configuration Manager, in the console pane, expand SQL Server Network Configuration, expand Protocols for <instance name>, and then double-click TCP/IP.
· If the TCP Dynamic Ports dialog box contains 0, indicating the Database Engine is listening on dynamic ports, delete the 0.
· If the TCP Port box isn’t 1433, type the port number 1433 and then click OK.
· In the console pane, click SQL Server Services.
· In the details pane, right-click SQL Server (<instance name>) and then click Restart, to stop and restart SQL Server.
SharePoint administrative accounts: Local Administrator
Ensure The setup user administrator account requires the following permissions:
· It must have domain user account permissions.
· It must be a member of the local administrators group on each server in the SharePoint farm, excluding the server running SQL Server and the Simple Mail Transfer Protocol (SMTP) server.
If you find a different solution, add it to this article. This will be useful to SharePoint Community. Be sure to double-verify it: undo your solution and verify that the problem comes back, then redo it and verify that the problem goes away.