Backup 3rd party database

J

Joe

The engineering department here uses a commercial application to collect data
from multiple devices during production runs. The application generally runs
unattended, and reports are run remotely. The data collected is legally
required to be available for inspection, so I need to make sure it gets
backed up. However, the application usually runs 24/7. Since it is a 3rd
party app, I don't have the ability to write VB code or macro in the app to
do a backup (or compact/repair.) Can anyone recommend a way to
programatically backup the database files (it appears to open 3 mdb files
with corresponding ldb files.) Putting a script in the Windows Scheduler is
the approach I was thinking about.

Thanks!
Joe
 
K

Klatuu

Here is an example pulled from an application we run weekly to compact and
repair over 300 mdb files:

strTmpPath = Replace(strFullPath, ".mdb", "_TMP.mdb")
If IsNull(![MDB_PWD]) Then
DBEngine.CompactDatabase strFullPath, strTmpPath
Else
DBEngine.CompactDatabase strFullPath, strTmpPath, ,
";pwd=" & ![MDB_PWD]
End If
Kill strFullPath
Name strTmpPath As strFullPath


The problem you will encounter, however, is that since the apps run 24/7,
you may not be able to compact and repair them. There is no way to compact
and repair an mdb file that is open. If you try, you will get an error 3356
 
T

Tony Toews [MVP]

Joe said:
The engineering department here uses a commercial application to collect data
from multiple devices during production runs. The application generally runs
unattended, and reports are run remotely. The data collected is legally
required to be available for inspection, so I need to make sure it gets
backed up.

Does the commercial app vendor have any such routines? Surely you
can't be the only person with this problem.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
J

Joe

Tony,
The problem is that the version they are running is old and no longer
supported by the vendor. An upgrade is planned but no one knows when that
will happen.

Thanks,
Joe
 
J

Joe

Dave,
Thanks for the reply. I'm assuming the code below is included in a macro in
each mdb file? Since my app is a run time version, I have no ability to add
an internal macro. I need to run this externally from the app. Can you
suggest a way to do this using either a) a simple batch file, or b) from a
second app?

I have just confirmed that I CAN shutdown the app to do the backup and
compact/repair. Is there a way to shutdown and then restart the app from the
backup approach?

Thanks a bunch,
Joe


Klatuu said:
Here is an example pulled from an application we run weekly to compact and
repair over 300 mdb files:

strTmpPath = Replace(strFullPath, ".mdb", "_TMP.mdb")
If IsNull(![MDB_PWD]) Then
DBEngine.CompactDatabase strFullPath, strTmpPath
Else
DBEngine.CompactDatabase strFullPath, strTmpPath, ,
";pwd=" & ![MDB_PWD]
End If
Kill strFullPath
Name strTmpPath As strFullPath


The problem you will encounter, however, is that since the apps run 24/7,
you may not be able to compact and repair them. There is no way to compact
and repair an mdb file that is open. If you try, you will get an error 3356
--
Dave Hargis, Microsoft Access MVP


Joe said:
The engineering department here uses a commercial application to collect data
from multiple devices during production runs. The application generally runs
unattended, and reports are run remotely. The data collected is legally
required to be available for inspection, so I need to make sure it gets
backed up. However, the application usually runs 24/7. Since it is a 3rd
party app, I don't have the ability to write VB code or macro in the app to
do a backup (or compact/repair.) Can anyone recommend a way to
programatically backup the database files (it appears to open 3 mdb files
with corresponding ldb files.) Putting a script in the Windows Scheduler is
the approach I was thinking about.

Thanks!
Joe
 
T

Tony Toews [MVP]

Joe said:
The problem is that the version they are running is old and no longer
supported by the vendor. An upgrade is planned but no one knows when that
will happen.

<shrug> Well, seems to me you have an excellent reason for "them" to
upgrade.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top