Subject Re: [Firebird-Java] Users Connected
Author Francisco Antonio Vieira Souza
Thanks a lot for your long answer.

Well, about backingup and restoring, the reason is that when we perform
that its is made a kind of "cleaning" in the DB, am I right?

My user makes lots of lots of INSERT and DELETEs, so after a while the
DB gets slower.

That's the reason, actually right now I have already in my application
the procedure of creating backup using GBACK.

So I wanted to do the oposite with all connections closed.

Steffen Heil wrote:

>>You can restore and backup DB with worked user. Fierbird not
>>lock DB file. I recommend restore DB in temporary file, and
>>It rename to final DB name after good restore.
>No. No. No. No. Never !!!
>You really want to restore a database to a temporary file and the rename it,
>replacing the "old" version?
>Even if firebird does not lock the db (which I never tried on linux - it
>does so on windows) it definitely keeps it open. So if you replace the file
>(or better: the filename), the file handle will still use the old file
>(which is not linked in the filesystem anymore)!
>Therefor every change will be lost (every change since backup and because of
>the file handle even every change afterwards)!
>Shut down the database completely (there is a command for this I don't
>remember right now). Backup, restore, and bring the database online again...
>No other way.
>But on the other hand? Why would you want to backup and restore? Backup is a
>good idea, so is restoring for test of validity of the backup, but restore
>it somewhere else, not replacing your old db...
> Steffen

boolean ever = true;
for (;ever;)