Export (0) Print
Expand All
Expand Minimize

A State Service Application has no database defined (SharePoint 2013)

 

Applies to: SharePoint Server 2013, SharePoint Foundation 2013

Topic Last Modified: 2013-12-18

Summary: Learn how to resolve the SharePoint Health Analyzer rule "A State Service Application has no database defined."

Rule Name:   A State Service Application has no database defined

Summary:   A State Service service application has no State Service database defined. This may result in errors when using some SharePoint components such as InfoPath Web browser forms and the Microsoft SharePoint Server Chart Web Part.

Cause:   One or more of the following might be causing this:

  • The farm administrator deleted all databases associated with the State Service service application.

  • The farm administrator never created or associated a database with the State Service service application.

Resolution:   Create a new database or use an existing database for the State Service service application by using Windows PowerShell
  1. Verify that you have the following memberships:

    • securityadmin fixed server role on the SQL Server instance.

    • db_owner fixed database role on all databases that are to be updated.

    • Administrators group on the server on which you are running the Windows PowerShell cmdlets.

    An administrator can use the Add-SPShellAdmin cmdlet to grant permissions to use SharePoint 2013 Products cmdlets.

    NoteNote:
    If you do not have permissions, contact your Setup administrator or SQL Server administrator to request permissions. For additional information about Windows PowerShell permissions, see Add-SPShellAdmin.
  2. Start the SharePoint 2013 Management Shell.

    • For Windows Server 2008 R2:

      • On the Start menu, click All Programs, click Microsoft SharePoint 2013 Products, and then click SharePoint 2013 Management Shell.

    • For Windows Server 2012:

      1. On the Start screen, click SharePoint 2013 Management Shell.

        If SharePoint 2013 Management Shell is not on the Start screen:

      2. Right-click Computer, click All apps, and then click SharePoint 2013 Management Shell.

    For more information about how to interact with Windows Server 2012, see Common Management Tasks and Navigation in Windows Server 2012.

  3. If no database already exists that you can use, type the following command at the Windows PowerShell command prompt:

    New-SPStateServiceDatabase -Name <DatabaseName> -DatabaseServer <ServerName> [-DatabaseCredentials <Credential>] [-ServiceApplication <ID>]
    

    Where:

    • <DatabaseName> is name of the database as a String.

    • <ServerName> is name of the database server.

    • <Credential> is SQL Server authentication credentials for the database. If this parameter is not used, Windows authentication will be used.

    • <ID> is the identifier for the State Service service application as a string or a GUID. If there is only one State Service service application, you do not have to specify this parameter.

  4. In some environments, you must connect to an existing, empty SQL database. In this case, type the following command at the Windows PowerShell command prompt:

    Mount-SPStateServiceDatabase -Name <DatabaseName> -DatabaseServer <ServerName> [-DatabaseCredentials <Credential>] [-ServiceApplication <ID>]
    

    Where:

    • <DatabaseNname> is name of the database as a String.

    • <ServerName> is name of the database server.

    • <Credential> is the SQL Server authentication credentials for the database. If this parameter is not used, Windows authentication will be used.

    • <ID> is the identifier for the State Service service application as a string or a GUID. If there is only one State Service service application, you do not have to specify this parameter.

For more information, see Mount-SPStateServiceDatabase or New-SPStateServiceDatabase.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft