3

I'm working with SharePoint 2010. It was working perfectly until one day it didn't let me access the SharePoint central admin. I found out that my SharePoint service account and farm account (sp_farm and sp_serviceapp) in AD got deleted somehow. So I created the users again to see if it works. But whenever I try to access SharePoint central administration, I get the error saying "Cannot connect to the configuration database" .

The SQL database (MSSQLSERVER) is running. I don't know what to do. Any help is greatly appreciated!

3

due to SQL service stop in your sharepoint server this error generate

Go Start Menu -> Run -> Type "Services.msc" -> find "SQL (SHAREPOINT) Service" -> just Start it

Refresh Page again.

  • It was unable to start, so properties->logon->change radio button – codemirror Oct 21 '17 at 18:53
3

Do you have access to the SharePoint 2010 Management Shell?

Because the SharePoint Farm Account got deleted and then recreated, the SID will probably be different. Because the SID in Central Admin and the Configuration Database don't match, they are considered different users.

You might regain access by making sure the SID in Central Admin is the same as the SID of the account that has access to the Configuration Database

In the SharePoint 2010 Management Shell try the following to compare the SID's:

$CentralAdmin = Get-SPWeb -Identity http://url_of_your_central_admin:1862
$CentralAdmin.groups['Farm Administrators'].Users['Farm Account Name'].Sid

Now you have the SID of Farm Account in Central Admin. Next we are going to compare this SID with the SID of the newly created account.

$user = New-Object System.Security.Principal.NTAccount("domain name", "Farm Account name")
$sid = $user.Translate([System.Security.Principal.SecurityIdentifier])
$sid.Value

Do these two SID's match?

If the SID's do not match, i suggest reading this article: http://support.microsoft.com/kb/2809787. The article deals with Active Directory groups that had their SID's changed. But I think a similar solution is applicable for user accounts.

Extract from http://support.microsoft.com/kb/2809787:

Consider the following scenario:

You have created a SharePoint 2010 Web Application using NTLM authentication and decided to manage the SharePoint Security using Active Directory Groups.

The AD users are added as members into Security Groups and the groups are granted permissions in SharePoint. You delete one of the groups in Active Directory and re-create it using the exact same name and members.

In this scenario, you may receive the following message when you check a group member’s permissions from 'Check Permissions' control in SharePoint

Permission levels given to USER (DOMAIN\USER)

None

Cause:

SharePoint will not be able identify the group being used due to a change in the security identifier (SID) when you recreate the group. This is an expected behavior, as SharePoint relies on the security identifier (SID) as the unique identity of users and groups, and subsequently a GUID, which is internal to SharePoint.

Resolution:

The "Stsadm -o migrateuser" command will not work for the Active Directory group migration and will fail with "The user does not exist or is not unique" error. You need to use the "Stsadm -o migrategroup" command to change the group SID. Here's the command syntax

Stsadm.exe -o migrategroup -oldlogin -newlogin

Ex: Stsadm -o migrategroup -oldlogin Domain\Group –newlogin Domain\Group

After this you should be able to check permissions correctly, and the users who belong to the affected AD groups should have the permissions set correctly.

I think, in this case we will need to use Stsadm -o migrateuser to update the SID of the user (since it is not a group, and the article is about a group) in Central Administration. If the SID in Central Admin is the same as the SID as in the Configuration Database, i think you will regain access.

Try updating the SID in Central Admin by using

Stsadm.exe -o migrateuser
-oldlogin <DOMAIN\name>
-newlogin <DOMAIN\name>
  • @KristapsVilerts Glad I could be of help :). Thank you for kind words. – TempaC Mar 24 '16 at 9:06
0

below solution worked for me

  1. Click Start, point to Programs, point to Administrative Tools, and then click Services.
  2. In the list of services, locate the MSSQLSERVER service. This service may also be listed as MSSQL$SHAREPOINT.
  3. Note the value of the Status column. If the Status column lists Started, the database server is running. If the Status column is empty, the database server is not running.

  4. To start the database server, right-click the MSSQLSERVER service, and then click Start.

Please check this article for other possible issue http://www.spissue.com/2011/06/can-not-connect-to-configuration.html.

Here it explain all the possible issue you may have while getting this error.

Thanks.

  • 2
    Instead of linking to a page that may become unavailable in the future, please summarize what needs to be done and use the article only as a reference. – Choggo Jan 27 '15 at 13:38
  • Please don’t add just a link as answer to a question. If the link breaks, the answer you provided will not be useful for future visitors. Provide an answer of your own and use the link as reference. If needed, you can block quote the content from your link. More information is found in our help center, especially How do I write a good answer – Benny Skogberg Jan 27 '15 at 16:49
  • Thanks to you all for correcting me, i will try to write full answer in future and sorry if i violate the policy of stackexchange. – vinit kumar Jan 28 '15 at 2:53
0

Sharepoint 2010 Error - Cannot connect to the configuration database.

Got similar error i just ran the following set of commands then it was up in running successfully

stsadm -o setproperty -pn database-connection-timeout -pv 45

psconfig -cmd upgrade -inplace b2b

close the browser and open CA

Ref: https://social.technet.microsoft.com/Forums/en-US/1fd9932f-1c3e-4569-98ed-aac5a4f4dd07/sharepoint-2010-error-cannot-connect-to-the-configuration-database

  • Just a heads up for the site's reviewers: this post has been flagged as an invalid answer. If the reviewers would spend even few seconds for actually reading the answers, one would notice that this among several others being flagged are completely valid answers. – moe May 17 '18 at 5:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.