473,416 Members | 1,486 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

Compacting using Windows Scheduler

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
3 3817

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
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

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Phil Powell | last post by:
Ok, I installed ANT, I have c:\ant in my ANT_HOME environment variable, I have c:\ant\bin in my PATH environmental variable, I installed the JAR files for TCL and for Javascript (Rhino)... to no...
19
by: Eric | last post by:
I'm trying to have some scripts run periodically on Windows XP and found the "Task Scheduler" did not execute my scripts. My scripts are of the form scriptName.py, and will run just by invoking that...
11
by: Codemonkey | last post by:
Hi, I am writing an App in .Net that involves some scheduling of tasks. I was wondering if anybody has come accross any components or examples of how to implement a schedule manager like the one...
12
by: Phil Powell | last post by:
<cfquery name="getAll" datasource="#request.dsn#"> SELECT U.userID, U.fname, U.lname, U.phone, U.lastLoggedIn, U.choiceId, U.experience, T.label AS teamLabel, R.label AS roleLabel FROM User U...
5
by: Peter Verhelst | last post by:
Hello, Currently I am running an Access database on a windows WTS server, running Microsoft Windows 2000 server 5.00.2195 Service Pack 3. This database should be accessible for everybody in our...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
7
by: PawelR | last post by:
Hello group, Sorry, My English is very little. I have qustion about windows scheduler. My application create report and send this report to users. I want run this application as job in windows...
3
by: mayur_hirpara | last post by:
Hi, I am writing a VB.NET application. It is a Windows application at the moment. The application contains a button. the click event of button perform a long running task. It needs to be started...
3
by: BLUE | last post by:
I've to call 2 web method from time to time so that the web service will do cleanup and sync jobs on a database. These methods can be called once every X days where X >= Y for the sync method...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.