File size warning

  • Thread starter Thread starter Herb
  • Start date Start date
H

Herb

Is there a way of implementing some kind of automatic "file size
warning" that would remind me to compact certain database files (MS
Access format) when they reach a critical size?

Thank you.

Herbert Eppel
 
Herb said:
Is there a way of implementing some kind of automatic "file size
warning" that would remind me to compact certain database files (MS
Access format) when they reach a critical size?

Thank you.

Herbert Eppel

You could monitor the size of this file as part of
your logon process, by running a netlogon batch
file that pauses when the size of the file exceeds
a certain number. What's a critical size, anyway?
 
You could monitor the size of this file as part of
your logon process, by running a netlogon batch
file that pauses when the size of the file exceeds
a certain number. What's a critical size, anyway?

Sounds promising, thank you!

However, I'm not familiar with netlogon batch procedures - is it quite
straightforward?

I'm no expert in these matters, but I understand in my case the limit is
1 GB (determined by MS Jet 3.5, see
<http://tech.groups.yahoo.com/group/dejavu-l/message/55555>).

In practice, the size of my largest database file currently is about 550
MB when compacted. This is my main work file and the size regularly
increases gradually (or sometimes more rapidly, depending on database
operations) to over 700 MB (during a database repair it may even exceed
800 MB).

One thing I never understood is what exactly would happen if the size
did exceed 1 GB for some reason? Presumably the database would become
corrupted?

In any case, my aim is to implement some kind of 'warning system' so
that I can compact the database manually when the size reaches, say, 750 MB.

Herbert Eppel
 
Access databases I believe are limited to ~ 2 gB in size. If yours is .5 gB
then I'd look at moving the backed to MSDE or SQL 2005 Express. Access is a
fantastic tool and I do a fair amount of development with it but using it
for a data store (especially that large) is asking for trouble.

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| Sounds promising, thank you!
|
| However, I'm not familiar with netlogon batch procedures - is it quite
| straightforward?
|
| I'm no expert in these matters, but I understand in my case the limit is
| 1 GB (determined by MS Jet 3.5, see
| <http://tech.groups.yahoo.com/group/dejavu-l/message/55555>).
|
| In practice, the size of my largest database file currently is about 550
| MB when compacted. This is my main work file and the size regularly
| increases gradually (or sometimes more rapidly, depending on database
| operations) to over 700 MB (during a database repair it may even exceed
| 800 MB).
|
| One thing I never understood is what exactly would happen if the size
| did exceed 1 GB for some reason? Presumably the database would become
| corrupted?
|
| In any case, my aim is to implement some kind of 'warning system' so
| that I can compact the database manually when the size reaches, say, 750
MB.
|
| Herbert Eppel
| --
| www.HETranslation.co.uk
 
Access databases I believe are limited to ~ 2 gB in size. If yours is .5 gB
then I'd look at moving the backed to MSDE or SQL 2005 Express. Access is a
fantastic tool and I do a fair amount of development with it but using it
for a data store (especially that large) is asking for trouble.

Hi Dave,

in my case I'm pretty sure the limit is 1 GB because (for good reasons)
I'm using a relatively old version of a third-party program (see
<http://tech.groups.yahoo.com/group/dejavu-l/message/55555> for
background information).

My database manipulation options are limited because they files are
created by the third-party program and I have to use the in-built
functionality of that program for any manipulations (i.e. as far as I am
aware I can't do it directly in Access).

I would therefore be quite happy with a rudimentary file size warning
feature along the lines suggested by Pegasus.

Regards

Herbert Eppel
 
Herb said:
Sounds promising, thank you!

However, I'm not familiar with netlogon batch procedures - is it quite
straightforward?

I'm no expert in these matters, but I understand in my case the limit is
1 GB (determined by MS Jet 3.5, see
<http://tech.groups.yahoo.com/group/dejavu-l/message/55555>).

In practice, the size of my largest database file currently is about 550
MB when compacted. This is my main work file and the size regularly
increases gradually (or sometimes more rapidly, depending on database
operations) to over 700 MB (during a database repair it may even exceed
800 MB).

One thing I never understood is what exactly would happen if the size
did exceed 1 GB for some reason? Presumably the database would become
corrupted?

In any case, my aim is to implement some kind of 'warning system' so
that I can compact the database manually when the size reaches, say, 750 MB.

Herbert Eppel

Use notepad.exe in order to create the file
c:\documents and settings\all users\start menu\programs\startup\netlogon.bat

and place these lines inside:

@echo off
set MaxSize=750000000
for %%a in (d:\big.dbf) do if %%~za GTR %MaxSize% call :sub %%~za
goto :eof

:Sub
set /a S=%1/1000000
echo.
echo The size of the database is now %S% MBytes.
echo.
echo Press the Space Bar to close this window.
pause > nul

Because the file resides in the startup directory, it will execute
each time you log on.
 
Use notepad.exe in order to create the file
c:\documents and settings\all users\start menu\programs\startup\netlogon.bat

and place these lines inside:

@echo off
set MaxSize=750000000
for %%a in (d:\big.dbf) do if %%~za GTR %MaxSize% call :sub %%~za
goto :eof

:Sub
set /a S=%1/1000000
echo.
echo The size of the database is now %S% MBytes.
echo.
echo Press the Space Bar to close this window.
pause > nul

Because the file resides in the startup directory, it will execute
each time you log on.

That looks very promising indeed, thank you very much!

Excuse my ignorance in these matters, but am I right in assuming that I
have to replace "d:\big.dbf" with the path\name of my actual database file?

Thank you.

Herbert Eppel
 
Herb said:
That looks very promising indeed, thank you very much!

Excuse my ignorance in these matters, but am I right in assuming that I
have to replace "d:\big.dbf" with the path\name of my actual database file?

Yes.
 
Very easy to link tables in Access to an SQL backend. This way the
application is unaware of the change.

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| Hi Dave,
|
| in my case I'm pretty sure the limit is 1 GB because (for good reasons)
| I'm using a relatively old version of a third-party program (see
| <http://tech.groups.yahoo.com/group/dejavu-l/message/55555> for
| background information).
|
| My database manipulation options are limited because they files are
| created by the third-party program and I have to use the in-built
| functionality of that program for any manipulations (i.e. as far as I am
| aware I can't do it directly in Access).
|
| I would therefore be quite happy with a rudimentary file size warning
| feature along the lines suggested by Pegasus.
|
| Regards
|
| Herbert Eppel
| --
| www.HETranslation.co.uk
 
Use notepad.exe in order to create the file
c:\documents and settings\all users\start menu\programs\startup\netlogon.bat

and place these lines inside:

@echo off
set MaxSize=750000000
for %%a in (d:\big.dbf) do if %%~za GTR %MaxSize% call :sub %%~za
goto :eof

:Sub
set /a S=%1/1000000
echo.
echo The size of the database is now %S% MBytes.
echo.
echo Press the Space Bar to close this window.
pause > nul

Because the file resides in the startup directory, it will execute
each time you log on.

Hello again,

at first this didn't work, but then I realised that I have to enclose
the path names in quotes because my path name contains a space!

It now works very well - thank you very much again for your time.

I guess the next step would be to automatically call up my third-party
translation memory database program (which, incidentally, is called Déjà
Vu - see http://www.atril.com/) and compact the file in question, but
I'm not sure whether the program allows compaction to be run from the
command line :-\

Perhaps I need to ask this question in the Déjà Vu support forum?

Regards

Herbert Eppel
 
Herb said:
Hello again,

at first this didn't work, but then I realised that I have to enclose
the path names in quotes because my path name contains a space!

It now works very well - thank you very much again for your time.

I guess the next step would be to automatically call up my third-party
translation memory database program (which, incidentally, is called Déjà
Vu - see http://www.atril.com/) and compact the file in question, but
I'm not sure whether the program allows compaction to be run from the
command line :-\

Perhaps I need to ask this question in the Déjà Vu support forum?

Regards

Herbert Eppel
--

Thanks for the feedback and yes, a Déjà Vu forum would be
the right place to ask this question.
 
You could write a simple utility in .NET using the directory watcher
component. It is very simple, and you could even have it run the compaction
by itself whenever the critical size is reached. You DON"T need to move to
SQL Server. The cost is over ten thousand dollars for a single processor
license. Why is it that Access is marketed as a database product, yet when
it gets used, they tell you to buy SQL server? If Access can't handle data,
then it should be taken off the market. The fact is, I've known people who
had Access databases grow to very large sizes, and then they simply split
them. Very simple, and cost affective. (You simply end up with 2 or more
smaller databases). Also, SQL Server or MSDE will tie you to a single
server. With access, you can drop the file on an external drive, or use it
on multiple computers. If you do need to access it from the network, you can
simply set up a datasource on the computer and have multiple computers use it
at the same time. It is pretty fast, and you won't have to hire a DBA just
to manage it.
Sorry to get on my soapbox, but not everyone can afford to buy SQL server, a
dedicated server, and all that. I think that Access is more than sufficient
for more than 70% of enterprise database needs, and in most cases, SQL Server
or Oracle 10g would be major overkill. With Access, all you need is Access.
With SQL server, you need to make sure you have a computer that can handle
it, plenty of memory, and (of course) pay a large license fee. Not only
that, but next someone will recomend that you deploy this on a Windows 2003
server. Access works fine on Windows 98. Backups with access are as simple
as making a copy of the .mdb file. In client server DBMS you must have a
plan for backups, and it is usually much more complicated than simply copying
the file to a backup storage location. My son can manage Access databases,
with no training, spending only a few minutes a day. He would have to go to
school to learn SQL Server. Which is really more cost effective?
I have been using databases since they existed. Now I use MySql, which is
more powerful than most databases, and is free. Plus, you can keep your data
in a MDB file, but it can grow to as large as your filesystem's file limit
is. Also, you can use it from windows 3.1 through XP. Your other
applications won't even know the difference. I hope you can solve your
problem. Let me know if you need help with a .Net application which will
monitor the file and notify you when it becomes massive. It can be done in a
couple of hours, and I would gladly write it for you in Visual Basic.NET
2005, and I would give you the source code.
 
You should reply to the OP - ***he*** needs this tool,
I don't. The question is whether he still monitors this thread,
more than two weeks after it ran dry.
 
You should reply to the OP - ***he*** needs this tool,
I don't. The question is whether he still monitors this thread,
more than two weeks after it ran dry.

Hi,

I stopped monitoring this thread/group but now I'm back because I have
another question :-)

I'll start a new thread.

Regards

Herbert Eppel
 
You could write a simple utility in .NET using the directory watcher
component. It is very simple, and you could even have it run the compaction
...........

Sorry to get on my soapbox, but not everyone can afford to buy SQL server, a
...........

applications won't even know the difference. I hope you can solve your
problem. Let me know if you need help with a .Net application which will
monitor the file and notify you when it becomes massive. It can be done in a
couple of hours, and I would gladly write it for you in Visual Basic.NET
2005, and I would give you the source code.

Hi Leticia,

thanks for your message and your offer to help.

However, I'm not quite sure what all this SQL/Access rant was about and
in any case, the netlogon.bat solution suggested by Pegasus works very
well indeed!

Regards

Herbert Eppel
 
Back
Top