How to identify the Firebird Server Operating System via SQL?

2

In postgresql you have the table version where all the data that I need, will be in it. Ex.:

SQL:

Select * from version()

Result:

PostgreSQL 9.2.3 on x86_64-unknown-linux-gnu, compiled by gcc (SUSE Linux) 4.8.3 20140627 [gcc-4_8-branch revision 212064], 64-bit

Is there something like this in Firebird, or something similar that returns the operating system and platform?

    
asked by anonymous 21.11.2016 / 20:15

1 answer

1

I used the following command to check the Operating System:

select rdb$get_context('SYSTEM', 'DB_NAME') from rdb$database

With this return, I can tell if the platform is Windows or Linux:

Return Windows:

c:/application/data/mydatabase.fdb

Linux Return:

/application/data/mydatabase.fdb

With this I load my UDF (.dll / .so) created in C ++ that allows me to execute commands on the system (cmd / prompt).

And with this guy I can get any information from the system.

    
24.11.2016 / 20:45