What does Windows error code 1065 (ERROR_DATABASE_DOES_NOT_EXIST) mean?

 
Previous Next
ERROR_EXCEPTION_IN_SERVICE ERROR_SERVICE_SPECIFIC_ERROR

ERROR_DATABASE_DOES_NOT_EXIST

The requested Service Control Manager database does not exist

OpenSCManager accepts a service-control-manager database name. Current Win32 documentation requires SERVICES_ACTIVE_DATABASE; passing NULL opens that active database by default. ERROR_DATABASE_DOES_NOT_EXIST is therefore about the SCM database selection, not about a missing individual service.

Log the lpDatabaseName value separately from the machine name and service name. Legacy code sometimes carries old database-name abstractions or passes the wrong string in a wrapper that has several adjacent parameters. For a remote call, also keep access/authentication failures separate: those produce different errors. Once the active SCM database is open, use OpenService to resolve an individual service object. Do not create a service because this database-open call failed; the service namespace has not been reached yet.

What to inspect

  • Inspect the exact lpDatabaseName argument passed to OpenSCManager.
  • Use NULL or SERVICES_ACTIVE_DATABASE for the documented active database.
  • Resolve individual service names only after the SCM database handle is valid.

References


Looking for a different code? Search another status or error code.