In this post, we’re gonna solve A State Service Application has no database defined issue in SharePoint Health Analyzer.
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
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.
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:
- All databases associated with the State Service service application was deleted.
- 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.
- Login to the SharePoint Server as a Farm account.
- Open Central administration as Administrator.
- Below Application Management, click on Manage Service Application.
- Select State Service Application.
- Click Delete from the Ribbon.
- Check Delete data associated with the 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
- Open SharePoint Management Shell as an 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.
- Click on the error.
- From the above ribbon > Select the Reanalyze Now.
- Go back to Health Analyzer Reports list, you will note that the “A State Service Application has no database defined” issue is gone!
In this section, you can find the solutions list for the common SharePoint Health Analyzer critical issues.
- Health Analyzer Issue: Product/patch installation or server upgrade required.
- Accounts used by application pools or service identities are in the local machine Administrators group in SharePoint Health Analyzer.
- Missing server side dependencies issue within Health Analyzer in SharePoint Server 2013.
- SharePoint Health Analyzer detected an error.
- Database running in compatibility range and upgrade recommended in SharePoint.
- Database is in compatibility range and upgrade is recommended in SharePoint.
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.
Pingback: Database is in compatibility range and upgrade is recommended in SharePoint | SPGeeks