QuickBooks Database Server Unable to Start (Started and then Stopped)

Symptoms

When attempting to start the database server service, the service throws an error:

“The QuickBooksDB[X] service on local computer started and then stopped. Some services stop automatically if they are not in use by other services or programs”

When you attempt to scan for files in with the QuickBooks Database Server Manager it is unable to resolve network issues due to the service being stopped.

Error

The QuickBooksDB[X] service can only start when the DNS Server Service is not running. I’m frankly not quite sure why this is required, but the issue has been unresolved by Intuit for quite some time.

Solution

  1. Stop the DNS Server service (Stop-Service “DNS”).
  2. Start the QuickBooks service (Start-Service “QuickBooksDB[X]”) *substitute X for your version #.
  3. If started successfully, start the DNS Server service (Start-Service “DNS”). If the QB service fails to start, you may have another issue on your hands.

To resolve this issue permanently, I built a quick PowerShell script that is run every X minutes on our servers to minimize the user downtime and technician involvement. You can find the code on Github and below.

$QB = Get-Service -Name QuickBooks* | Sort-Object | Select-Object -First 1 -ErrorAction Ignore
$DNS = Get-Service -Name DNS -ErrorAction Ignore

If (($DNS -eq $null) -or ($QB -eq $null)){
    Exit
}

If ($QB.Status -eq "Running"){
    Exit
}

If ($QB.Status -eq "Stopped") {
    If ($DNS.Status -eq "Stopped"){
        Start-Service $QB, $DNS
    }ElseIf ($DNS.Status -eq "Running"){
        Stop-Service $DNS
        Start-Service $QB, $DNS
    }
}

$QB = Get-Service -Name QuickBooks* | Sort-Object | Select-Object -First 1 -ErrorAction Ignore
$DNS = Get-Service -Name DNS -ErrorAction Ignore

If (($QB.Status -eq "Stopped") -or ($DNS.Status -eq "Stopped")){
    Write-Host "Services were unable to start. Manual check required."
}