Skip to content

Fix Sage 50 Error Connecting to Database

Sage 50 Error Connecting To Database

Sage 50 cannot connect to its database because of underlying errors. If the Actian service isn’t running in the first place, then Sage 50 won’t be able to communicate with the data file, leading to the error. Further, various security programs such as Windows Firewall can cause this error. In rare cases, incorrect data path and program path in Sage 50 can lead to failure of communication with the database. When trying to fix this issue, it is important to proceed methodically so that you can eliminate underlying causes while troubleshooting the error.

In this post, you’ll learn how to fix the Sage 50 errors connecting to the database.

Error: “Sage 50 cannot connect to its database, Actian Zen on computer [server].”

About Sage Sage 50 Error Connecting to Database

Error Code:Error Connecting To DatabaseDeveloper:Sage Group
Error Description:“Sage 50 cannot connect to its database, Actian Zen on computer [server].”Software:Sage 50
Symptoms:The file was left open in the backgroundApplies to:Windows 10 and 11
Cause:Connection Manager is not properly installed or the service has not started on a server.Solution:The client has to ensure that the configuration of Sage 50 server firewall data is done correctly.

Causes of Sage Error Connecting to Database:

Sage 50 Error Connecting to Database can occur because of a few reasons if the backup is still not completed and a file was left open in the background.

For more information details are mentioned below:

  • The SAJ folder must have a read-only attribute.
  • The Antivirus service is detecting mysqld.exe, myself-nt.exe, or Connection Manager service as threats and thus sent to quarantine.
  • Windows Firewall service is probably blocking the Connection Manager which as a result is not able to connect to the database engine.
  • .NET Framework can also create conflicts.
  • Connection Manager is not properly installed or the service has not started on a server.
  • There can be issues with permission with the shared data location on a server.
  • Using a UNC address can also cause issues.
  • Corrupted data can bring problems connecting to the database.
  • If SAJ and SAI are stored in Dropbox, Google Drive, or OneDrive then it can create conflicts
  • The Actian Zen has Stopped on the Server
  • The Network Location Profile on the Server or Workstation has been set to Public instead of Private
  • The Data path on the Workstation is Incorrect

Solutions for Sage 50 Error Connecting to the Database

Let’s get started with the solutions. Proceed with each solution in the order provided so that you can eliminate the underlying causes of the error. Also, you will require admin rights to perform many of the actions in these solutions, so use an admin account in Windows to fix this error.

Solution #1: Verify the Data Path

An incorrect data path can prevent Sage 50 from accessing the data when you launch the program. The result of this is the Sage 50 error connecting to the database. However, you can verify that the data is stored in the correct data path to fix this problem. 

A. Steps to locate the company file directory:

  • Steps for locating an open company file:
    1. Click on Maintain from the main menu.
    2. Choose company information.
    3. Click on Directory to find the location of your company file.
  • Steps to locate a remote data access company.
    1. Choose the Systems option from the left panel.
    2. Choose Company Maintenance.
    3. Note down the location of the company file.
  • Steps to locate from the New Company screen:
    1. Go to the File option.
    2. Choose Open Company.
      Note: all company files will be listed here.
    3. Choose Open an existing company file.
    4. Note down the location from the Directory column.
  • Steps to locate with file search in Windows:
    1. Open File Explorer.
    2. Click on the Search field in the top right corner of the window.
    3. Choose All Files and Folders.
    4. Input COMPANY.DAT and hit enter.
    5. Choose Detail as the view option for Windows Explorer.
    6. Note the location of the company file from the Folder column.
  • Steps to locate company files through Windows registry.
    1. Press Windows + R.
    2. Input Regedit and hit enter.
    3. From the left panel, browse to HKEY_CURRENT_USER\Software\Peachtree\Version.
    4. Expand the key for your version of Sage 50.
    5. Choose Open History.
    6. Choose the flavor folder beneath the open history option.
    7. From the right panel, note down the location of the company file available in the Data column.
    8. Close the Registry Editor.

B. Steps to locate the data and program paths for the Sage 50 company file:

  1. Open the File Explorer.
  2. Go to C:\ProgramData\Sage\Peachtree.
  3. Double-click on the Configuration File for Sage 50.
  4. Choose Notepad as the program and hit OK.
  5. Find DATAPATH=, and note down the data path of the company file.
  6. Find PROGRAMPATH=, and note down the program path of Sage 50.

Solution #2: Change Network Profile to Private

When you install Sage 50 the first time, the installer configures windows firewall to not block connections for Sage 50. However, if you’ve set the Sage 50 network to the public, then the firewall rules created by the installer won’t work as intended. So you need to set the network as private for Sage 50.

A. Steps to change network profile to fix Sage 50 error connecting to the database:

  1. Go to the Start menu and open the Control Panel.
  2. Go to Network and Internet Settings.
    • If you’ve set your network as Public, then go to the Properties option, and change it to Private.
    • If you’ve set your network to private, then don’t make any changes.
  3. Go to the Network Profile option, and choose Private.
  4. Go back and click on Settings.
  5. Choose Test connectivity.
  6. Try to open the company file.

If you still get the Sage 50 error connecting to the database, then move on to the next solution.

Solution #3: Create Firewall Rules for Sage 50

Creating custom firewall rules is an easy method to quickly create exceptions for Sage 50. When Sage 50 can connect to the company file, you don’t get the Sage 50 error connecting to the database. 

Note: you need admin rights to make custom firewall rules in windows. Further, you’ll require advanced knowledge of the operating system so that you can follow through with these instructions.

Steps to create firewall rules for Sage 50:

  1. Go to the Start menu.
  2. Type in Windows Defender firewall.
  3. From the left panel, choose Advanced Settings.
  4. Choose Inbound Rules from the left pane.
  5. Choose New from the right pane.
  6. Choose Port, then Next.
  7. Input the Port numbers for your version of Sage 50. Then click on Next.
  8. Choose to Allow the connection, then Next.
  9. Set the Domain option as Private, and click on Next.
  10. Input “Sage 50 accounting inbound”, then select Finish.
    Note: if you don’t input a descriptive name for the rule, you may not be able to identify the rule in the future.
  11. Follow the same steps to create an Outbound rule for Sage 50.

With both inbound and outbound rules, you have created an exception for Sage 50, so now it can connect to the company file stored on a separate server.

Solution #4: Reinstall Actian on the server.

Action is the database management system that manages the data in Sage 50 company files. Whenever you perform a task in Sage 50, Actian communicates the changes to the database and stores the required changes. If Actian files are damaged, you’re going to get the Sage 50 error connecting to the database because Sage 50 relies on Actian to communicate with the database.

A. Steps to uninstall Actian from your server.

  1. Close all instances of Sage 50 running on your server.
    Note: ask all users to log out before you close Sage 50; otherwise, the changes made to data won’t be stored.
  2. Press Windows + R and enter AppWiz.cpl in the input box. Hit Enter.
  3. In the Programs & Features window, right-click on Actian PSQL v13 Workgroup R2.
  4. Choose Uninstall and follow the on-screen instructions to remove Actian from Windows.
  5. Go to the C Drive and delete the pvswarch and pvsw folders.
  6. Further, delete the pvsw.log file and PSQL_v[version number os Sage 50]_Install.log file.
  7. Remove the Pervasive Software folders from Program Files and Program Files (x86) folders.
  8. Press Windows + R input regedit, and hit enter.
  9. Right-click on Computer, then choose Export to save a backup of your registry, which may be required later if something doesn’t work properly.
  10. Browse to HKEY_LOCAL_MACHINE\Software and delete the Pervasive Software and PEYX489ZK.
  11. Exit Windows Registry Editor.

B. Steps to reinstall Actian in Windows:

  1. Press Windows + E to launch File Explorer.
  2. Go to C:\Sage\Sage50_[version] or the custom location that you chose to install the software in.
  3. Go to the PervasiveMin folder and launch the SetupGroup32_x82.exe. Then click on Next.
  4. Accept the terms of service, then click on Next.
  5. Click on Complete, then Next.
  6. Choose Install, then Finish after the installation finishes.

You’ve successfully reinstalled Actian, the primary database management system used by Sage 50. If any Actian files were damaged, they would have been repaired by now. So you can go to Sage 50 and open your company file.

Solution #5: Check for Damage to the WMI File

WMI files are necessary for Windows to run various functions. If the file is damaged, various script languages won’t run on Windows. Damage to a WMI file can be one reason for getting the Sage 50 error connecting to the database.

Steps to check if the WMI file is damaged:

  1. Press Windows + R.
  2. Input eventvwr and hit enter.
  3. Go to Windows Logs, then choose Application.
  4. View references for WMI files.
  5. Contact our IT professionals if you find WMI files mentioned in the error logs.

Solution #6: Change Preference for Internet Protocol

IPv6 can break some of the components in Windows, so you need to set IPv4 as the preferred network protocol on Windows. Changing the settings from Registry is easier because it requires less number of steps.

A. Steps to change network protocol preference from IPv6 to IPv4:

  1. Log into the Windows user account as an admin.
  2. Press Windows + R.
  3. Input Regedit and hit enter.
  4. From the left pane, navigate to HKLM\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters.
  5. Create a New Key in this location.
  6. Input the following information:
    • Key: DisabledComponents
    • Type: REG_DWORD
    • Value: 0x20

You’ve successfully disabled IPv6 in windows, so Sage 50 will now rely on the IPv4 connection protocol to connect to the company file stored on the server.

Alternatively, you can use another company file to search for the data path and program path in Sage 50.

B. Steps to find program and data paths from Sage 50:

  1. Open Sage 50 and choose a Local Company File.
  2. Go to File, then click on Open Company.
  3. View the window in full screen and note down the directory.
  4. Go to the Desktop screen.
  5. In the Start menu, type in Sage 50.
  6. Right-click on the sage 50 icons.
  7. Choose Properties and note down the directory.

Note: Compare both the data path and program path. If they differ, move the data file to the correct location and then try to launch Sage 50. You can also move the program path, but that is a very long process.

alternative solutions to fix Sage 50 Error Connecting to Database

Uninstall and Reinstall Actian

Steps to reinstall Pervasive if the service doesn’t work correctly:

  1. Close all instances of Sage 50 on your server computer and on connected workstations.
  2. Press Windows + R and input AppWiz.cpl in the input box. Hit Enter.
  3. Choose Programs & Features.
  4. Choose Actian PSQL v13 Workgroup R2.
  5. Choose uninstall and follow the on-screen instructions to remove the program.
  6. Go to the C drive.
  7. Search for folders titled pvsw and pvswarch, and delete them both.
  8. Go to the following locations and rename the Pervasive folder to Pervasile_Old.
    1. C:\Program Files (x86)
    2. C:\ProgramData
  9. Press Windows + R and input regedit, then hit Enter.
  10. Right-click on Computer and choose Export.
  11. Save a backup of your Registry to your desktop.
  12. Go to the following location in the registry: HKEY_LOCAL_MACHINE\Software or HKEY_LOCAL_MACHINE\Software\Wow6432Node.
  13. Delete the following:
    1. Pervasive Software
    2. PEYX489ZK
  14. Close the Registry Editor.
  15. Install Pervasive/Actian using the following steps:
    1. Go to C:\Sage\Sage50_[version].
    2. Go to the PervasiveMin folder.
    3. Double-click on SetupWorkgroup32x86.exe.
    4. Choose Next, then agree to the terms and conditions.
    5. Choose Next, then select Run as Service.
    6. Click on Next then Complete.
    7. Choose Next, then Install, then Finish.

Mapped the drive using IP Address

  1. Open File Explorer and click on “This PC” in the left sidebar.
  2. Click on “Computer” in the top menu and select “Map network drive.”
  3. In the “Drive” field, select a letter for the drive you want to map.
  4. In the “Folder” field, enter the IP address of the network location you want to map, followed by the folder path. For example, if the IP address of the network location is “” and the folder you want to map is “shared,” the field should contain “\\shared”.
  5. Check the box for “Connect using different credentials” if the network location requires a different set of login credentials than your current Windows account.
  6. Click on “Finish” to complete the process.
  7. The mapped drive should now appear in the “This PC” section of File Explorer, and you can access its contents as if it were a local drive.

Sage 50 cannot open the company file there is an error connecting to a database

Type A1: Windows 7, Vista, or 8:

  • Uninstall the 4.0 .NET Framework by your Control Panel dialogue box.
  • Restart the computer.
  • Reset the 3.5 .NET Framework
  • Uninstall your Sage 50.
  • Restart your computer.
  • Install the 4.5 .NET Framework.
  • You may download release 4.5 from the website of Microsoft. Restart your computer.
  • Install the Sage 50.

Type A2: Windows XP:

4.5 .NET Framework won’t be made accessible by Microsoft. Sage 50 suggests supplanting your PC with a more up-to-date variant of Windows because Microsoft suspended Windows XP as of April 8, 2014.

  • Repair 4.0 .NET Framework by the Control Panel – Add/Remove Program.
  • Repair 3.0 .NET Framework by the Control Panel – Add/Remove Program.
  • Restart if required.
  • Resetting .NET Framework 3.5:

Type B1: Windows 7, Vista, or 8:

In case your Windows is incorporated with 3.5 .NET Framework on account of Windows 8 (or else 3.5.1 for Windows 7 or Vista), you may need to likewise reset this coordinated variant. Sage 50 variant 2013 and the higher version are not utilizing the 3.5 .NET Framework activities. However, 4.0 .NET frameworks may have meddled with 3.5 functions. Resetting the 3.5 version will re-empower 3.5 particular capacities. Sage 50 suggests resetting the 3.5 .NET Framework.

  • Go to the Control Panel then click on Programs.
  • Click on the Turn Windows features on/off.
  • Uncheck the 3.5 .NET Framework, or 3.5.1,
  • Click on the OK button.
  • Go to your Control Panel then click on the Programs
  • Click on the Turn Windows features on/off
  • Select again the 3.5 .NET Framework or 3.5.1
  • Click on the OK button.

Type B2: Windows XP:

  • In case 3.5 .NET Framework is installed, at the point, repair it through Control Panel – Add/Remove Programs.
  • Uninstall the Sage 50.
  • Install the Sage 50.

Restart Sage 50 Connection Manager

  1. To start the process, select Control Panel, Administrative Tools, and then Services. 
  2. Right-click on Sage 50 Database Connection Manager. 
  3. Now click Stop.
  4. If you get a message saying “The Connection manager service could not be started”, you need administrator rights on this computer to start the service.
  5. Put effort into opening the company file. 

Make the files in the SAJ folder visible

Steps to change file status to fix Sage error when opening or accessing a data file:

  1. Go to the location of the SAJ folder.
  2. Right-click on the Folder and click on Properties.
  3. Go to the General tab, then mark the options Read-only and Hidden.
  4. Choose “Apply changes to this folder, subfolders, and files”, then click on Ok.
  5. Remove the checkmarks from the Read-only and Hidden options.
  6. Choose “Apply changes to this folder, subfolder, and files”, then click on Ok.
  7. Try to open a sample company file in Sage 50.

Check if the Saj Folder Has a Read-Only Attribute

  1. First, close Sage 50- Canadian Edition
  2. Navigate to the location where the company file resides.
  3. Right-click the folder with the extension SAJ
  4. And then select Properties. 
  5. Clear Read-Only box if a checkmark is there
  6. Press OK.
  7. Finally, restart Sage 50 Accounting and try to open the company file again.


I hope that you were able to fix the Sage 50 error connecting to the database by following the solutions in this post. I’ve offered a detailed, step-by-step walkthrough of both troubleshooting and fixing this error. However, most of these solutions require you to have admin rights in Windows, so contact your system administrator if you don’t have an administrator account.


What to do if the Actian service stops on the server?

When Actian stops working, Sage 50 cannot connect to the database, so it throws an error. You can open the task manager and restart the Actian service to fix this problem. You may have to reinstall Actian if its files are damaged.

Does creating custom firewall rules for Sage 50 create security risks?

What should I do if I have different versions of Sage 50 on server and workstations?

Speak to a Specialist about Your Sage Software

Headache🥺. Huh, Save time & money with Sage Technical Support 24×7 @ +1/, we provide assistance to those who face problems while using SAGE Peachtree (Support all U.S. & Canada Editions)

--- Support - We provide solutions for the following Sage (50, 100, 200, Payroll, Peachtree, Cloud, 3X, Impact, HRMS, CRM, ERP, One & Fixed Assets) ---

  • Error Support
  • Data Import
  • Data Conversion
  • Payment Solutions
  • Upgradation
  • Payroll Support
  • Data Export
  • Software Integration
  • Sage Printer Support
  • Complete Sage Solutions
  • Tax-Related Issues
  • Data Damage Recovery
  • Installation, Activation Help
  • Sage Windows Support

Disclaimer : is a provider of advanced support services related to SAGE accounting software. It also holds a flagship in catering third-party tech support services for accounting software (SAGE) and peripherals. Read More -›



Toll Free: 800-892-1352 user