Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ways to Determine the Version of Firebird SQL?

Exist any Way to Determine the Version of Firebird SQL is running? using SQL or code (delphi, C++).

Bye

like image 890
RRUZ Avatar asked Aug 08 '09 05:08

RRUZ


People also ask

How do I know what version of Firebird I have?

You can find your Firebird Server version by clicking the Check Firebird Version button in the Database Connection window using the menu option Tools --> Database Connection.

How do I check my Firebird server?

To check that the Firebird Server is running in Windows just go to Services applet and check for Firebird Server and Firebird Guardian services. Alternatively, if you used the installer Firebird will have installed a Server Control Applet in the Control Panel.

What type of database is Firebird?

Firebird is an open-source SQL relational database management system that support Linux, Microsoft Windows, macOS and other Unix platforms. The database forked from Borland's open source edition of InterBase in 2000 but the code has been largely rewritten since Firebird 1.5.

How do I list databases in Firebird?

SQL> SHOW DB; The show database (or show db) command displays details about the current database.


2 Answers

If you want to find it via SQL you can use get_context to find the engine version it with the following:

SELECT rdb$get_context('SYSTEM', 'ENGINE_VERSION') 
             as version from rdb$database;

you can read more about it here firebird faq, but it requires Firebird 2.1 I believe.

like image 135
Re0sless Avatar answered Oct 05 '22 23:10

Re0sless


Two things you can do:

  • Use the Services API to query the server version, the call is isc_service_query() with the isc_info_svc_server_version parameter. Your preferred Delphi component set should surface a method to wrap this API.
    For C++ there is for example IBPP which has IBPP::Service::GetVersion() to return the version string.
    What you get back with these is the same string that is shown in the control panel applet.

  • If you need to check whether certain features are available it may be enough (or even better) to execute statements against the system tables to check whether a given system relation or some field in that relation is available. If the ODS of the database is from an older version some features may not be supported, even though the server version is recent enough.
    The ODS version can also be queried via the API, use the isc_database_info() call.

like image 43
mghie Avatar answered Oct 05 '22 23:10

mghie