Error code 6398 - seen after Failed configuration run

Tevon 35 Reputation points
2023-05-02T20:42:26.7866667+00:00

I tried the guidance below in order to resolve this issue however when trying to follow the steps I got the error message "Add member failed for databaseRole 'db_securityadmin' (An exemption occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

Cannot use the special principal 'dbo' (Microsoft SQL Server, Error: 15405)

The guidance I followed below:

According to the information provided by the log, the problem should be that the operating account does not have the permission of the database. Any SharePoint service account that needs to access the SQL database needs Security Administrator and DBCreator permissions on the SharePoint related database.

  1. Open SQL server management studio, expand Security-Logins, right-click the account you are using, select Properties, and then click Server Roles to ensure that "dbcreator", "public", "securityadmin", and "sysadmin" are checked. Then click on User Mapping, click on the corresponding database ("WSS_Content_LGPORTAL"), and make sure that in the following Database role membership for: "WSS_Content_LGPORTAL" section, "db_owner", "db_securityadmin", and "public" are checked.

User's image

  1. Then, verify that the SharePoint service account has security administrator and dbcreator permissions set for the SharePoint database.

User's image

Expand Security-Server Roles, right-click securityadmin and dbcreator respectively, and make sure the accounts belong to them.

User's image

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,387 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,116 questions
SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,606 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,623 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,967 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Erland Sommarskog 113.3K Reputation points MVP
    2023-05-02T21:16:56.4266667+00:00

    It seems that the login AMY\spfarm is member of sysadmin. This means that this login maps to dbo in all databases. You cannot add dbo to a fixed database role. And it does not make much sense to do so, since dbo is almighty in the database. Just like sysadmin is on the entire server.

    I don't know Sharepoint, so I don't know this instruction. Maybe there is some context missing. But what you have quoted makes little sense to me, because, as I said, if you are sysadmin, you are almighty and you don't anything more.

    0 comments No comments

  2. Yanli Jiang - MSFT 27,566 Reputation points Microsoft Vendor
    2023-05-04T07:44:31.56+00:00

    Hi Tevon,

    It should because you are connected as a sysadmin, you are also the dbo of the database. You cannot add dbo as a member of any fixed role. dbo already has the permissions of db_datareader and db_datawriter.

    Or you can try to change the owner of the database.


    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.