Ive been playing around with Firebird and isql. I noticed it has the 'shell' command. However this shell drops you to a sub-process on the local system regardless if your connected to a remote DB. Is it possible to run system level commands on Firebird on the system hosting the DB? Google seems to be useless with regards to Firebird, I have read the documentation for Firebird too and dont see any mention of it.
Asked
Active
Viewed 1,210 times
2 Answers
3
The only way to do it is to write UDF function (in such languages like Delphi or C/C++). But even if you write or find such a function, its usefulness may be limited because Firebird can run under special user account with limited rights.

Grzegorz Skoczylas
- 239
- 4
- 6
-
So as long as u user account has system level access it is possible. I have no idea about udf functions so ill start digging – iNoob Apr 08 '14 at 21:48
-
ive just looked at UDFs they are simply functions like any function they do a specific job and as its a SQL UDF its made up of sql statements. If its possible to run system commands via a UDF then it must be some sql statement/s that can be used to accomplish it? – iNoob Apr 08 '14 at 22:07
-
3@iNoob No, in Firebird an UDF is a function that calls into a (native) method defined in `.dll` or `.so`; if that method can execute system commands, then you can use that UDF to execute system commands; however you would need to program it yourself, by default Firebird has no such UDF (and having such a UDF in itself would be a big security risk!). – Mark Rotteveel Apr 09 '14 at 07:20
-
@Mark Rotteveel thanks for explaining. I assume this UDF would need to be local to the firebird install? Or could it be run remotely from a client via isql or simalr interfaces? – iNoob Apr 09 '14 at 07:38
-
The UDF needs to be local to Firebird, in a folder that is set in the `firebird.conf` as allowed for UDFs; you also need to 'register' the UDF in the database. – Mark Rotteveel Apr 09 '14 at 09:03
1
There is no way to execute shell commands in remote system via isql
.

ain
- 22,394
- 3
- 54
- 74
-
On remote server? No. There is other tools for that, `isql` is just "interface to the Firebird". – ain Apr 08 '14 at 20:02
-
1Im aware isql is an interface for firebird. However I was trying to understand if firebird had functionality that rivaled mssql (xp_cmdshell) – iNoob Apr 08 '14 at 20:05