Questions tagged [firebird]

Firebird is a free and open-source, cross-platform, client-server SQL relational database management system, running on Linux, Unix, and Windows. Please mention your exact Firebird version when asking questions.

Filter by
Sorted by
Tagged with
0 votes
0 answers
7 views

Sudden huge RAM usages with FireBird 4.0

Since about 2 weeks I have a sudden memory issue with 1 of our Firebird servers. For context: We have servers on 4 physical locations, each with a VM dedicated to Firebird and the connecting ERP pack. ...
Jeroen van der Weyde's user avatar
0 votes
0 answers
34 views

Recompiling stored procedures result in error "function SHASH_HMAC is not defined. module name or entrypoint could not be found."

I want to migrate database to new server, and I have problem with stored procedures compilation. I have error like this: Invalid token. invalid request BLR at offset 588. function SHASH_HMAC is not ...
MarekOadmin's user avatar
0 votes
0 answers
56 views

How to show all hours even no data in Firebird?

I want to write a query that shows all hours (for getting total order) between start date and end date even no data. Result should be like this: count extract(hour) date 0 1 2020-12-03 10 2 2020-12-...
Sunny's user avatar
  • 1
2 votes
1 answer
581 views

How do I get the date next week in SQL (Firebird)?

I want to get a date using an SQL statement. For instance, if the date is '2018-08-07' output this should return: '2018-08-14' (one week later). Then I'm going to get the total rows between these ...
sunShine's user avatar
0 votes
0 answers
70 views

How can i configure server in firebird.conf?

I want to connect an FDB database. However, no permission for all paths for this. And my FDB files are not in a path with permission. That's why I wanna make some changes in firebird.conf for server ...
sunShine's user avatar
1 vote
1 answer
85 views

How can i solve Statement failed problem?

I am trying to connect FDB file on Ubuntu. ubuntu@me:/opt/firebird/bin$ sudo ./isql Use CONNECT or CREATE DATABASE to specify a database No entry for terminal type "xterm-256color"; using ...
sunShine's user avatar
2 votes
1 answer
554 views

How to enable authentication logs in Firebird 2.5?

I downloaded Firebird 2.5 from the official website and installed on a Linux machine. The install location is /opt/firebird. I want to be able to view authentication attempt logs for security reasons (...
Lucas Miranda's user avatar
0 votes
1 answer
46 views

Output days since nth event

I have a table Events in a Firebird database (version 3.0.8) that records how many times an event occurs. Example below: Date EventCount 22-04-01 15 22-09-30 10 22-10-01 1 22-10-04 1 I would ...
hiigaran's user avatar
  • 101
0 votes
0 answers
532 views

Firebird database - isql command not found

I have a problem with the firebird database. When I use docker run -it jacobalberty / firebird bash my isql command works but when i run docker exec -it firebird bash my isql command no longer works ...
Alex Pantea's user avatar
0 votes
1 answer
199 views

SQL to add zeros in front of existing data to meet field length

How to add zeros in front of existing data of NationalityCode field to make the length 5 ?
Nukool's user avatar
  • 5
0 votes
1 answer
54 views

Result set with multiple rows based on max date and not NULL

Staff changed their profiles as shown in this table: The result of latest information should be like this: I applied the technique from this question for embedded Firebird of LibreOffice Base, the ...
Nukool's user avatar
  • 5
1 vote
1 answer
140 views

Is it safe to rely on transactions in Firebird 2.5 Embedded DB in case of power outage?

How it's safe to say that the following list of action will never be reflected in DB in case of power outage somewhere in the middle of #2 line, before transaction is committed? #1 begin transaction #...
Andrei Orlov's user avatar
4 votes
1 answer
750 views

Problem with enabling System Audit (Firebird's Trace and Audit Services)

I would like to enable System Audit on my Firebird 2.5.9.27139 (x64) database (Windows 10), to inspect all queries performed on it. I've already read some docs about what the configuration file should ...
Adam Przedniczek's user avatar
2 votes
1 answer
285 views

Incompatibility between unixODBC and Firebird ODBC driver

I'm currently developing a application based in Rcode, ODBC and Firebird. For that, first I've installed firebird server and unixODBC (both 64 bits since my machine OS is 64-bits). I tried with 32-...
dwenzel's user avatar
  • 63
0 votes
0 answers
198 views

Firebird begin backup and forced writes off, timestamp update delayed

We have a Firebird database that's almost 200 Gbyte in sice, and for performance we have forced writes off. Please don't debate the risks of forced writes, we are aware of them. This is Firebird 3.0.4 ...
Kjell Rilbe's user avatar
0 votes
1 answer
235 views

Firebird isql exclusive mode?

I have a vague recollection that Firebird's isql utility will in some situations make an exclusive connection to the database, meaning that any other connection attempts will be refused. I fail to ...
Kjell Rilbe's user avatar
1 vote
1 answer
232 views

Is it safe to risk multiple Firebird nbackup -L?

I'm using Firebird 3.0 nbackup to lock + copy + unlock each night. If some steps fail or are skipped e.g. due to system restart (updates), it may happen that the master is not unlocked (-N). Next ...
Kjell Rilbe's user avatar
0 votes
2 answers
771 views

How to get (format) a Firebird v3 DATEDIFF() to the number of years, months and days all together?

In Firebird 3 I can use DATEDIFF() with either YEAR, MONTH or DAY to get the number of years, months or days respectively. I need a way to get all-in-one years, months and days. For example: 412 ...
Tomay's user avatar
  • 21
0 votes
0 answers
837 views

What is the equivalent of OVER (PARTITION BY Account ORDER BY TranDate ROWS UNBOUNDED PRECEDING) for Firebird v2.5?

I need an equivalent way to getting OVER (PARTITION BY Account ORDER BY TranDate ROWS UNBOUNDED PRECEDING) for Firebird v2.5 Here is the full code: DECLARE @Test TABLE ( Account INTEGER, ...
Tomay's user avatar
  • 21
1 vote
2 answers
531 views

Is there any workaround to make Firebird v2.5 under Arch Linux attach existing databases and open them?

I have tried almost everything to get Firebird v2.5 under Arch Linux connect to an existing .fdb database without getting the error message: *** IBPP::SQLException *** Context: Database::Connect ...
Tomay's user avatar
  • 21
-1 votes
1 answer
79 views

Pivoting date data [duplicate]

How to join all different rows with the same ID but a different DATE and return it as a unique row with new columns like DATE_0, DATE_1, DATE_2, ...? Consider this table: +----+------------+ | ID | ...
Tomay's user avatar
  • 21
-1 votes
2 answers
303 views

Query speed improvement (opening stock, running stock and closing stock)

I have a table (refer to below structure) where I track all stock ins and outs. Now I want to generate a report from this table to find the opening_stock, purchased, purchased_return, sales, ...
Core's user avatar
  • 162
2 votes
1 answer
1k views

firebird 3 identity column - return last inserted id

I am using FireDAC in Delphi 101. Berlin and I want to get the last inserted id of IDENTITY DATA TYPE column after executing insert query but, the returned value is empty. Query: INSERT INTO ...
Core's user avatar
  • 162
4 votes
1 answer
947 views

Firebird COUNT is very slow compared to SQLite

I am using Firebird for past few months and today a customer complained about performance issue. I checked into client's database and they had 167,77,216 rows in one table. So I made a clone of that ...
Core's user avatar
  • 162
0 votes
0 answers
780 views

Firebird: show tables command shows no result in different environment

I'm using firebird with docker with the image jacobalberty/firebird:2.5.8-sc I use it in local and in the remote server. The problem is the database seems unreadable in the remote server, it says no ...
otong's user avatar
  • 101
2 votes
1 answer
96 views

Filter on value in another row

Please see image of the data and my code so far. In this example I only want the first two rows to be retrieved. The reason for this is because where JobID is 1684 the sum of STILL_REQUIRED is > 0 ...
user167070's user avatar
0 votes
2 answers
353 views

SQL firebird dont select rows with 0

This works fine, except in the results, I don't want the rows where STILL_REQUIRED is 0. I am using firebird. Select ID, JobID, NAME, ORDERNUM, STARTAFTER, FINISHBEFORE, START_OFFSET_MINS, ...
Simon's user avatar
  • 1
1 vote
1 answer
194 views

Hide table structure to users in firebird

I have been searching for a way to hide tables structures for some user but without success. I need that some users can only browse two views, but they don't be able to browse tables structures. Is ...
briast's user avatar
  • 111
1 vote
1 answer
2k views

Current Date in where clause

How do I put current date into the where clause without having to type it in all the time? Select SALEITEMS.SKU, STOCK.SHORTDESC, SALEITEMS.SALEPRICEEX, ...
Kevin Goosen's user avatar
2 votes
1 answer
4k views

How to trace a query on Firebird?

With SQL Server we can trace for a period of time, to get what queries are running. How can I do this with Firebird? I'm reading something on their website but there's only user trace like if the ...
Racer SQL's user avatar
  • 7,374
2 votes
1 answer
3k views

Firebird query pivot

I have a Firebird sql query that returns 3 fields: Surname, Name and date as (YYYY-MM-DD HH:mm:ss) select Surname, Name, "WHEN" from users left join attendant on (users.id = attendant.userid); This ...
sgargel's user avatar
  • 337
1 vote
1 answer
892 views

Recreate existing database with a different charset

I want to change the character set of an existing database from none to utf8, it seems that the safest way is to create a new one then pump data to it. I have tried two methods, both gave me the same ...
user2475096's user avatar
1 vote
0 answers
262 views

Migrate Firebird to Oracle

I have about more than 250 Firebird local databases and several server databases. The way they are connected is such: A block of almost 50 local databases, 1 on each PC, connect to 1 server database. ...
SovereignSun's user avatar
1 vote
2 answers
751 views

Firebird total column [closed]

I have a query that I am struggling with. The problem I have is that I would like it to just display a total of column variancevalue as a result. SELECT DEPARTMENT.DESCRIPTION AS DepartmentName, ...
Kevin Goosen's user avatar
0 votes
1 answer
1k views

Do I have to commit after an exception has been raised?

My database generates a lot of orphan pages, and I'm trying to figure out why. I often do this in my python code, using the fdb driver: cursor = connection.cursor() for item in list: try: ...
Hernn0's user avatar
  • 3
1 vote
1 answer
1k views

Firebird execute block where External datasource is localhost

I'm writing a .net application that connect to a remote database server hosted on internet to make a sort of replication. The database source is on my local firebird server, the destination database ...
user2475096's user avatar
1 vote
1 answer
1k views

Firebird, select gives token unknown

I have a Firebird database with a table foo that have a field called WHEN. Is there a way to perform a query using the field name in SELECT? This works: SELECT * FROM foo; This not: SELECT WHEN ...
sgargel's user avatar
  • 337
-1 votes
1 answer
543 views

Current Date for Query

I have a query which I currently have to change the date in everytime. I would like to edit it so that it gives me all dates for the current month. Or is there a way to get it to request a date range. ...
Kevin Goosen's user avatar
1 vote
1 answer
264 views

Firebird: table and null data

I'm working with Firebird database. I have a big table with many thousand of rows. Each line records the status of an object at regular intervals for many objects. I need to register new properties ...
salem's user avatar
  • 13
2 votes
2 answers
12k views

Compare sum of two select results

Using Firebird, I have two tables, Orders and DespatchedParts. Orders table: ID CustomerID Total_number_parts -- ---------- ------------------ 1 1 5 2 1 4 3 2 ...
Simon's user avatar
  • 23
0 votes
2 answers
5k views

SQL Select where value = to another select [closed]

I have two tables. Orders, and OrderParts. One Order can have many OrderParts. I want a list of all the order.customerID where the number of OrderParts ordered = Total_number_parts in the order table....
Simon's user avatar
  • 23
7 votes
1 answer
344 views

Is it possible in Firebird to create a single index with ascending and descending columns?

For instance, something equivalent to CREATE INDEX Listing_Date_Idx ON ACTIVITY(Listing,Date_ DESC,Time_ DESC);
Alister's user avatar
  • 173
0 votes
1 answer
2k views

Show recent select queries on Firebird database file

Is there a way to log or query the n recent SELECT queries to an FDB database file? I have already tried using the MON$ and RDB$ tables but I didn't find anything useful.
arielnmz's user avatar
  • 113
0 votes
1 answer
1k views

Firebird2.5-superclassic on Ubuntu 16.04 LTS

I installed firebird2.5-superclassic using sudo apt-get install firebird2.5-superclassic and then ran sudo dpkg-reconfigure firebird2.5-superclassic and set the password per https://firebirdsql.org/...
Jacrys's user avatar
  • 157
1 vote
1 answer
1k views

How to Determine Optimal Disk Cluster Size for Firebird 2.5

I'm using Firebird 2.5.6 Classic Server on a Windows 7 64-bit machine. We're moving the database to a separate disk (32GB NTFS Volume) and are now provisioning that disk. My question is, what should ...
Dusty Vargas's user avatar
0 votes
2 answers
165 views

Firebird Configuration: firebird.conf Parameters Unit of Measurement

Many of the parameters in the firebird.conf configuration file are integers and I'm unsure what unit of measurement (KB, Byte etc.) is being used. For example, if tweaking the TempCacheLimit param, is ...
Dusty Vargas's user avatar
2 votes
1 answer
965 views

Export data from InterBase / Firebird database without credentials

I have an InterBase / Firebird database file of an old project for which I lost the credentials. Some information about the database, dumped with the gstat command, is shown below [1]. I'm accessing ...
Benjamin B.'s user avatar
2 votes
1 answer
2k views

Firebird 3.0 service won't start on Windows 7

I have Firebird 2.5 classic server running on Windows 7 on port 3059. This service is set to automatically start up and it works fine. I've installed Firebird 3.0.2 as classic server on port 3050 but ...
Smilko's user avatar
  • 23
0 votes
2 answers
2k views

How to run insert statement as much times as select statement gives unique values?

DB Firebird. I have the following statement SELECT a.ID FROM CLIENTS a And I want my INSERT statement into another table to use each of this value, something like INSERT INTO BANKS (ID, NR, MONEY)...
DisplayMyName's user avatar
0 votes
1 answer
2k views

Prevent Firebird's default instance from starting

I want temporarily to use another named instance. Can I prevent the default instance from starting when the PC starts? I am using Windows 8.1
DisplayMyName's user avatar