Questions tagged [firebird]

An open-source DBMS platform descended from Interbase.

Filter by
Sorted by
Tagged with
4
votes
1answer
34 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 ...
1
vote
1answer
53 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-...
0
votes
0answers
41 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 ...
0
votes
1answer
41 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 ...
1
vote
1answer
51 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 ...
0
votes
2answers
72 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 ...
0
votes
0answers
51 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, ...
1
vote
2answers
42 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 ...
-1
votes
1answer
38 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 | ...
-1
votes
2answers
42 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, ...
1
vote
1answer
198 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 ...
2
votes
1answer
109 views

firebird 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 ...
0
votes
0answers
416 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 ...
2
votes
1answer
85 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 ...
0
votes
2answers
145 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, ...
1
vote
1answer
87 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 ...
1
vote
1answer
746 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, ...
1
vote
1answer
2k 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 ...
2
votes
1answer
1k 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 ...
0
votes
1answer
359 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 ...
1
vote
0answers
156 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. ...
1
vote
2answers
324 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, ...
0
votes
1answer
365 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: ...
1
vote
1answer
530 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 ...
1
vote
1answer
650 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 ...
-1
votes
1answer
361 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. ...
1
vote
1answer
114 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 ...
2
votes
2answers
8k 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 ...
0
votes
2answers
3k 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....
5
votes
1answer
192 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);
0
votes
1answer
1k 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.
0
votes
1answer
974 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/...
1
vote
1answer
751 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 ...
0
votes
2answers
136 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 ...
1
vote
1answer
424 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 ...
2
votes
1answer
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 ...
0
votes
2answers
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)...
0
votes
1answer
812 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
0
votes
1answer
127 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 --------+---------+--------...
3
votes
1answer
4k 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 ...
0
votes
1answer
476 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 ...
0
votes
1answer
1k 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 = ...
2
votes
1answer
700 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 ...
3
votes
1answer
197 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 ...
0
votes
1answer
585 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 ...
2
votes
0answers
327 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 ...
0
votes
1answer
1k views

Migrating data from Firebird to CSV on OSX

I have a .gdb Firebird database file that I would like to partially transform to .csv. From the CLI tool, I'm able to do the following: CONNECT "/Users/jpmonette/Desktop/file.gdb"; OUTPUT /Users/...
2
votes
1answer
318 views

how many cores uses gbak (firebird) on restoring?

I'm restoring db, and I see that firebird uses only one core of my CPU for gbak and fb_smb_server: Is it normally? I've 4 cores in my CPU. CpuAffinityMask parameter in firebird.conf is commented out.
0
votes
1answer
85 views

Get value from nearest (lower) integer

As jkavalik sais: I'm looking for "the greatest value not greater than". I have a table containing a kind of IDs and values like those ID value 101 A 2003 B 4005 C when searching for "...
2
votes
1answer
196 views

Detect circular relations in a distribution table

I have the following two tables, that will define distribution rates from items on table A to other items on table A (I think I can say B defines a many-to-many relationship for A with itself). ...