dbTalk Databases Forums  

DB crashes and packing

comp.databases.ms-access comp.databases.ms-access


Discuss DB crashes and packing in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
jodleren
 
Posts: n/a

Default DB crashes and packing - 04-15-2009 , 11:48 AM






Hi

We have some some systems, which save a lot of detailed/temporary data
to an access table (some ~10 tables in a file), and 3-4 tables are
heavily updated

every half our a summeriser goes over it, puts summarised data into
some other tables, and delete old data.

As of now, they system has not been packing itself automatically, but
we have added that now.
The question is, does that solve our problem?
Packing is done once a week, or when 15% of temp data are deleted.

Packing is also done, when the error
[Microsoft][ODBC Microsoft Access Driver] Record is deleted
occurs - that error is easily fixeable byt packing

but there are 2 other scenaries:

1) "bookmark not valid" - this errors happen now and then. Solution:
open it a use "compact and repair" from the tools - db tools menu

2) "Could not update; currently locked by user 'admin' on machine
'J-54453946E8D'"
"Could not read; currently locked by user 'admin' on machine
'J-54453946E8D'"
and
"You attempted to open a database that is already opened exclusively
by user 'admin' on machine XXXXX. Try again when DB is available."

It works so, that the summariser (a thread) can set a flag, which will
initiate the packing thread - basically without any delay except what
it within windows (and that is surprisingly slow). Could it be, that I
should wait a bit more?
The packing thread will set a flag in other threads forcing them to
stop, and wait for them to do so. That should not be a problem, and my
test case does not save at all, and still I get this - though rarely.
In real systems the errors in 2) comes from both saver thread and
summarised thread. The saver thread caches data, and saves them using
insert.... there is an ID, which the thread itself handles. That has
not caused problems so far.

Basically, I want to overcome those problems automatically. As of now
packing is forced as described above, but can anyone explain then
problems in 1) and 2) ?

WBR
Sonnich

Reply With Quote
  #2  
Old   
Salad
 
Posts: n/a

Default Re: DB crashes and packing - 04-15-2009 , 12:14 PM






jodleren wrote:

Quote:
Hi

We have some some systems, which save a lot of detailed/temporary data
to an access table (some ~10 tables in a file), and 3-4 tables are
heavily updated

every half our a summeriser goes over it, puts summarised data into
some other tables, and delete old data.

As of now, they system has not been packing itself automatically, but
we have added that now.
The question is, does that solve our problem?
Packing is done once a week, or when 15% of temp data are deleted.

Packing is also done, when the error
[Microsoft][ODBC Microsoft Access Driver] Record is deleted
occurs - that error is easily fixeable byt packing

but there are 2 other scenaries:

1) "bookmark not valid" - this errors happen now and then. Solution:
open it a use "compact and repair" from the tools - db tools menu

2) "Could not update; currently locked by user 'admin' on machine
'J-54453946E8D'"
"Could not read; currently locked by user 'admin' on machine
'J-54453946E8D'"
and
"You attempted to open a database that is already opened exclusively
by user 'admin' on machine XXXXX. Try again when DB is available."

It works so, that the summariser (a thread) can set a flag, which will
initiate the packing thread - basically without any delay except what
it within windows (and that is surprisingly slow). Could it be, that I
should wait a bit more?
The packing thread will set a flag in other threads forcing them to
stop, and wait for them to do so. That should not be a problem, and my
test case does not save at all, and still I get this - though rarely.
In real systems the errors in 2) comes from both saver thread and
summarised thread. The saver thread caches data, and saves them using
insert.... there is an ID, which the thread itself handles. That has
not caused problems so far.

Basically, I want to overcome those problems automatically. As of now
packing is forced as described above, but can anyone explain then
problems in 1) and 2) ?

WBR
Sonnich
For a bookmark problem, it may be something like doing something like
searching for a record, deleting it, then attempting to assign it's
bookmark to something else.

Look at OpenDatabase Method in help (and your code). Are you setting an
Exclusive flag someplace? On a desktop icon, does somebody have /excl
to open that file in the shortcut properties?

You might want to check if the file/tables can be opened prior to doing
an update.




Reply With Quote
  #3  
Old   
jodleren
 
Posts: n/a

Default Re: DB crashes and packing - 04-16-2009 , 02:13 AM



On Apr 15, 8:14*pm, Salad <o... (AT) vinegar (DOT) com> wrote:
Quote:
jodleren wrote:
Hi

We have some some systems, which save a lot of detailed/temporary data
to an access table (some ~10 tables in a file), and 3-4 tables are
heavily updated

every half our a summeriser goes over it, puts summarised data into
some other tables, and delete old data.

As of now, they system has not been packing itself automatically, but
we have added that now.
The question is, does that solve our problem?
Packing is done once a week, or when 15% of temp data are deleted.

Packing is also done, when the error
[Microsoft][ODBC Microsoft Access Driver] Record is deleted
*occurs - that error is easily fixeable byt packing

but there are 2 other scenaries:

1) "bookmark not valid" - this errors happen now and then. Solution:
open it a use "compact and repair" from the tools - db tools menu

2) "Could not update; currently locked by user 'admin' on machine
'J-54453946E8D'"
"Could not read; currently locked by user 'admin' on machine
'J-54453946E8D'"
and
"You attempted to open a database that is already opened exclusively
by user 'admin' on machine XXXXX. Try again when DB is available."

It works so, that the summariser (a thread) can set a flag, which will
initiate the packing thread - basically without any delay except what
it within windows (and that is surprisingly slow). Could it be, that I
should wait a bit more?
The packing thread will set a flag in other threads forcing them to
stop, and wait for them to do so. That should not be a problem, and my
test case does not save at all, and still I get this - though rarely.
In real systems the errors in 2) comes from both saver thread and
summarised thread. The saver thread caches data, and saves them using
insert.... there is an ID, which the thread itself handles. That has
not caused problems so far.

Basically, I want to overcome those problems automatically. As of now
packing is forced as described above, but can anyone explain then
problems in 1) and 2) ?

WBR
Sonnich

For a bookmark problem, it may be something like doing something like
searching for a record, deleting it, then attempting to assign it's
bookmark to something else.

Look at OpenDatabase Method in help (and your code). *Are you setting an
Exclusive flag someplace? *On a desktop icon, does somebody have /excl
to open that file in the shortcut properties?

You might want to check if the file/tables can be opened prior to doing
an update.
Hi

The problem: we do not use bookmarks :-)

As for the other, we only open it exclusively when packing. But, it
could be an idea to pack a copy of tghe DB, and only when succeeded we
copy that one back.... that should avoid that problem.

WBR
Sonnich


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.