Firebird 2.5.1 List of databases used by the server (superserver mode)

I want to write an administrative application in C ++ to simplify the management of the databases I am doing. Currently, when I want to say if there are users connected to multiple Firebird databases running in two different instances, I have to connect to each separate DB and check. This is fine, but I don't want to log every new database that is created when I am not looking, I want to somehow list the databases that are currently open or in use by another server. The current 2 uses of this functionality that I can think of are:

  • Automatic inclusion in the backup procedure
  • An app update that requires users to log out (one look and I could tell who to hit, or at least which one to call)
+3


source to share


1 answer


Firebird does not have an API to list all available databases. Technically, Firebird simply doesn't know the database exists until you actually connect to it.



You may be able to find all the databases that connect using the Trace API or monitoring tables, but this does not exclude the possibility of other databases on your system.

+2


source







All Articles