[AccessD] Schedule Compact and Repair

jwcolby jwcolby at colbyconsulting.com
Thu May 29 12:30:37 CDT 2008


My experience is that a lock file in the BE goes away when 
the last active link to the file ceases to exist.  this does 
NOT say that no one is in the database.

It DOES say that the file is not locked (at this instant in 
time).

I have tested this.  I created DB1_BE and imported a 
tblState.  I then created db1_FE and linked to tblState in 
db1_BE.  db1_BE is not locked.  I then open tblState in the 
FE and db1_BE now has a lock file.  Close the table in the 
FE, the lock file goes away in the BE.

So just be careful with assuming that no LDB means no one in 
the FE, that is not the case.  No LDB means that no one is 
actively browsing data in any way.  They may be poised, with 
their hand over the key to open a report...

Now... personally I open a recordset to the back end and 
hold it open when I open the FE.  If you do THAT, then there 
WILL BE a lock file as long as any FE is open.

John W. Colby
www.ColbyConsulting.com


Rocky Smolin at Beach Access Software wrote:
> Cool.  I think we have a winner here.  Have to give it a try.
>  
> 
> 
> Rocky Smolin
> Beach Access Software
> 858-259-4334
> www.e-z-mrp.com
> www.bchacc.com
>  
>  
> 
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Murphy
> Sent: Thursday, May 29, 2008 9:13 AM
> To: 'Access Developers discussion and problem solving'
> Subject: Re: [AccessD] Schedule Compact and Repair
> 
> It does.  That is the way you can tell if some one is linked to the file. 
> 
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin at
> Beach Access Software
> Sent: Wednesday, May 28, 2008 11:04 PM
> To: 'Access Developers discussion and problem solving'
> Subject: Re: [AccessD] Schedule Compact and Repair
> 
> So if you are the last user, the ldb file goes away at some point before the
> app shuts down?  This works for linked tables to the BE?
> 
> 
> Rocky Smolin
> Beach Access Software
> 858-259-4334
> www.e-z-mrp.com
> www.bchacc.com
>  
>  
> 
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Murphy
> Sent: Wednesday, May 28, 2008 7:18 PM
> To: 'Access Developers discussion and problem solving'
> Subject: Re: [AccessD] Schedule Compact and Repair
> 
> Hi Rocky,
> 
> One way to do this is to put an invisible form with a timer in your front
> end that runs a routine to compact the back end when the front end shuts
> down.  You need to have it set so that the routine looks for the back end
> ldb file and does the compact if the file does not exist.  Have it test for
> the files existence several, maybe 5, and then shut down if the file does
> not go away.  If the file is still there it means some one else is in the
> database.  When the last person shuts down it will compact.
> 
> I have set this up and it works well except for the infrequent crash that
> leaves a copy of the ldb.
> 
> Doug 
> 
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin at
> Beach Access Software
> Sent: Wednesday, May 28, 2008 6:56 PM
> To: 'Access Developers discussion and problem solving'
> Subject: Re: [AccessD] Schedule Compact and Repair
> 
> Lambert:
> 
> The problem in this case is not backup but compacting.  The user ran into a
> problem running the app and found that the problem went away after a
> compact.  So now he wants to be able to do the compact automatically.  The
> problem of course is that everyone has to be out of the mdb to do the
> compact.
> 
> 
> Rocky Smolin
> Beach Access Software
> 858-259-4334
> www.e-z-mrp.com
> www.bchacc.com
>  
>  
> 
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Heenan, Lambert
> Sent: Wednesday, May 28, 2008 2:12 PM
> To: 'Access Developers discussion and problem solving'
> Subject: Re: [AccessD] Schedule Compact and Repair
> 
> The disadvantage of using the windows scheduler in today's "locked down"
> computer world are that you need admin rights to run it and you have to
> remember to change the password of the task when the user is required to
> change it by company policy. 
> 
> A disadvantage of having the app do it itself via a timer form is that the
> app must be running somewhere at all times, and that makes it more difficult
> to update the app (perhaps).
> 
> For myself, I use a little backup program called Backup4All. It has its own
> built in scheduler so backups happen when desired, but it also has the
> ability to run other tasks before and/or after a backup job runs. I use that
> feature to run a batch file that does the compacting prior to the backup -
> at 3 AM. It then runs one final task after backing up - it powers off my
> computer.
> 
> Lambert
> 
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin at
> Beach Access Software
> Sent: Wednesday, May 28, 2008 3:22 PM
> To: 'Access Developers discussion and problem solving'
> Subject: [AccessD] Schedule Compact and Repair
> 
> Dear List:
>  
> A regular compact and repair of a back end needs to be schedule.  Windows
> Scheduler would do nicely I'm sure running a small app that would C&R a
> specific back end.  Problem of course is getting all the users kicked out.  
>  
> I know I have seen threads on this in the past but little no attention, of
> course, because I didn't have the need at the time.
>  
> Is there a canned solution for this - on our site or one of the other Access
> sites? 
>  
> MTIA,
>  
> Rocky
>  
> 
> 
>  	
> 	
>  
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 
> No virus found in this incoming message.
> Checked by AVG. 
> Version: 8.0.100 / Virus Database: 269.24.1/1470 - Release Date: 28/5/2008
> 07:20
> 
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 
> No virus found in this incoming message.
> Checked by AVG. 
> Version: 8.0.100 / Virus Database: 269.24.1/1470 - Release Date: 28/5/2008
> 07:20
> 
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 
> No virus found in this incoming message.
> Checked by AVG. 
> Version: 8.0.100 / Virus Database: 269.24.3/1472 - Release Date: 29/5/2008
> 07:27
> 



More information about the AccessD mailing list