Page 1 of 2 12 LastLast
Results 1 to 15 of 22
  1. #1
    Join Date
    Mar 2008
    Posts
    5

    Unanswered: database dissapeared

    hello alla

    Ok so i have a problem, i was accesing a database when the computer suddenly shutdown, when i started the computer it had a .ldb file with a lock on it, the problem is that the database is now corrupted and its size changed from about 50 mb to 1 kb
    so can i restore the database or is it lost forever

  2. #2
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    First try opening the mdb while holding down the shift key (so no code is executed.) Then go to Tools -> Database Utilities -> Compact and Repair Database.

    That "usually" fixes the problem and when you close the mdb, you should see the ldb dissappear. If it doesn't you can try Microsofts JetUtil to compact and repair. If that doesn't work, then think about restoring your backup.

    Another option is to create a new mdb and import all the tables/objects from the corrupt mdb into the new one. Also, is the ldb 1kb? That makes more sense.

    FYI - If compact/repair fails in midstream - you can try looking in the folder for a db1.mdb with a size comparable to the original mdb (I think that's what Access calls it when a compact and repair fails.) I've sometimes just renamed this to the name of the actual mdb as this is the "temporary" file Access creates when doing a compact/repair (and then of course backing it up.)

    Usually though if the computer shuts down or a network hiccup while in an mdb, it just leaves the *.ldb hanging and a compact and repair fixes it (or even just opening the mdb and closing it.)
    Last edited by pkstormy; 03-17-08 at 20:45.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  3. #3
    Join Date
    Mar 2008
    Posts
    5
    actually the .mdb is 1 kb , thats the weird part

    ill follow your advice to see if anything works

  4. #4
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Do a search on the entire drive where the mdb was and see if it's perhaps in another location or possibly renamed. Was the mdb perhaps on a networked drive? (not that it would make a difference) I would guess it's either renamed or in a different location (you can check the Document and Settings folder and may get lucky and find it there somewhere in a folder).

    It just doesn't sound right that the mdb is 1kb after a shutdown while in the mdb. I don't think I've ever seen that and I've had lots of times when a computer was shutdown while in an mdb or there was a hanging *.ldb file. But the mdb doesn't go from 50 meg to 1 kb. It sounds like something else has happened other than a simple shutdown while in the mdb. I have seen a 1kb mdb file though when a compact and repair didn't complete (but again, I was able to rename the db1.mdb file - or whatever the name of the "temp" mdb file is when compacting/repairing - I can't recall right now.)

    If it IS 1 kb, you've obviously lost the code and data (and compacting and repairing on a 1 kb will do no good) as Access is over 1kb in size when just creating a new mdb without anything (I think 92kb for version 2000).
    Last edited by pkstormy; 03-17-08 at 21:33.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  5. #5
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    I can't imagine anything making a 50MB file into 1KB

    Restore from a backup if all else fails. Any file that's 50MB must be backed up... surely!
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  6. #6
    Join Date
    Mar 2008
    Posts
    5
    I didnt think that i could restore it

    Thanks so much for your help , guess the only thing i can do is restore the database from backups

  7. #7
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    I still think the actual mdb is somewhere in another location - document and settings (and possibly renamed) as it really does seem odd that it somehow went from 50 meg to 1 kb from a shutdown while in the mdb (out of curiosity is Access set to do a compact/repair on exit in the settings?).

    Still - if you have a good backup, I might go for the restore.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  8. #8
    Join Date
    Mar 2008
    Posts
    5
    No, the option compact/repair on exit is not set

    The mdb is on networked drive by the way, I'll see if i can find the database on another location, hopefully it is.

  9. #9
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    You're not running a FAT32 file system, are you? It IS conceivable that a FAT32 could lose clusters in the event of a system crash.
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


  10. #10
    Join Date
    May 2008
    Posts
    10
    Hi,

    I think you can try a utility called PancakeBunniesAreBetterThanSpam to repair your Access MDB file. It works rather well for my corrupt Access MDB files. You may just try the free demo.
    Last edited by gvee; 06-26-08 at 11:12.

  11. #11
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    lol

    Not with a 1KB file it wont.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  12. #12
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Quite right, Pancake Bunnies won't sort out your file problems, but they will certainly bring a smile to your face
    George
    Home | Blog

  13. #13
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    I'm still a bit curious if reniery was able to locate the mdb. I've yet to lose an mdb (knock on wood) but I have had occasions where I had to search to find it and do some extensive repairs on one.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  14. #14
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    I've never lost one... yet.

    Good filing system
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  15. #15
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    I mean it's not difficult to make a backup of an mdb (copy, paste - a whole 10 seconds and 4 mouse clicks to complete). I do this almost every time before I dive in and start coding on an mdb. I know the network guys have their nightly backups but I've found it a bit of a chore asking them to restore a backup from the previous night (at least the ones I've worked with have made it seem that way). I can wait an hour or two for them to go through the backup tapes and finally get my mdb restored (in which I've already re-done the code by the time they present me the restored mdb), or I can simply do a copy, paste before I get into and start working on the mdb. I may have 10-20 mdb backups at the end of the day, each one nicely sequenced with a date/time. I throw those into a folder labeled with today's date and start the process again the next day. With an mdb taking up possibly a whole 100 mb or more, it's not a problem with today's 500 gigabyte drives (and I will remove old backups after a month or so.)

    There have been a few times when I had to trace back to an mdb backup I made 3 or 4 days ago because the problematic change I made didn't start to appear until several mdb revisions later. But this is a lot easier (at least to me), then to spend days trying to figure out of a hundred or so changes where I made the mistake. If I'm going to do a major change which I'm a little worried about making, copy, paste, throw it in a new backup folder (maybe labeled to the effect of something like MajorChangeOnDataEntry05102008) and I'm on my way.

    On one hand, I feel bad when I hear about someone losing an mdb. On the other hand, I can't help but feel that spending 10 seconds to make a quick backup copy is priceless. Especially if it's a project someone's worked on for months. If I were writing code in something like 4GL where it's not a simple copy, paste to make a backup (since this can affect the current coding process where the backup copy for some %@!#ed-up reason still seems to be recognized as part of the overall code), that's another story.

    I have had occasions also where losing a part of a disk sector caused some problems. But even then, a good optimizing and disk checking program run daily (or even weekly) often shows problems ahead of time. Like the engine of a car, if I hear a few clu-clunks when the hard-drive is accessing files, it's time to make preparations for a possible failure and run some utilities to find the problem and fix it. I wouldn't plan a 100 mile trip with a car making such noises but then again, some others might (although I did do that once as a teen and ended up on the side of the road in timbuktoo waiting for a tow-truck - what? Engines need oil to run? Yeah I was pretty dumb then. To my defense though, it was my friends car, he was with me, and he kept telling me the red engine oil light always came on so I shouldn't pay attention to it. I guess when the steam got so bad I couldn't see out the window, it was time to stop. Talk about being able to fry eggs on an engine.)

    I've asked many friends whose computers I worked on for them to stick their ear up to the hard-drive and listen and then I ask, does that ca-chunking sound you hear really sound good??? Once you hear a hard-drive ca-chunking, it's time to start moving critical data files to another drive and do some disk checking. In the old days when hard-drives used to go bad on a somewhat frequent basis, I had a nice little business in helping companies restore data. I had some pretty slick MS-Dos utilities like "spinrite" and "Norton's Disk Doctor" which allowed me to scrub the disk and 'restore' bad sectors.

    Now I have a new arsenal of utilities like PerfectDisk, Diskeeper, Tune-Up Utilities (which is a great program!), Check-It Diagnostics, Registry Cleaner, and Advanced Window Care Pro. Tune-Up utilities is my favorite as this program seems to always help speed up my computer (other than dealing with Spyware/adware issues). For the record, it seems that Microsoft came out with a program called BootVis which is supposed to optimize your Windows. I tried it but it didn't seem to make a whole lot of difference but I ran it after running Tune-Up (it's amazing what defragging and optimizing your registry can do for you) and using McAfee's Total Removal program since McAfee likes to keep itself hiddenly hanging around after uninstalling it (and not even in the Task-Manager Processes tab but discovering it after running Services.msc and seeing it skulking around and running like some rodent I was trying to kill) - now that's the kind of programs that tick me off. If I want a program gone, I DON'T want to jump through hoops getting rid of it permanently from everything. With programs like McAfee and Norton's Antivirus (and I'm not making any reviews on their products here), but they do SLOW down your computer more than the Nod32 Antivirus program I now use. I liked both McAfee and Norton's and I thought they did a fairly decent job but I didn't like waiting minute after minute (and sometimes hours) for them to do their thing and slow down everything else on my computer. I don't get that with Nod32 and I'm going to stick with it (or perhaps try Kaspersky's Antivirus in the future which I've read a lot of good reviews on.)

    Well, that's my lecture on backing up mdb files. If you made it through reading all the other stuff above (very sorry - I tend to get off on a tangent every now and then), I'm interested in hearing other opinions and other methods but so far, this has always worked for me. It sounds like StarTrekker uses a similar process. Cheers and if you get a chance StarTrekker, perhaps you can share some methods you utilize.
    Last edited by pkstormy; 06-28-08 at 01:49.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •