ECGpro's SQL instance may not be running for a number of reasons. The SQL instance may fail to install/run. Slow computers with mechanical hard drives, slow processors, or bloated software configurations can also cause issues where services start out-of-order or fail to start entirely when the computer boots up. Windows Update can also prevent SQL instances from running on the first attempt after the update/reboot cycle.
When AMEDTEC ECGpro is installed, the Windows service SQL Server (AMEDTEC) needs to start for the patient database to operate. When this service has failed to start, a database login prompt will be shown when AMEDTEC ECGpro is started. If one attempts to login to the database, the login will fail as the database is not running.
LEMR Client also attempts to update AMEDTEC ECGpro settings when LEMR Client is started. In order to do this, LEMR Client opens AMEDTEC ECGpro in the background. LEMR Client is configured to start with windows by default. If the SQL Server (AMEDTEC) service is not started before LEMR Client attempts to update, AMEDTEC ECGpro will fail to start properly. The database login screen will be displayed and LEMR Client will not be able to update ECGpro's settings. LEMR Client's start-up procedure will be halted.
It is worth checking if the AMEDTEC SQL instance is running on your computer. If this is a new installation on a PC, chances are that the SQL Server instance failed to install when installing ECGpro. Please check for the service shown in the screenshot below on the affected conputer:
If the SQL instance is not there, please have your IT people review this article for assistance on solving the problem: https://wiki.lemr.com/en/support/technical-support/mssqlserver
The cause of this specific issue is usually due to the SQL instance having failed to install at all.
If the service is in the list, though it is not running, AND you can start the instance manually without issue, first adjust the service to restart after a failure then restart the PC and try again.
Setting the SQL Server (AMEDTEC) service to Automatic (delayed start) increases the chances of it starting up correctly on slower/older hardware. It is more likely to start after other services that it depends on. It's important that you configure LEMR Client to start after the AMEDTEC MSSQL service starts up. See Use a batch script to delay startup of LEMR Client.
If you'd like to set a dependency for the SQL instance instead of setting delayed start, it can easily be done from an elevated command prompt using the sc command. The syntax is:
sc config [service name] depend= <Dependencies(separated by / (forward slash))>
Note: There is a space after the equals sign, and there is not one before it.
Warning:
depend=parameter will overwrite existing dependencies list, not append. So for example, if ServiceA already depends on ServiceB and ServiceC, if you rundepend= ServiceD, ServiceA will now depend only on ServiceD.
Examples:
Dependency on one other service:
sc config ServiceA depend= ServiceB
Above means that ServiceA will not start until ServiceB has started. If you stop ServiceB, ServiceA will stop automatically.
Dependency on multiple other services:
sc config ServiceA depend= ServiceB/ServiceC/ServiceD/"Service Name With Spaces"
Above means that ServiceA will not start until ServiceB, ServiceC, and ServiceD have all started. If you stop any of ServiceB, ServiceC, or ServiceD, ServiceA will stop automatically.
To remove all dependencies:
sc config ServiceA depend= /
To list current dependencies:
sc qc ServiceA
This method is great if you know what service hadn't yet started that the SQL instance needs to run... Then the service won't try to start until that other service had started...
1. Download this batch script:
/utility/delayedstartrunlemr.bat
@echo off
color 2f
title DO NOT CLOSE THIS WINDOW
cls
goto WAIT
:WAIT
cls
echo.
echo ## DO NOT CLOSE THIS WINDOW ##
echo.
echo Waiting for Amedtec SQL database to start before LEMR can run...
echo Call LEMR Support if it does not go away on its own within 5 minutes of system startup
timeout /t 3 > NUL
for /f "tokens=4" %%s in ('sc query MSSQL$AMEDTEC ^| find "STATE"') do if NOT "%%s"=="RUNNING" goto WAIT
cls
echo.
echo ## DO NOT CLOSE THIS WINDOW ##
echo.
echo Amedtec SQL database service is now running! Starting LEMR...
Start "LEMR Client" /D "C:\Program Files\LEMR" "C:\Program Files\LEMR\LEMRClient.exe" -m
echo.
echo Done!
exit
2. Stop LEMR from auto-starting itself in the settings for LEMR.
Adjust setting in LEMR to stop it from starting with Windows
Registry Key Location: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
3. Set this script to run for all users startup by placing the batch file itself into:C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp
Be sure to "unblock" the catch script first so Smart Screen doesn't have issues with it. The script will start LEMR minimised by using the -m command.
4. Then set the Amedtec SQL Server instance service to Automatic (Delayed Start).