Compacting using Windows Scheduler
Compacting using Windows Scheduler
am 19.12.2007 18:23:49 von DSSMaster
I am trying to use windows scheduler to compact a database. In the task run
line I have the following:
"C:\Program Files\Microsoft Office\OFFICE11 MSACCESS.EXE" _
"C:\Files\Access\Sacroc.mdb" /compact
In the task start in box I have the following
"C:\Program Files\Microsoft Office\OFFICE11"
The database starts to compact and then returns the message
Microsoft Office Access has encountered a problem and needs to close
Re: Compacting using Windows Scheduler
am 20.12.2007 02:18:18 von Chuck Grimsby
First off, it should be:
"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" _
"C:\Files\Access\Sacroc.mdb" /compact
Second off, you might want to use the Jet Compact program
(JETCOMP.exe), rather then Access. (Why load all of Access just to
compact a database?)
Third, and most importantly, why the heck are you doing this at all?!?
Compacting a Access all the time is *not* a good idea. It will only
make the database slower as each time it's started up, it has to
expand the file to make room for working storage.
Frequently compacting a database is *NOT* a good file, disk, or
administrative action. In fact, you may _cause_ corruption or even
loss of information in the target database. (Always be sure you have
a valid backup *BEFORE* you *EVER* compact *ANY* Access or Jet
database.)
On Wed, 19 Dec 2007 17:23:49 GMT, "DSSMaster" wrote:
>I am trying to use windows scheduler to compact a database. In the task run
>line I have the following:
>
>"C:\Program Files\Microsoft Office\OFFICE11 MSACCESS.EXE" _
>"C:\Files\Access\Sacroc.mdb" /compact
>
> In the task start in box I have the following
>"C:\Program Files\Microsoft Office\OFFICE11"
>
>The database starts to compact and then returns the message
>Microsoft Office Access has encountered a problem and needs to close
---
Please Post Any Replies To This Message Back To the Newsgroup.
There are "Lurkers" around who can benefit by our exchange!
Re: Compacting using Windows Scheduler
am 20.12.2007 15:07:14 von DSSMaster
First
I did a typo in the posting. The "\" is there after OFFICE11. Thus the
question remains why does it start compacting and then crash access?
Second
JETCOMP may be the way to go in a batch file with some other commands to make
a backup and still have a file with the same name as the original when done
Third
I have to compact the database regularly because many people use it and it
grow very large. Occasionally so large it will not open. For example I have
seen it ecpand from 800 meg to a little over 2 gig. A compact puts it back to
the size were it belongs.
Chuck Grimsby wrote:
>First off, it should be:
>"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" _
>"C:\Files\Access\Sacroc.mdb" /compact
>
>Second off, you might want to use the Jet Compact program
>(JETCOMP.exe), rather then Access. (Why load all of Access just to
>compact a database?)
>
>Third, and most importantly, why the heck are you doing this at all?!?
>Compacting a Access all the time is *not* a good idea. It will only
>make the database slower as each time it's started up, it has to
>expand the file to make room for working storage.
>
>Frequently compacting a database is *NOT* a good file, disk, or
>administrative action. In fact, you may _cause_ corruption or even
>loss of information in the target database. (Always be sure you have
>a valid backup *BEFORE* you *EVER* compact *ANY* Access or Jet
>database.)
>
>>I am trying to use windows scheduler to compact a database. In the task run
>>line I have the following:
>[quoted text clipped - 7 lines]
>>The database starts to compact and then returns the message
>>Microsoft Office Access has encountered a problem and needs to close
>
>---
>Please Post Any Replies To This Message Back To the Newsgroup.
>There are "Lurkers" around who can benefit by our exchange!
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/databases-ms-ac cess/200712/1
Re: Compacting using Windows Scheduler
am 21.12.2007 02:15:48 von Chuck Grimsby
Your response to my third point is most likely the reason for the
problem in the first.
Time to split the DB. Give everyone their own front-end if you can.
If the database is already split, it's (past) time to upgrade to SQL
Server. (You can use SQL Server Express if you need to take "baby
steps" in the upgrade process.) If you can't do that, then split the
DB into several Access databases.
Again, if the database is consuming that much storage space, you're
past the point where it's a good idea to upgrade or split the
database.
JetComp, by the way, can be run from the task scheduler. A batch file
(or VBS script) really isn't needed.
On Thu, 20 Dec 2007 14:07:14 GMT, "DSSMaster via AccessMonster.com"
wrote:
>First
>I did a typo in the posting. The "\" is there after OFFICE11. Thus the
>question remains why does it start compacting and then crash access?
>
>Second
>JETCOMP may be the way to go in a batch file with some other commands to make
>a backup and still have a file with the same name as the original when done
>
>Third
>I have to compact the database regularly because many people use it and it
>grow very large. Occasionally so large it will not open. For example I have
>seen it ecpand from 800 meg to a little over 2 gig. A compact puts it back to
>the size were it belongs.
>
>Chuck Grimsby wrote:
>>First off, it should be:
>>"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" _
>>"C:\Files\Access\Sacroc.mdb" /compact
>>
>>Second off, you might want to use the Jet Compact program
>>(JETCOMP.exe), rather then Access. (Why load all of Access just to
>>compact a database?)
>>
>>Third, and most importantly, why the heck are you doing this at all?!?
>>Compacting a Access all the time is *not* a good idea. It will only
>>make the database slower as each time it's started up, it has to
>>expand the file to make room for working storage.
>>
>>Frequently compacting a database is *NOT* a good file, disk, or
>>administrative action. In fact, you may _cause_ corruption or even
>>loss of information in the target database. (Always be sure you have
>>a valid backup *BEFORE* you *EVER* compact *ANY* Access or Jet
>>database.)
>>
>>>I am trying to use windows scheduler to compact a database. In the task run
>>>line I have the following:
>>[quoted text clipped - 7 lines]
>>>The database starts to compact and then returns the message
>>>Microsoft Office Access has encountered a problem and needs to close
>>
>>---
>>Please Post Any Replies To This Message Back To the Newsgroup.
>>There are "Lurkers" around who can benefit by our exchange!
---
Please Post Any Replies To This Message Back To the Newsgroup.
There are "Lurkers" around who can benefit by our exchange!