Symptom: After the server machine is rebooted, the Wasp Inventory Windows Service is not always able to start properly. When it is manually started, it does start without error.
Cause: Windows attempts to start all Automatic services at the same time. If something happens that causes SQL Server to not start properly, or just slows it down so the Wasp Inventory Windows Service is starting before SQL Server, then Wasp Inventory Windows Service will not be able to connect with the database, and will drop back to a Stopped status.
Resolution: Two things can be done to try to alleviate this issue:
First, go to Start > Services, right-click Wasp Inventory Windows Service, and go to Properties. Set the Startup Type to Automatic (Delayed Start) and click OK.
The second slightly more complex step is as follows:
Go back to the Start menu and in the Search box type cmd.exe. When it appears in the list, right-click on it and select Run as administrator.
In the black command prompt window that appears, enter (or copy/paste) this command*:
sc config WaspInventoryWindowsService depend=mssql$waspdbexpress
It should respond "[SC] ChangeServiceConfig SUCCESS".
What this will do is firstly set the Wasp Inventory Windows Service to wait for 2 minutes after all of the other automatic services have started before it attempts to start, and secondly to not start until after SQL Server (WASPDBEXPRESS) is started, which should ensure that when it does start, SQL will be ready for it to log in.
The only downside to this is that it means if you restart the machine, you won't be able to immediately re-open the InventoryControl program. You will have to wait about 3 minutes to allow everything to get started before it is ready for you to run the program.
*If you have the Enterprise edition and your database is in the default SQL instance or a different named instance, you will need to find the correct service name to replace "mssql$waspdbexpress" in this command. You can get that by going to the Services list, right click on the SQL Server service and go to Properties. The Service Name shown there is what needs to be entered into the command.