Subject How can I check if a database is online or shutdown?
Author Jose Ostos
I am using firebird 2.0.1 and delphi 7.

I want to to a program a procedure to backup and/or restore a database.
My program would first do the following:
a) That only the user doing the backup is logged in
b) check that the user is only user is SYSDBA
c) Chech if the database is "online" or "Shutdown". (don't know how to
do this)
d) Shudown DB if not already shutdow.
e) do the operation (backup or restore)
f) Bring DB Online

If something goes wrong somewhere in between, the DB can be "online" or
"Shutdown" depending on where it failed. I get an error if I try to
"shutdown" a DB that is already "Shutdown" or if I try to bring "online"
a DB that is already "online" so I can't seem to run any of these
processes "just to make sure".

Thanks in advance,
Jose Ostos