A97 compact database question?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • MLH

    A97 compact database question?

    I just used Tools / Database Utilities / Compact Database
    in Access 97 for the first time. Unlike Access 2.0, it does
    not ask me to furnish a filename for it to compact into.
    It just launched headlong into a process that, after the
    fact, had the result of overwriting the 44-meg previous
    size file into an 8-meg file of the same name.

    Has anyone ever experienced a data-loss during such
    a compact operation under A97? Surely, the access
    developer team writes a temp file for creating the compact
    file or does some sort of backup to disk first BEFORE
    overwriting the currently loaded file. Thoughts?
    Experience?
  • jimfortune@compumarc.com

    #2
    Re: A97 compact database question?

    In the heyday of A95 a compact often corrupted the database. I
    developed the habit of closing the database, compacting to a separate
    mdb file then compacting the separate mdb file back over the original.
    I still haven't gone back to trusting the 'in place' method.

    James A. Fortune

    Comment

    • MS

      #3
      Re: A97 compact database question?


      "MLH" <CRCI@NorthStat e.net> wrote in message
      news:6s01b1pbpk iseji6lqbidps3q deo0md742@4ax.c om...[color=blue]
      >I just used Tools / Database Utilities / Compact Database
      > in Access 97 for the first time. Unlike Access 2.0, it does
      > not ask me to furnish a filename for it to compact into.
      > It just launched headlong into a process that, after the
      > fact, had the result of overwriting the 44-meg previous
      > size file into an 8-meg file of the same name.
      >
      > Has anyone ever experienced a data-loss during such
      > a compact operation under A97? Surely, the access
      > developer team writes a temp file for creating the compact
      > file or does some sort of backup to disk first BEFORE
      > overwriting the currently loaded file. Thoughts?
      > Experience?[/color]

      Back up the db first - just in case!

      I go to the trouble of saving the data (tables) in a seperate .mdb as well,
      so even if the worst happens (twice), it's not going to be catastrophic.


      Comment

      • David W. Fenton

        #4
        Re: A97 compact database question?

        MLH <CRCI@NorthStat e.net> wrote in
        news:6s01b1pbpk iseji6lqbidps3q deo0md742@4ax.c om:
        [color=blue]
        > I just used Tools / Database Utilities / Compact Database
        > in Access 97 for the first time. Unlike Access 2.0, it does
        > not ask me to furnish a filename for it to compact into.
        > It just launched headlong into a process that, after the
        > fact, had the result of overwriting the 44-meg previous
        > size file into an 8-meg file of the same name.
        >
        > Has anyone ever experienced a data-loss during such
        > a compact operation under A97? Surely, the access
        > developer team writes a temp file for creating the compact
        > file or does some sort of backup to disk first BEFORE
        > overwriting the currently loaded file. Thoughts?
        > Experience?[/color]

        If you open Explorer and watch the folder while Access is
        compacting, you'll see it writes to db1.mdb, then deletes the
        original mdb and renames db1.mdb to the original name. If the
        compact fails, however much of db1.mdb that had been written at the
        time the compact failed will be left, as well as the original file,
        which is unchanged (since all the writing was into db1.mdb).

        However, here's a simple rule:

        Never compact without a backup.

        I break it all the time, though, and have never once lost a minute's
        worth of work.

        There's on scenario where this is really critical, and that's with
        replicated data. A compact can succeed without Access noticing
        anything wrong, but replicability can be lost. Of course, you can't
        copy replicated files (that creates dead replicas if you aren't
        careful), so the way to protect your data is to synchronize it with
        another replica before you compact it.

        --
        David W. Fenton http://www.bway.net/~dfenton
        dfenton at bway dot net http://www.bway.net/~dfassoc

        Comment

        • Larry  Linson

          #5
          Re: A97 compact database question?

          Just to refresh my memory, I opened Access 97 (no database selected), used
          Tools | Database Utilities | Compact Database. It first opened a Common
          Dialog window to let me choose the database that I wanted to compact, and
          when that was chosen, opened another Common Dialog window to let me choose
          the database into which I wanted to compact (preset to db1.mdb).

          I don't even remember any settings that would bypass the second Common
          Dialog window.

          However, if you choose Tools | Database Utilities | Compact Database with a
          database open, it does as you describe.

          So, you have your choice -- compact the current database and let it overlay
          the original once it is compacted, or close the current database without
          closing Access, compact, and select the database to compact from and the one
          into which you want to compact.

          Larry Linson
          Microsoft Access MVP

          "MLH" <CRCI@NorthStat e.net> wrote in message
          news:6s01b1pbpk iseji6lqbidps3q deo0md742@4ax.c om...[color=blue]
          > I just used Tools / Database Utilities / Compact Database
          > in Access 97 for the first time. Unlike Access 2.0, it does
          > not ask me to furnish a filename for it to compact into.
          > It just launched headlong into a process that, after the
          > fact, had the result of overwriting the 44-meg previous
          > size file into an 8-meg file of the same name.
          >
          > Has anyone ever experienced a data-loss during such
          > a compact operation under A97? Surely, the access
          > developer team writes a temp file for creating the compact
          > file or does some sort of backup to disk first BEFORE
          > overwriting the currently loaded file. Thoughts?
          > Experience?[/color]


          Comment

          • MLH

            #6
            Re: A97 compact database question?

            Thx, David. Good suggestion on opening explorer during the
            process. 'preciate it.
            xxxxxxxxxxxxxxx xxxxxxxxxxxxxxx x
            [color=blue]
            >
            >If you open Explorer and watch the folder while Access is
            >compacting, you'll see it writes to db1.mdb, then deletes the
            >original mdb and renames db1.mdb to the original name. If the
            >compact fails, however much of db1.mdb that had been written at the
            >time the compact failed will be left, as well as the original file,
            >which is unchanged (since all the writing was into db1.mdb).
            >
            >However, here's a simple rule:
            >
            >Never compact without a backup.
            >
            >I break it all the time, though, and have never once lost a minute's
            >worth of work.
            >
            >There's on scenario where this is really critical, and that's with
            >replicated data. A compact can succeed without Access noticing
            >anything wrong, but replicability can be lost. Of course, you can't
            >copy replicated files (that creates dead replicas if you aren't
            >careful), so the way to protect your data is to synchronize it with
            >another replica before you compact it.[/color]

            Comment

            • MLH

              #7
              Re: A97 compact database question?

              Thx, Larry. How have you been. Its been a long time.
              The second pattern of behavior (running compact
              with an open database running) is what caught me
              by surprise. I wasn't ready for it. All is well, just checking
              behind myself.

              Comment

              Working...