In order to avoid a trouble like this, keep the database alive till the moment when DE server has stopped completely.
NB. In case DE server operates under MS Windows, sometime a Windows service is shown as stopped while the actual process is still running - check Windows Task Manager to make sure that the 'service.exe' process related to DE application is not presented on the list (you might have more than one service.exe running but the properties of the process will show belong to what application it is).