Thursday 21 October 2010

Cannot connect to database master at SQL server

During installation of SharePoint 2010 the Configuration Wizard could not connect to the SQL Server database:
Cannot connect to database master at SQL server at SERVERNAME. The database might not exist, or the current user does not have permission to connect to it.
Several blogs where dealing with the permissions, which I checked, but they were well set. The actual problem was the TCP/IP setting of SQLServer. The TCP/IP protocol for the SQL Server was disabled (default setting on installation). Enabling this setting solved the problem.
Enabling can be done using the Sql Server Configuration Manager. Go to SQL Server Network Configuration > Protocols for MSSQLSERVER (or the named instance name you are using) en check the TCP/IP protocol status. This should be 'Enabled'.

So, if you are running into this error, check the user accounts settings as well as the TCP/IP settings of the SQL Server.

Update (23 August 2012): I just add an extra addition: Make sure that SQL server is listening on port 1433 (Thanks to Suolon)

8 comments:

Pete said...

Thanks for the refresher. Not sure why I always forget this nuggets. One thing you'll probably have to do after you enable TCP/IP is to recycle the SQL Service

Rob said...

Yes, you can do that, but it is not always needed. If you still struggle with the problem after enabling TCP/IP, you can restart the SQL Server service indeed.

Justin P said...

You, sir, are a life saver!

Rob said...

@JPeyatt: Thanks a lot. I love sharing information in this way to hope to help others with (similar) problems.

Purnima said...

i have done all the setting as you mentioned but still gives the same error.

Suolon said...

Took me a day and a half to figure this out, but not only do you need to enable TCP/IP, but you have to be sure that SQL server is listening on port 1433. For some reason, our SQL Express install did NOT use 1433, so I had to manually set it.

Rob said...

Thanks Suolon for this addition!

Anonymous said...

We have unique benefits throughout the entire process chain as a result of} our processes being extremely environment friendly and capable of scales would possibly be} unparalleled worldwide. After arriving on the total market size—using the market measurement estimation processes as defined above—the market was cut up into a number of} segments CNC machining and subsegments. Increased demand for healthcare provides as a result of} COVID-19 outbreak- The healthcare industry throughout the globe has been severely impacted by the emergence of the COVID-19 outbreak. Increased demand for masks, private protecting equipment, testing equipment, and different medical provides has inspired the manufacturers of those elements to consideration to} their manufacturing. The growing number of sufferers and the unavailability of uncooked materials to provide medical devices and private protecting equipment has created an enormous disruption in the supply chain throughout the globe. This has inspired manufacturers to seek alternatives that can assist manufacture these elements in bulk and are as environment friendly as the unique equipment.