A State Service Application has no database defined

SharePoint 2019 Health Analyzer A State Service Application has no database defined

In this post, we’re gonna solve A State Service Application has no database defined issue in SharePoint Health Analyzer.

A State Service Application has no database defined

Beside that, we’ll explore the below points:

You might also like to read InfoPath Forms Services forms cannot be filled out in a Web browser because no State Service connection is configured


What’s State Service Application In SharePoint?

State Service Application is used to stores temporary session state information for some of SharePoint components such as

  • InfoPath Forms Services,
  • Exchange Server,
  • Visio Services.

State Service service application can only be configured using PowerShell.

A State Service Application has no database defined

In SharePoint Server, if the State Service Application is not configured properly, the health analyzer will detect “A State Service service application has no State Service database defined” issue.

A State Service Application has no database defined

In this case, you will need to solve this issue to avoid any error that may occur related to the below SharePoint components:

  • InfoPath Web browser forms,
  • SharePoint Chart Web Part.
  • Search Health Reports,
  • Visio Service Comompents,
  • Outgoing email,
  • Publishing functionality for page and workflow ..etc.

You might also like to read InfoPath Forms Services forms cannot be filled out in a Web browser because no State Service connection is configured


[Cause] No database defined in State Service Application

The “A State Service Application has no database defined” issue that raised in SharePoint Health Analyzer usually occurs in case of:

  1. All databases associated with the State Service service application was deleted.
  2. All databases associated with the State Service service application is not created.

[Solution] A State Service Application has no database defined

In this section, we’ll show the details steps to solve “A State Service Application has no database defined” SharePoint Health Analyze issue.

Delete State Service Application in SharePoint

  • Login to the SharePoint Server as a Farm account.
  • Open Central administration as Administrator.
Run Central Administration as Administrator - SharePoint - Devoworx
  • Below Application Management, click on Manage Service Application.
A State Service Application has no database defined
  • Select State Service Application.
State Service Application in SharePoint
  • Click Delete from the Ribbon.
Delete Service Application in SharePoint
  • Check Delete data associated with the service application.
delete SharePoint Service Application

Note: This action cannot be undone and any local or remote web applications consuming this service application will not be able to use them any longer

Create State Service Application in SharePoint Using PowerShell

  • Open SharePoint Management Shell as an administrator.
Run SharePoint Management Shell as Administrator
  • Create a New State Service Application with its proxy by typing the following cmdlets one by one.
$serviceApp = New-SPStateServiceApplication -Name "State Service Application"
New-SPStateServiceDatabase -Name "SharePoint_Service_StateDB" -ServiceApplication $serviceApp
New-SPStateServiceApplicationProxy -Name "State Service Application Proxy" -ServiceApplication $serviceApp -DefaultProxyGroup

State Service service application has only one database that its default name is StateService_GUID.

  • Go back to the Central Administration > Monitoring > Review problems and solutions.
Review problem and solutions
  • Click on the error.
  • From the above ribbon > Select the Reanalyze Now.
Reanalyze Now SharePoint Health Analyzer
  • Go back to Health Analyzer Reports list, you will note that the “A State Service Application has no database defined” issue is gone!

SharePoint Health Analyzer has detected some critical issues that require your attention. View these issues.

In this section, you can find the solutions list for the common SharePoint Health Analyzer critical issues.


Applies To
  • SharePoint 2019.
  • SharePoint 2016.
  • SharePoint 2013.
  • SharePoint 2010.
Conclusion

In conclusion, we have learned how to overcome and avoid the “A State Service Application has no database defined” SharePoint Health Analyzer issue. Also we have learned how to create a State Service Application in SharePoint using PowerShell.

You might also like to read
Have a Question?

If you have any related questions, please don’t hesitate to Ask it at deBUG.to Community.

1 thought on “A State Service Application has no database defined”

  1. Pingback: Database is in compatibility range and upgrade is recommended in SharePoint | SPGeeks

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top