Поделиться через


A State Service Application has no database defined (SharePoint Server 2010)

 

Применимо к: SharePoint Foundation 2010, SharePoint Server 2010

Последнее изменение раздела: 2010-06-23

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 meet the following minimum requirements: См. статью Add-SPShellAdmin.

  2. On the Start menu, click All Programs.

  3. Click Microsoft SharePoint 2010 Products.

  4. Click SharePoint 2010 Management Shell.

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

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