Subject Re: [firebird-support] Refusing Connections/New Actions to New/Existing users
Author Ann W. Harrison
Photios Loupis (4T) wrote:
>
> The plan was to be able to perform the following maintenance of the
> databases. Not necessarily every night, probably a SWEEP and BACKUP
> every night (EARLY morning), and then the following twice a week.

> 1- SWEEP the database
> 2- "gfix -shut" the database

I'd do the rename here, as soon as all connections have exited.

> 3- MEND the database

I wouldn't do a mend unless I'd done a validate and found a problem.

> 4- VALIDATE the database
> 5- RENAME the database
> 6- GBAK -B the database

If your intention is to replace the database file, do the gbak with the
-g switch so you don't spend a lot of time cleaning up the garbage in a
file you're going to delete.

> 7- GBAK -B -R the database to its original name
>
As a general thing, don't use gbak -r. It's way too dangerous. The -c
creates a new database but won't replace an existing one.

All that and no answer to why you continue to be able to connect to a
database that's shutdown.

Here's a part of a message from Helen on the subject from a month ago:

gfix -f prevents all new transactions or attachments immediately, but it
does give users a timeout to enable them to commit work they have pending.

Firebird has two gentler ways to shutdown. gifx -tr n disallows further
transactions and, after n seconds, will shut down if no existing
transactions are still running. Naturally, no new attachments can be made
during this timeout period, since connecting requires a transaction. gfix
-at n blocks all new attachments until the timeout and will go into full
shutdown if there are no existing connections.

Regards,


Ann