[firebird-support] ReleaseSemaphore failed. Error code 298
I just started getting these errors in Firebird.log. The first error is always followed by the second. It appears to always be the same database. What might be causing this? I am using Firebird 2.5.3.26778. NOVADB (Server) Mon Nov 11 19:17:03 2019 Operating system call ReleaseSemaphore failed. Error code 298 NOVADB (Server) Mon Nov 11 19:19:03 2019 Database: E:\LEGEND\OPERATIONS.FDB deadlock
Re: [firebird-support] Possible bug in 2.5.1.26351
>Well, if your application uses UTF8, then probably yes, but if you only >need a region specific character set, then using that character set >could be good enough: specifying a connection character set other than >NONE will automatically transliterate between character sets. >We can't judge what the right solution for your application will be, but >using NONE is usually the wrong decision, unless you carefully control >what your applications do. Trouble is this data is coming from an outside source. It is basically city and state names so it could contain almost anything. All Roman characters but almost any conceivable language. No way to pick a region specific character set. The whole rest of the application is English only so we have never run into problems until now. I'm thinking that just changing the columns in question to UTF8 will have to be good enough. >- it will restrict the maximum column length to max 8191 characters. >- given index column size is limited by page size, it may require you to >use smaller columns if they need an index. Not a problem since the fields in question are 50 - 100 characters max and not part of any indexes. >In other words: you will need to change individual columns anyway (or >create a fresh new database and pump the data from the old to the new). Can I just change the character set of an existing column without having to copy the data? >And 2.5.1 is broken, it has an issue with compound indexes (see >https://www.firebirdsql.org/file/documentation/release_notes/html/en/2_5/notes-253.html) > >https://www.firebirdsql.org/file/documentation/release_notes/html/en/2_5/notes-253.html) If I understand this properly then this isn't really an issue since I always back up and restore a database when upgrading Firebird versions as a matter of course. >A number of security vulnerabilities were fixed: Security is not a big issue for us. The databases are NEVER accessible outside of the local LAN. We sell pre-packaged software to people that don't have an IT staff so hacking inside the LAN in not much of an issue. Steve
[firebird-support] Duplicate key error during database restore
I am using Firebird-2.5.3.26778_0_Win32 on Windows 8.1 64-bit. When attempting to restore a database using the restore method of the service API (via IBExpert if that matters) I am getting the following error: gbak:restoring privilege for user PUBLIC IBE: Invalid insert or update value(s): object columns are constrained - no 2 table rows can have duplicate column values. To me, this seems to indicate that Firebird got a duplicate key error while attempting to restore user privileges. Not sure how this can be possible. To be absolutely certain, I manually activated all of the user indices in the database without problem. Any suggestions? It is a very small database. I can send it to anyone who might be interested in taking a look at it.
[firebird-support] Re: Duplicate key error during database restore
More information. When using gbak I get a slightly different error: gbak: ERROR:attempt to store duplicate value (visible to active transactions) in unique index RDB$INDEX_39 gbak: ERROR:Problematic key value is (RDB$ROLE_NAME = 'RDB$ADMIN') gbak:Exiting before completion due to errors
Re: Rif: [firebird-support] Re: Duplicate key error during database restore
Yes, I am using the sysdba user ID.
Re: [firebird-support] Re: Duplicate key error d uring database restore
That might very well be it. I might have inadvertently used gbak 2.1 to back up the database. Thank You
Re: [firebird-support] Re: Invalid expression in the select list (not contained in either an aggregate function or the GROUP BY clause)
Assuming OPS_ONBOARD_TIME, OPS_DELIVERED_TIME and OPS_APPT_LOW are all DATE type,does this solve that problem? COALESCE(OPS_ONBOARD_TIME, OPS_DELIVERED_TIME, OPS_APPT_LOW, CURRENT_DATE) Since they are all TIMESTAMPS, that didn't fix the problem but CURRENT_TIMESTAMP did. Thanks.
Re: [firebird-support] Re: Invalid expression in the select list (not contained in either an aggregate function or the GROUP BY clause)
SET; That's slick. I'm going to have to read up on the WITH command. Had to change the coalesce with all the dates to cast each date individually or I got a conversion error. Not sure why. COALESCE(CAST(OPS_ONBOARD_TIME AS DATE), CAST(OPS_DELIVERED_TIME AS DATE), CAST(OPS_APPT_LOW AS DATE), CAST('TODAY' AS DATE)),
[firebird-support] Invalid expression in the select list (not contained in either an aggregate function or the GROUP BY clause)
The following query: SELECT PB_LOAD_TYPE, /* If already picked up use the pick up date. If already delivered us the delivered date. If appointment date present, use it. Otherwise, use today's date */ IIF(OPS_ONBOARD_TIME IS NOT NULL, CAST(OPS_ONBOARD_TIME AS DATE), IIF(OPS_DELIVERED_TIME IS NOT NULL, CAST(OPS_DELIVERED_TIME AS DATE), COALESCE(CAST(OPS_APPT_LOW AS DATE), CAST('TODAY' AS DATE AS APPT_DATE, /* Get the region ID */ COALESCE((SELECT FIRST 1 CTRR_REGION_ID FROM CT_REGION_RANGES WHERE CTRR_LOW_ZIP = OPS_ZIP AND CTRR_HIGH_ZIP = OPS_ZIP ORDER BY CTRR_REGION_ID), 'N/A') AS REGION_ID, /* Count pick ups */ SUM(IIF(OPS_TYPE = 'P', 1, 0)) AS PICKUPS, /* Count deliveries */ SUM(IIF(OPS_TYPE = 'P', 0, 1)) AS DELIVERIES FROM OPS_STOP_REC LEFT JOIN OPS_HEADER ON PB_ID = OPS_ORDER_ID WHERE PB_TYPE = 'O' AND PB_DT_ENT = :PB_DT_ENT GROUP BY APPT_DATE, PB_LOAD_TYPE, REGION_ID ORDER BY APPT_DATE, PB_LOAD_TYPE, REGION_ID throws this error: Invalid expression in the select list (not contained in either an aggregate function or the GROUP BY clause) There is nothing wrong with the query that I can see. What am I missing? If I remove the two SUM() lines and the GROUP BY it works perfectly. I am using Firebird 2.5 32-bit on Windows 7 64-bit.
Re: [firebird-support] Test VARCAHR for numeric
Thanks to everyone for all the feedback. if (param IS SIMILAR '[0-9]+') then Did everything I needed it to do. Thanks again.
[firebird-support] Test VARCAHR for numeric
Is there any way, within a stored procedure, to test a VARCHAR to see if it contains a valid number? I have a parameter that can contain different types of value and it would be nice to be able to know if CAST(param as BIGINT) is going to fail before an exception is thrown.
Re: [firebird-support] Revert DB to previous version
That worked great! Thank you!
[firebird-support] Revert DB to previous version
I need to be able to revert an existing 2.1 database to 2.0.5. How can I accomplish this. GBAK won't do it. It tells me: ERROR: Expected backup version 1,2,3,4,5,6 or 7. Found 8.
Re: [firebird-support] Attempt to call GlobalRWLock::unlock() while not holding a valid lock for logical owner
Have you checked the database with gfix? No, I haven't. What options would you suggest?
Re: [firebird-support] Attempt to call GlobalRWLock::unlock() while not holding a valid lock for logical owner
Did a gfix -v -f -n and no problems were reported.
[firebird-support] Attempt to call GlobalRWLock::unlock() while not holding a valid lock for logical owner
I have just migrated a system from Firebird 1.5 to 2.0.7.13318 running on Windows 2008 R2. I backed up the data using gbak on 1.5. and reloaded it using gbak on 2.0.7. Now on 2.0.7 I am being plagued by: Attempt to call GlobalRWLock::unlock() while not holding a valid lock for logical owner The application is the same, the only thing that has changed is the Firebird version. Going back to 1.5 is no longer an option as the customer has been working on with the new database and there is no way (that I know of) to back it up on 2.5 and reload it on 1.5. Going forward to 2.5 is not an option (at least in the short term) since there are issues with some of the timestamp fields in the old database containing values that are not acceptable to 2.5. 1. What could be causing these errors? As far as I can tell the database is not corrupt. There are no messages in the log that would indicate a corrupt database and it was freshly loaded yesterday. 2. How can I resolve this issue? I had this happen at one other site and I resolved it be regressing to 2.0.5 but I no longer have, nor can I find, the installer for 2.0.5. Any help is greatly appreciated.
Re: [firebird-support] pointer returned by FREE_IT not allocated by ib_util_malloc
The code is a bit involved because it supports multiple versions of Firebird and multiple OSes. However, the windows version calls this function to get the buffer returned by FREE_IT: static char * GetResultBfr (int len) { return ((char *) ib_util_malloc (len)); } My DLL is linked to the ib_util.dll using an import library. So it is statically linked to the DLL but not to the underlying object files. I already checked the system in question and there are no stray copies of ib_util.dll floating around. Just the one in the Firebird installation directory.
[firebird-support] internal gds software consistency check
This past weekend I tried to upgrade a site from 2.0.5 to 2.0.7. This failed miserably. Firstly, no sooner did I get more than 1 user logged into the database I started getting errors: internal gds software consistency check (Attempt to call GlobalRWLock::unlock() while not holding a valid lock for logical owner) Secondly, it was at least an order of magnitude slower that 2.0.5, even with just a single user logged in. I finally had to revert them to 2.0.5. The minute I put the old version in place the lock errors went away and the speed went back to normal. What the heck? And before your suggest it, my first inclination was to upgrade them to 2.5 but that also failed because of some problem with my UDF. See my prior post about ib_util_malloc errors. Still haven't figured that one out.
[firebird-support] pointer returned by FREE_IT not allocated by ib_util_malloc
I have a UDF DLL that has been running for years. I recently tried to upgrade a site from FB 2.0 to FB 2.5.3.26778. Everything went well until I tried to start my application. Then I got a pointer returned by FREE_IT not allocated by ib_util_malloc. The thing is, all memory returned by FREE_IT is being allocated using ib_util_malloc. What else could be causing this error? I am running this site on Windows 2003, 32-bit. The DLL is written using BCB 2007. Any help is appreciated. Thanks