xylonxx-163 avatar image
0 Votes"
xylonxx-163 asked ElsieLu-MSFT commented

SharePoint database admin account accidentally deleted

The SharePoint database admin accidentally deleted. How to reinstate this admin account?

I created a new account with db_owner in database. But looks like it was not setup properly.

It shows below error while open the site:
"This operation can be performed only on a computer that is joined to a server farm by users who have permissions in SQL Server to read from the configuration database. To connect this server to the server farm, use the SharePoint Products Configuration Wizard, located on the Start menu in Microsoft SharePoint 2010 Products"

It shows below error in even log:
"There is a compatibility range mismatch between the Web server and database “”, and connections to the data have been blocked to due to this incompatibility. This can happen when a content database has not been upgraded to be within the compatibility range of the Web server, or if the database has been upgraded to a higher level than the web server. The Web server and the database must be upgraded to the same version and build level to return to compatibility range"

It shows below error while try to get-spfarm:
"Cannot access the local farm. Verify that the local farm is properly configured, currently available, and that you have the appropriate permissions to access the database before trying again".

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I'm looking into your issue now and I will reply you as soon as possible.

0 Votes 0 ·

1 Answer

ElsieLu-MSFT avatar image
0 Votes"
ElsieLu-MSFT answered ElsieLu-MSFT commented

Hi @xylonxx-163 ,welcome to Q&A forum!

Did you delete the SQL server service account by mistake? To change the service account, you could follow the main steps below:

  1. Add new accounts in the Active Directory Domain Services.

  2. Configure the service account in SharePoint center administration.

  3. Change SharePoint Central Administration Account.

  4. Change the service account in the application pool, services in services.msc and service application.

Please refer to this thread for more details:
Sharepoint 2016 service account change

Initial deployment administrative and service accounts in SharePoint Server

If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

If the Central admin page is not showing database upgrade required, its more likely permissions issue. Make sure the farm account, app pool account have required rights on database.
To rule out permissions issue make farm account, admin account , app pool account as dbOwner and check again.

0 Votes 0 ·

@UmrF , thanks for the reply.

yes, it looks like a permissions issue. Please advise what general role should be granted, except db_owner? We've granted db_owner role to such account but still not work.

0 Votes 0 ·

Hi @ElsieLu-MSFT, thanks a lot for the quick response. Please kindly refer below and looking forward to have your comments.

It is not the service account but database account, which is the farm admin to build and configured in database.

We tried to reproduce it in another place and found one difference:

1. In another place, it is working well if to create account first then grant role access in next step, two steps performed separately

2. For current issue case, it is to create account and grant role permission in one step

It looks like there will be permission inherited for #1. The new created account will inherit previous role setting. But for #2 issue case, the permission will be erased if to perform role setting in one step.

One note, this account was configured as windows authentication.

0 Votes 0 ·

Hi @xylonxx-163 , sorry for the delay.

If you delete the farm admin account by mistake, check this related document for the correct permissions:
Account permissions and security settings in SharePoint Servers

0 Votes 0 ·