Sunday, 19 September 2010

Can not connect to configuration database: System.Data.SqlClient.SqlException: 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.

You don't really feel like working on Sunday or do you? but if you see error like this then it doesn't leave you in relaxed mood anymore and very next moment you end up asking all sorts of questions to yourself, "Where the heck this come from I left my server working last night?", "Did I make any new installation that could have crippled this?" blah blah.

Well not a great day start, I was expecting to do something new and exciting today and this trouble shooting on the way, not again :-(

Anyway, I spent long hours trouble shooting this error on my other virtual box which I built using Hyper-V, the bottom line is I ended up de-installing SharePoint, SQL Server 2008 and all other pre-reqs but still no luck. The browser was spitting the same error as this but underlying story was different and it was complaining about the version incompatibility between the database server and iis in the log file.

I built another virtual machine and put everything on top. Started with SharePoint 2010, SharePoint Designer 2010, Visusal Studio 2010. Until now everthing seems to be working ok but when I installed Microsoft Office Professional Plus this left me with this error message. Offcourse first thing in my trouble shooting steps was to look into the log files under 14\log folder. This gave me detailed error message which looked like this

"Can not connect to configuration database: System.Data.SqlClient.SqlException: 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) at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open() at ...
"

From this point to onwards I was pretty certain that the sql instance for SharePoint is not running. Further I found out in 'Microsoft SQL 2008\SQL Server Configuration Manager' that for some odd reason the SharePoint Instance Service was stopped. When I restarted the service and tried accessing SharePoint, this time it worked. All back to normal !

I reckon the Office Professional Plus installation in the first box would have caused incompatiblity between the database server and iis though I'm not 100% sure about this. I've tried de-installing SharePoint but havn't tried uninstalling the Office Professional Plus installation. I'll post my finiding when I try this later.

Majid

No comments:

Iconise ‘Add Picture’ control in PowerApps

Default look you get for ‘Add Picture’ control is not very appealing for end user and there is no OTB way of specifying icon for this con...