SharePoint database admin account accidentally deleted

xylonxx-163 1 Reputation point
2021-10-24T15:18:44.493+00:00

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".

SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
3,272 questions
SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,629 questions
SharePoint Server Management
SharePoint Server Management
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Management: The act or process of organizing, handling, directing or controlling something.
2,991 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Elsie Lu_MSFT 9,796 Reputation points
    2021-10-25T09:08:30.243+00:00

    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

    Reference:
    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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.