By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,704 Members | 1,867 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,704 IT Pros & Developers. It's quick & easy.

Compacting using Windows Scheduler

P: n/a
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

Dec 19 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a

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" <u40021@uwewrote:
>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!
Dec 20 '07 #2

P: n/a
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/For...ccess/200712/1

Dec 20 '07 #3

P: n/a

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"
<u40021@uwewrote:
>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!
Dec 21 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.