Sage 50 · Database Engine

How to Fix Sage 50 Pervasive Database Error

Sage 50 will not open, throws Pervasive Status Code 2, or reports that the database engine is unavailable. The program is running, but it cannot reach its own data.

At QuickFix Bookkeeping, the thing to understand first: Pervasive is not part of Sage 50. It is a separate database engine, now called Actian PSQL, that Sage 50 depends on. When it stops, Sage 50 looks broken but is fine. You are fixing a Windows service, not your accounting software, and your company data is almost never at risk.

What Causes Pervasive Errors

Service stopped

The PSQL engine service is not running. A Windows update or a failed Sage update commonly stops it and never restarts it.

Engine corrupted

The PSQL installation itself is damaged, so the service starts and immediately dies.

Firewall blocking ports

On a network, the workstation cannot reach the engine on the server because the firewall closed its ports.

Stale lock file

A corrupted ~pvsw~.loc file in the company folder still points at a server or session that is gone.

How to Fix Sage 50 Pervasive Database Error

METHOD 1Restart the Pervasive ServiceFixes the majority of cases
1

Close Sage 50 on every machine first. On a network, do this at the server before touching any workstation.

2

Press Windows + R, type services.msc, and press Enter.

3

Find Pervasive PSQL Workgroup Engine or Actian PSQL. Right-click and select Restart. If Restart is greyed out, the service is stopped, so select Start instead.

4

Make it self-heal. Double-click the service, open the Recovery tab, set First failure and Second failure to Restart the Service, and set Reset fail count after 1 day. This stops the same outage recurring silently.

METHOD 2Restart the Engine From Command PromptWhen the service list will not cooperate
1

Open Command Prompt as Administrator. Right-click it in the Start menu and choose Run as administrator, or the commands will fail silently.

2

Type sc stop psqlwge and press Enter. Wait for it to confirm, then type sc start psqlwge and press Enter.

3

If a process is stuck holding the engine, end W3DBSMGR.exe in Task Manager first, then start the service again.

METHOD 3Delete the Stale Lock FileDatabase engine unavailable
1

If the message names your computer and says the database engine is unavailable, a stale lock file is usually the cause.

2

Close Sage 50, browse to your company folder, and delete ~pvsw~.loc. Reopen Sage 50 and it rebuilds the file. This deletes a lock marker, not your data, so your .SAI file and .SAJ folder are untouched.

METHOD 4Repair or Reinstall the PSQL EngineService dies on start
1

Back up your company data first. Copy the .SAI file and the .SAJ folder somewhere safe before touching the engine.

2

Go to Control Panel, Programs and Features, find Actian PSQL, and choose Repair. Restart the machine and try Sage 50 again. Repair alone resolves most corrupted-engine cases.

3

If Repair fails, reinstall the engine from the Sage installation folder. Open the PervasiveMin folder inside your Sage 50 program directory, run the installer, choose Run as a Service and Complete installation, then restart.

Common Pervasive Status Codes

CodeMeaningStart With
Status 2File not found, or the engine cannot reach itMethod 1, then check the data path
Status 84Microkernel already in use, a lock conflictMethod 2
Status 116Session table full, too many connectionsRestart the server, then Method 1
Status 3012Local engine not accessible to the routerCheck firewall and network config
Status 3014Insufficient rights to access the fileFix folder permissions on the company folder

The Windows Update Trap

A large share of Pervasive failures appear the morning after a Windows update, because the update stops the PSQL service and never brings it back. If Sage 50 worked yesterday and not today, and nothing else changed, go straight to Method 1 and set the Recovery options so it restarts itself next time.

Related Sage 50 Guides

Engine Keeps Dying After Every Restart?

Let QuickFix Bookkeeping Repair Your Sage 50 Database.

A Pervasive service that will not stay running usually means a corrupted engine install, blocked ports, or a permissions fault on the company folder. Our Sage-certified team finds and clears the real cause.

Book a Free 30-Minute Consultation

No obligation. Same-day response.