Search code examples
c#sqlfirebirdfirebird2.5

FirebirdSQL getting list of databases in C#?


I need to get the list of databases from a Firebird server in a computer. I want to select and backup whichever database I want. Microsoft SQL Server has that feature, I think you can see the databases connect a server. Is there such thing in Firebird? Or is there a workaround? I am working with Firebird 2.5, but if there is a version it is possible you can let me know.


Solution

  • Firebird has no feature to list databases, because technically Firebird doesn't know which databases exist on a server (except those defined in aliases.conf/databases.conf, but those aren't exposed either).

    For Firebird, a database is defined entirely by a database file that is either referenced by a full file path or an alias (which points to a file path). If the file exists, the Firebird process has sufficient access rights to the file, and the file has an On-Disk Structure (ODS) the server understands, you can connect to it.

    This is different from SQL Server, where the server holds a list of databases, and you can only connect to databases defined in that list.