Subject | Re: Clear database cache? |
---|---|
Author | Matthew Metlis |
Post date | 2008-02-01T00:12:50Z |
Ann,
Thanks for the response. Replacing the data file through the
application is something that has to be done. The application is
deployed to non-technical users on systems to which I do not have
access most of the time. Each application uses its own database
resident on its own system, so I do not have access to the databases
either. Frequent (every 5 minutes) automated backups along with the
option to restore the data from a backup are a requirement of the
system - and a non-technical user has to be able to perform that
restoration.
When the application does a restore, it does first block the user from
making any data changes (or doing anything besides watching a progress
bar, really), closes its connections to the database, does the restore
of the data file, opens new connections, and then lets the user resume
work. There also can only be one application open for a single
database. So there is nothing the user can do during the restore
process that would be lost. We do emphasize to the users that if they
restore a backup, they will lost whatever data has been entered since
that backup.
Still, though, after doing that process, there seem to be issues when
entering new data.
--- In firebird-support@yahoogroups.com, "Ann W. Harrison"
<aharrison@...> wrote:
Thanks for the response. Replacing the data file through the
application is something that has to be done. The application is
deployed to non-technical users on systems to which I do not have
access most of the time. Each application uses its own database
resident on its own system, so I do not have access to the databases
either. Frequent (every 5 minutes) automated backups along with the
option to restore the data from a backup are a requirement of the
system - and a non-technical user has to be able to perform that
restoration.
When the application does a restore, it does first block the user from
making any data changes (or doing anything besides watching a progress
bar, really), closes its connections to the database, does the restore
of the data file, opens new connections, and then lets the user resume
work. There also can only be one application open for a single
database. So there is nothing the user can do during the restore
process that would be lost. We do emphasize to the users that if they
restore a backup, they will lost whatever data has been entered since
that backup.
Still, though, after doing that process, there seem to be issues when
entering new data.
--- In firebird-support@yahoogroups.com, "Ann W. Harrison"
<aharrison@...> wrote:
>
> Matthew,
> >
> > To give a little more info on my problems: I am using firebird in a
> > Java application deployed to users on Windows XP. There are different
> > scenarios under which I need to programmatically restore a database
> > backup (I'm using gbak for this). In one place where the application
> > does this, I can consistently reproduce inaccurate results from
> > queries afterwards if I do not restart my application after the
> > restore before the queries. Inserts actually insert but gets seem to
> > be using data ignoring the inserts that occurred after the restore, at
> > least for the first insert/get pair. I am guessing that I am getting
> > values cached from the old pre-restore database for the gets.
>
> What you're doing is unsafe. You're replacing a data file under
> a running application. Don't do it. Shutdown your clients before
> you begin the backup and restart them after the restore completes.
> Otherwise, you'll lose any work they do between the two events.
>
>
> Good luck,
>
>
> Ann
>