Peachtree Accounting 2011 - Automatic Backup fails with Unhandled Exception

SOLVED

I have Automatic Backup set up for a number of companies, which has been working fine until last night. Every one failed, and I get the same error if I try to open the program and manually load one, seen below. Looking up the 7013 code, this seems to be the Pervasive PSQL code for "Named database does not exist". I can backup fine within Peachtree, and all other activities within Peachtree are also fine. Data Verification returns no errors, and this happens on every computer.

Peachtree was installed for network use, so I believe the problem lies in the /Company/ directory it initially links to. My fear is that, when deleting the folder of a client I restored temporarily, I somehow deleted other necessary files/folders by accident. Unfortunately, I don't have anything to compare the folder against. An attempt to do a repair install did not work, neither on the server where the files are hosted nor a user's computer.

The error will appear whenever I try to load a PTC file, or even just when I select a Peachtree folder for "Company Directory". Selecting a non-Peachtree folder has the expected "This is not a Peachtree folder" message.

Anything to be done? I imagine a full uninstall and re-install on the main server would work, but backing up all those companies manually and restoring them would be quite the chore.

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
Sage.Peachtree.DataAccess.DTIException: DTI PvGetDbDataPath returned error: 7013
   at Sage.Peachtree.DataAccess.PervasiveDTISession.GetDbDataPath(String dbName)
   at PeachtreeBackup.BackupController.GetDBNFromPath(String dbnServer, String companyPath)
   at PeachtreeBackup.AutomaticBackupConfigForm.ValidateCompanyDirectory(String companyPath, BackupConfig& config)
   at PeachtreeBackup.AutomaticBackupConfigForm.BrowseButtonHandler(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

  • 0

    Other things I've tried:

    Disabling antivirus (TrendMicro) on both host computer and user computer

    Manually stopping and restarting Pervasive service on host computer

    Removing the Company folder entirely from the expected path (still same error message)

    Given the companyPath argument being passed, I'm still guessing that it's a problem with a file in the /Company/ folder, but I don't know what file would hold the dbNames or what program I would need to use to access the file to see if something I can manually correct.

  • 0 in reply to Robernaut

    I was able to use a spare computer to do a fresh installation of Peachtree for testing. I saw no obvious problems when comparing the /Company/ folders. Trying to load the test company on the test computer in Automatic Backup worked fine. On a whim, I tried copying over a company from the main server to this testing installation and run PeachTree automatic backup from there. As expected, I got a similar DTI error, but this time it was code 7025 (Server name not found).

    I now believe the problem is with the /Pervasive Software/PSQL/DBNamesDirectory/dbnames.cfg file. However, this appears to be a Btrieve or Pervasive file, and I don't know how to view/edit those properly.

  • 0 in reply to Robernaut

    Progress! I opened the copied company within test Peachtree (didn't restore, just opened from where I pasted it) and it looks like the DBName was added to dbnames.cfg. After I closed the company in Peachtree, I was able to select the folder for Company Directory in Automatic Backup and had no problem running a backup.

    I believe I know what to do, but it will have to wait until no one is using Peachtree:

    1) Stop Pervasive service on host computer

    2) Rename or move dbnames.cfg

    2a) May need to do a repair installation to force a fresh copy of dbnames.cfg? Peachtree might wig out if the file is missing completely. May also be able to just copy over a 'clean' dbnames.cfg from the test installation if needed.

    3) Load each company, one by one, which will make Peachtree add the file details to dbnames.cfg

    4) Run Automatic Backup

    5) ????

    6) Profit?

    I will try this in the evening and will report back if this is successful or not.

  • 0 in reply to Robernaut
    verified answer

    Success! I was able to replace the DBNames.cfg file and automatic backup is now churning through the various stores! Here are the steps I took, but remember that you do this at your own risk and I cannot guarantee success or no further problems.

    1. Open the folder C:\Program Files\Pervasive Software\PSQL\DBNamesDirectory (if you're on 64-bit, it will be Program Files (x86)) on the computer hosting your Peachtree files
    2. If the file ~PVSW~.LOC is there, go into Services and Stop Pervasive PSQL Workgroup Engine (If that file is not there, you do not need to shut down the service unless Windows complains when you try to move the file)
    3. Move the file dbnames.cfg to another location (I do not recommend outright deleting it, in case you need to put it back)
    4. If you shut down the Pervasive PSQL Workgroup Engine service, Start it
    5. Within Peachtree, manually open each company you need to back up. Peachtree will automatically create the dbnames.cfg file and add each company to it as they are opened
    6. Once you have opened each company individually, close PeachTree
    7. Run Automatic Backup as needed

    I don't know if it's 100% necessary to open each file, but I did just in case. If I happened to forget to open one and it fails to backup, I will post an update saying that you have to open each one for sure.

    I don't know how this problem began, but because we deal with a lot of companies and it's been four years of using that one file I imagine it got corrupted or overloaded somehow. It could have been something I did when I restored a company on Wednesday, or that could have just been coincidence. Either way, I'm glad I have it fixed, I hope I didn't annoy anyone with my rambling, and hopefully this helps anyone else that might have the problem.