Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2011
    Posts
    17

    Nightly maintenance design pattern

    I've implemented the following with an Access 97 application and I'm wondering if it is a common design pattern and whether it has a better implementation or if it is obviated by newer versions of Access. If not, I'm wondering how I could best share it with others.




    Solved Problems:
    1) Database becomes corrupt unpredictably
    2) Performance slows as the database gets bigger


    This is how it goes...


    Nightly maintenance process scheduled and run as a Windows Task on the server:
    1) check that everyone has exited the system. set a flag and use a listener in the application. provide a warning that lets active users prevent the maintenance if necessary. record the user name of who prevented it. otherwise, force any open apps to close.
    2) copy the database in case there's a problem with the maintenance. save 4 days of copies and delete the oldest every day before the next maintenance
    3) move old records from the main database to an "archive" database. this is entirely app specific.
    4) compact the main database and archive databases
    5) log the maintenance success/failure
    (6. I haven't done this, but would like it to send me an email whenever there's a failure.)




    Then as people use the application, whenever they need to access an archived record in a report or form or anything, the application moves the record back from the archive to the main database. Later that night in the next maintenance run, the record is moved back to the archive along with the other newly old records.

    I'd appreciate your thoughts.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I don't know anything about newer versions that would better accommodate this process.

    Your db is large enough to require archiving records?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Join Date
    Jul 2011
    Posts
    17
    Quote Originally Posted by June7 View Post
    I don't know anything about newer versions that would better accommodate this process.

    Your db is large enough to require archiving records?
    The active database is about 115 MB. The archive is about 215 MB. When we first started doing it, the single database was around 150 MB. Archiving has sped up certain report times to about a tenth of the time it took before.

    Switching to a database server with stored procedures may have worked too, but this just seemed to open fewer cans of worms.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Need design help on maintenance database
    By creyc in forum Database Design
    Replies: 7
    Last Post: 03-29-2013, 03:51 PM
  2. Pattern Matching In Access 2010
    By Mike Henderson in forum Access
    Replies: 1
    Last Post: 02-21-2013, 12:27 PM
  3. Regular expression pattern
    By jacjacjac in forum Programming
    Replies: 1
    Last Post: 12-23-2012, 08:52 PM
  4. Singleton pattern
    By joki in forum Programming
    Replies: 0
    Last Post: 05-03-2011, 09:07 AM
  5. Programming Approach for Pattern Layouts
    By IvoryDragonfly in forum Programming
    Replies: 3
    Last Post: 10-09-2010, 01:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums