Questions tagged [firebird]

An open-source DBMS platform descended from Interbase.

Filter by
Sorted by
Tagged with
0 votes
0 answers
46 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 ...
user avatar
0 votes
1 answer
46 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 ?
user avatar
  • 5
0 votes
1 answer
44 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 ...
user avatar
  • 5
1 vote
1 answer
64 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 #...
user avatar
4 votes
1 answer
405 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 ...
user avatar
2 votes
1 answer
176 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-...
user avatar
  • 63
0 votes
0 answers
127 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 ...
user avatar
0 votes
1 answer
113 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 ...
user avatar
1 vote
1 answer
160 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 ...
user avatar
0 votes
2 answers
397 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 ...
user avatar
  • 21
0 votes
0 answers
388 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, ...
user avatar
  • 21
1 vote
2 answers
177 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 ...
user avatar
  • 21
-1 votes
1 answer
61 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 | ...
user avatar
  • 21
-1 votes
2 answers
124 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, ...
user avatar
  • 162
2 votes
1 answer
680 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 ...
user avatar
  • 162
4 votes
1 answer
569 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 ...
user avatar
  • 162
0 votes
0 answers
664 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 ...
user avatar
  • 101
2 votes
1 answer
91 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 ...
user avatar
0 votes
2 answers
196 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, ...
user avatar
  • 1
1 vote
1 answer
141 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 ...
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, ...
user avatar
2 votes
1 answer
3k 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 ...
user avatar
  • 7,104
2 votes
1 answer
2k 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 ...
user avatar
  • 337
1 vote
1 answer
555 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 ...
user avatar
1 vote
0 answers
203 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. ...
user avatar
1 vote
2 answers
581 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, ...
user avatar
0 votes
1 answer
775 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: ...
user avatar
  • 3
1 vote
1 answer
906 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 ...
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 ...
user avatar
  • 337
-1 votes
1 answer
399 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. ...
user avatar
1 vote
1 answer
172 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 ...
user avatar
  • 13
2 votes
2 answers
11k 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 ...
user avatar
  • 23
0 votes
2 answers
4k 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....
user avatar
  • 23
7 votes
1 answer
261 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);
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.
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/...
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 ...
user avatar
0 votes
2 answers
150 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 ...
user avatar
2 votes
1 answer
630 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 ...
user avatar
2 votes
1 answer
1k 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 ...
user avatar
0 votes
2 answers
1k 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)...
user avatar
0 votes
1 answer
1k 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
user avatar
0 votes
1 answer
238 views

Repeating rows of date intervals Between dates Firebird

I am stuck in a case that on my financial sys, I need to add a option for value to be monthly, weekly or every 2 weeks example: DESC | VALUE | DATEADD | FREQUENCY --------+---------+--------...
user avatar
3 votes
1 answer
6k views

How to export database structure from Firebird?

I'm doing replication and I need to export db structure from one Firebird db (dialect 3) into another. I've seen a couple tools like IBPump and FBExport, however all I can find is how to export all ...
user avatar
0 votes
1 answer
761 views

How to select and show all the tickets from last calendar year?

It seems SQL calls varies a lot, and cannot find how to do this in Firebird, where SQL dialect is 3. There's a table called TICKETS. This table has INSERT_TIME which is TIMESTAMP. How do I select all ...
user avatar
0 votes
1 answer
2k views

Firebird: Access Denied

When ever I try to create a database with SQI Tools for firebird I receive this error... SQL> create database 'C:\Remake' CON> user 'sysdba' password 'masterkey'; Statement failed, SQLSTATE = ...
user avatar
  • 101
2 votes
1 answer
850 views

Issue installing Firebird ODBC drivers -- driver eventually no longer found

I am experiencing an issue with an SSIS job that connects to a Firebird DB using their ODBC driver (version 2.0.4.155). The SSIS package runs flawlessly in Visual Studio 2008, which is installed on ...
user avatar
  • 681
3 votes
1 answer
216 views

Query is too slow (1 second, but needs to improve)

I have generated a very large query. Unfortunality this query is too slow for us. The query is 1 second, but it needs to improve too less than a few ms. I don't want duplicates of the result. So I ...
user avatar
0 votes
1 answer
712 views

How to Enable Windows Authentication in Firebird 2.5

I am trying to enable Windows Authentication on a remote Firebird 2.5 database. I modified the Firebird config file and changed the authentication method to 'MIXED', restarted the Firebird services ...
user avatar
  • 11
2 votes
0 answers
364 views

How does the use of derived tables speed up sorting?

In the article 45 Ways To Speed Up Firebird Database, it states that Use derived tables to optimize SELECT with ORDER BY/GROUP BY Another way to optimize SQL query with sorting is to use ...
user avatar
  • 121