SQL Server database login failed - Event 3351 (SharePoint 2010 Products)


Applies to: SharePoint Server 2010, SharePoint Foundation 2010

Alert Name:   SQL Server database login failed

Event ID:   3351

Summary:   Microsoft SharePoint Foundation uses Microsoft SQL Server 2008 databases to store most of the content for SharePoint Foundation Web sites and configuration settings, and uses a service account to communicate with the database on behalf of a user request. Note that a Web application might be associated with one or many databases. This error — SQL Server database login failed — means that SharePoint Foundation cannot log on to SQL Server 2008 by using the specified service account user name and password.

Symptoms:   The following symptom might appear:

  • This event appears in the event log: Event ID: 3351 Description: SQL database login failed. Additional error information from SQL Server is included below.

Cause:   The user name or password for the Microsoft SharePoint Foundation service account was invalid before the session or became invalid during the session.


You must be a member of the Farm Administrators SharePoint group to perform the following procedures.

Resolution:   Grant correct permissions to the database access account

  • To resolve this issue, assign the database access account and then verify that the account has correct permission in SQL Server.

    To assign the database access account:

    1. On the Central Administration Web page, on the Quick Launch, click Security, and in the General Security section click Configure service accounts.

    2. In the Credential Management section, in the upper drop-down list click the correct Web application pool for your Web application.

    3. In the Select an account for this component drop-down list, click the domain account with which you want to associate this Web application pool, or click Register new managed account to associate a new domain account with this application pool.

    4. Click OK to save changes.

    To verify that the account has correct permissions in SQL Server:

    1. Connect to the computer that is running SQL Server by using an account with Administrator permissions.

    2. In SQL Server Management Studio, in the Object Explorer navigation pane, expand the Security node, and then click the Logins node. The name of the database access account indicates that it is a SQL login.

    3. If the account exists, in the Object Explorer navigation pane, expand the Databases node, expand the configuration database node (for example, WSS_Config), expand the Security node, and then click Roles.

    4. Expand the Database Roles node, right-click db_owner, and select Properties.

    5. In the Database Roles Properties dialog box, check whether the database access account is in the Members of this role list. If the account is not listed, click Add.

    To verify that any database issues have been resolved:

    1. In the SharePoint Management Shell, run the Windows PowerShell command Get-SPSite | Format-Table -Property ID,WebApplication,ContentDatabase to obtain a list of the sites for each Web application to list all sites in the various databases, and locate one site in each database.

    2. Browse to the site.