Database Handicapping Software- JCapper

JCapper Message Board

          JCapper 101
                      -- Compact and Repair - Database Exists

Home Register
Log In
By Compact and Repair - Database Exists
jeff
8/11/2013
11:55:57 AM
--Quote:
"

I recently rebuilt my database(s). I have 2 folders populated with data from the last two quarters.

I followed your instrucions, using methods 3,4 and 5 as suggestions mentioned on the board.

At the end of each rebuild I receive the following error messages:

1. "Error - 2147217897 Database already exists."

2. "Error 1157 Unable to compact and repair database file C:\JCapper\Exe\JCapper2.mdb"

3. "Compact and repair database file: C:\JCapper|exe\JCapper2.mdb FAILED"

Help! (Did I miss a step?)


"

--End Quote.






No. I don't think you messed anything up.

During a compact and repair routine, a backup copy of the c:\JCapper\Exe\JCapper2.mdb file is created.

The file name of the backup is:

c:\JCapper\Exe\JCapper2_Compacted.mdb


At the end of each compact and repair the backup file gets deleted.




What probably happened:
I'll make an educated guess that your machine probably ran out of memory during a previous compact and repair.

Windows handles a machine that runs out of memory in the following manner: All program execution is halted. Everything in memory is written to the swap file (also called the paging file.) Then everything in the swap file is reloaded back into memory. Finally, a command is given to the machine to resume execution of all open programs.

This process (sometimes called swap file hell in the software developer community) can take up to several minutes depending on the machine.

When a machine is in "swap file hell" the JET database driver will sometime lose its connection to an .mdb file.

If this happens in the middle of a compact and repair the result is that the the backup file named c:\JCapper\Exe\JCapper2_Compacted.mdb gets left behind as a "gift."

If a file named JCapper2_Compacted.mdb is found on the c:\JCapper\Exe folder at the point in time when the next compact and repair is attempted, the routine will fail because an existing file by the same name is already there when the routine attempts to create the backup. (Thus the error messages you are getting.)

Fortunately, the solution (when this happens) is straightforward and easy.




Best Recovery Path:
Look at the file contents of your c:\JCapper\Exe folder. I'm guessing you'll see a file there named JCapper2_Compacted.mdb.

If that's the case, rename it to:

JCapper2_Compacted_WhyMe.mdb which works for this purpose... the purpose being to just get the file out of the way.

You can delete it later once you know everything is back to normal.

After renaming the backup file to get it out of the way, run a compact and repair.

If you can do that without getting the error, then you're ok to delete the renamed JCapper2_Compacted_WhyMe.mdb file.



-jp

.






~Edited by: jeff  on:  8/11/2013  at:  11:55:57 AM~

Reply
jeff
8/11/2013
3:59:35 PM
Related tech stuff...


--quote:
"But what if my machine shows the file as JCapper2 only (without the .mdb file extension? And with a lock icon instead of the JCapper2.ldb lock file itself?)"
--end quote




I would say it's time you learned how to make Windows show you the files on your machine (instead of hiding important info from you.)

How to Force Windows Explorer to Always Show You the File Extensions:
http://www.howtohaven.com/system/show-file-extensions-in-windows-explorer.shtml

To display hidden files and folders:
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/win_fcab_show_file_extensions.mspx?mfr=true


With the proper settings persisted, it gets a whole lot easier to see what you are doing...

For example, if you need to delete the JCapper2.ldb lock file... now you can.


-jp

.



Reply
Reply

Copyright © 2018 JCapper Software              back to the JCapper Message Board              www.JCapper.com