Subject | RE: [firebird-support] shutdown a single database at a server with many databases |
---|---|
Author | Nigel Weeks |
Post date | 2006-08-31T05:39:12Z |
If you're using unix, you could do the following:
chown root:firebird database.fdb
chmod 770 database.fdb
With these settings, both root and anyone in the firebird group (the
firebird user) have full access, and anyone else is denied direct filesystem
access.
To lock out the firebird user(stopping connections), do the following:
chmod 700 database.fdb
Now, run your backups or maintenance as the root user, and you won't be
interrupted.
Nige.
chown root:firebird database.fdb
chmod 770 database.fdb
With these settings, both root and anyone in the firebird group (the
firebird user) have full access, and anyone else is denied direct filesystem
access.
To lock out the firebird user(stopping connections), do the following:
chmod 700 database.fdb
Now, run your backups or maintenance as the root user, and you won't be
interrupted.
Nige.
> -----Original Message-----
> From: firebird-support@yahoogroups.com
> [mailto:firebird-support@yahoogroups.com]On Behalf Of Helen Borrie
> Sent: Thursday, 31 August 2006 9:16 AM
> To: firebird-support@yahoogroups.com
> Subject: Re: [firebird-support] shutdown a single database at a server
> with many databases
>
>
> At 04:12 AM 31/08/2006, you wrote:
> >At the server there exists
> >many other databases which must be kept alive.
> >
> >So only one database needs to be handled by a forced shutdown
> >command by an my update.exe program, which calls different script-
> >files.
> >
> >I have tried to use this command: "gfix -shut -force 2 -user
> >{username} -password {db password} {dbname}". This command only
> >works if I allready have started a program with an access to the
> >given database - the program canø't run anymore. But the other thing
> >I need to do is to prevent new programs starting up while I an doing
> >the updatejob.
>
> The engine doesn't know about
> "programs". Shutting down a database prevents
> any *new* transactions (-t) or attachments (-a)
> during the specified timeout period. If any
> existing attachments are still active after the
> timeout period the shutdown lapses and you need to try again.
>
> The -f[orce] switch shuts down the database after
> the timeout period, regardless. It's an
> emergency option. A timeout period of 2 seconds is a bit
> unrealistic though.
>
> You have to understand that access to a shutdown
> database is blocked to ordinary users, but not to
> the sysdba or the owner. So a DB shutdown of any
> type is useless if your applications let everyone
> log in as either of these users.
>
> If this is the way you are doing things then the
> only way to keep others out will be to change the
> sysdba and owner passwords before you do the
> shutdown. Of course, if access to all databases
> in your system is via the sysdba login, the
> side-effect of this will be to lock out new
> attachments to the other databases as well.
>
> Fb 2.0 has some additional shutdown options,
> including one that does block new attachments by the sysdba/owner.
>
> ./helen
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>