[firebird-support] How To Track Deadlocks
Hi. I have a environment with 150 connections over my database. My application needs to use "Wait On Locks". A recent change in my application (client / server architeture) starts to get in some deadlocks. I found this article https://ib-aid.com/en/how-to-track-deadlocks-in-firebird/ but the massive use of the database turns impossible to motitor the FBTRACE output. So, there is some way to track this deadlocks using the MON$ tables using a query?
Re: [firebird-support] How to "remap" the count datatype from BIGINT to INTEGER in firebird 3
I think this isn't only my "pain". I good solution here will be a configuration for legacy systems, like Authentication legacy. Em seg., 2 de mar. de 2020 às 06:13, Mark Rotteveel m...@lawinegevaar.nl [firebird-support] escreveu: > > > On 28-02-2020 20:11, Roberto Vieweg jjw.roberto.fireb...@gmail.com > [firebird-support] wrote: > > Is possible to use the SET BIND feature > > ( > https://github.com/FirebirdSQL/firebird/blob/master/doc/sql.extensions/README.set_bind.md > ) > > from Firebird 3 to remap the datatype of a count statement from BIGINT > > to INTEGER? > > > > If yes, can you provide details and example how to do this? > > SET BIND is a new feature in Firebird 4, so you cannot use it in > Firebird 3. In Firebird 4, you can do this with `SET BIND OF BIGINT AS > INTEGER`. > > > Ps.: I have a very big old-application written in Delphi 7, with a lot > > of TSQLQuery with hardcoded count queries mapped to TIntegerField. So > > is impossible to do a migration right now. I need other options > > You could use casts, though I'm surprised that there is no automatic > coercion within Delphi. > > Mark > -- > Mark Rotteveel > >
Re: [firebird-support] How to "remap" the count datatype from BIGINT to INTEGER in firebird 3
The problem of use CAST, is the result of the same work to convert the TIntegerFields, so as so is to much work! I cannot use SET BIND? This command really exists? Em sex., 28 de fev. de 2020 às 17:06, Dimitry Sibiryakov s...@ibphoenix.com [firebird-support] escreveu: > > 28.02.2020 20:11, Roberto Vieweg jjw.roberto.fireb...@gmail.com > [firebird-support] wrote: > > Ps.: I have a very big old-application written in Delphi 7, with a lot > > of TSQLQuery with hardcoded count queries mapped to TIntegerField. So > > is impossible to do a migration right now. I need other options > >Use CAST() in failing queries. > > > -- >WBR, SD. > > > > > > > ++ > > Visit http://www.firebirdsql.org and click the Documentation item > on the main (top) menu. Try FAQ and other links from the left-side menu > there. > > Also search the knowledgebases at > http://www.ibphoenix.com/resources/documents/ > > ++ > > > Yahoo Groups Links > > >
[firebird-support] How to "remap" the count datatype from BIGINT to INTEGER in firebird 3
Is possible to use the SET BIND feature (https://github.com/FirebirdSQL/firebird/blob/master/doc/sql.extensions/README.set_bind.md) from Firebird 3 to remap the datatype of a count statement from BIGINT to INTEGER? If yes, can you provide details and example how to do this? Ps.: I have a very big old-application written in Delphi 7, with a lot of TSQLQuery with hardcoded count queries mapped to TIntegerField. So is impossible to do a migration right now. I need other options
Re: [firebird-support] How to set the locale of firebird process in linux
So, you're saying that is not possible to set the locale to the server without reinstall the SO in the desired locale? Em sex., 14 de fev. de 2020 às 17:09, Dimitry Sibiryakov s...@ibphoenix.com [firebird-support] escreveu: > > 14.02.2020 20:46, Roberto Vieweg jjw.roberto.fireb...@gmail.com > [firebird-support] wrote: > > Any idea whats happening? > >Firebird server doesn't call setlocale() thus it ignores locale settings > and uses C > locale only. > > > -- >WBR, SD. > > > > > > > ++ > > Visit http://www.firebirdsql.org and click the Documentation item > on the main (top) menu. Try FAQ and other links from the left-side menu > there. > > Also search the knowledgebases at > http://www.ibphoenix.com/resources/documents/ > > ++ > > > Yahoo Groups Links > > >
Re: [firebird-support] How to set the locale of firebird process in linux
Dimitry, hi again. I tried to set the locale on a Firebird super server installation. I edited the /etc/init.d/firebird service script, and a added this to it: export LANG="pt_BR.utf8" Then I reload and restart the service with: systemctl daemon-reload systemctl restart firebird After this, I got the correct locale in the firebird server process, I query this using: xargs -r0a "/proc/$PID/environ" sh -c 'exec env -i -- "$@" locale' sh >>> change the $PID with the PID number of the fbserver So, after all, I tried to query my UDF function with this: select format_float(12343.2399, ',0.00') from rdb$database This "format_float" udf is a lazarus udf that calls the "formatFloat" that uses the default LC_NUMERIC variables. So I expected the result: 12.343,24 But I continue to get: 12,343.24 The thousand separator in PT_BR is "," not "." (dot). The same UDF, installed on a linux PT_BR works, as so on Windows PT_BR compiled version. Any idea whats happening? Em qui., 13 de fev. de 2020 às 12:13, Mark Rotteveel m...@lawinegevaar..nl [firebird-support] escreveu: > > > On 13-02-2020 15:11, 'Martin, Nicole (UK, Yeovil)' > nicole.mar...@baesystems.com [firebird-support] wrote: > > I have a feeling I have been added to a group that isn't right as the > subject doesn't match what I am asking in my email? > > This is the firebird-support mailing list for community support for the > Firebird database system. You didn't ask a question, someone else did > and you replied to the thread. > > As far as I know, it is not possible to subscribe someone else, so you > should have subscribed yourself at some point. > > To unsubscribe, send an email to > firebird-support-unsubscr...@yahoogroups.com > > See the footer of the emails from this list for more information. > > Mark > -- > Mark Rotteveel > >
Re: [firebird-support] How to set the locale of firebird process in linux
Can you provide an example? This is my current service descriptor service firebird25 { flags = REUSE socket_type = stream wait= no user= firebird server = /opt/firebird25/bin/fb_inet_server_25 env = FIREBIRD=/opt/firebird25 env += LD_LIBRARY_PATH=/opt/firebird25/lib:LD_LIBRARY_PATH disable = no instances = UNLIMITED } Em qua., 12 de fev. de 2020 às 16:10, Dimitry Sibiryakov s...@ibphoenix.com [firebird-support] escreveu: > > 12.02.2020 18:22, Roberto Vieweg jjw.roberto.fireb...@gmail.com > [firebird-support] wrote: > > How can I set the locale of firebird process in linux? > > I'm using Firebird 2.5 classic. > >Use (x)inetd configuration file to set the environment variable. > > > -- >WBR, SD. > > > > > > > ++ > > Visit http://www.firebirdsql.org and click the Documentation item > on the main (top) menu. Try FAQ and other links from the left-side menu > there. > > Also search the knowledgebases at > http://www.ibphoenix.com/resources/documents/ > > ++ > > > Yahoo Groups Links > > >
[firebird-support] How to set the locale of firebird process in linux
How can I set the locale of firebird process in linux? My linux currently are configured using en_US locale, but I need to set pt_BR to firebird without changing then entire locale of my linux env. I'm using Firebird 2.5 classic.
Re: [firebird-support] Why I cannot use firebird services to validate a remote database
Sorry, my fault! The problem was the "time" between perform the SHUTDOWN and the VALIDATION. I just add a 1 second "sleep" between the shutdown and validate, and it works! FBMaintenanceManager mgr = .. ; mgr.shutdownDatabase(FBMaintenanceManager.SHUTDOWN_FORCE, 0); Thread.sleep(1000); // holy sleep mgr.validateDatabase(FBMaintenanceManager.VALIDATE_READ_ONLY); Em seg., 25 de nov. de 2019 às 11:20, Roberto Vieweg < jjw.roberto.fireb...@gmail.com> escreveu: > I was trying to shutdown a Firebird 2.1 using the Jaybird 3.x to validate > the database. > > I wasn't abble to shutdown it like "gfix -shut multi -force 0 > remote_server_host:database" > > So, when I perform the validate using the jaybird service I got this: > > java.sql.SQLException: bad parameters on attach or create database; > secondary server attachments cannot validate databases [SQLState:HY000, ISC > error code:335544325] > at > org.firebirdsql.gds.ng.FbExceptionBuilder$Type$1.createSQLException(FbExceptionBuilder.java:498) > at > org.firebirdsql.gds.ng.FbExceptionBuilder.toFlatSQLException(FbExceptionBuilder.java:299) > at > org.firebirdsql.gds.ng.wire.AbstractWireOperations.readStatusVector(AbstractWireOperations.java:135) > at > org.firebirdsql.gds.ng.wire.AbstractWireOperations.processOperation(AbstractWireOperations.java:199) > at > org.firebirdsql.gds.ng.wire.AbstractWireOperations.readSingleResponse(AbstractWireOperations.java:166) > at > org.firebirdsql.gds.ng.wire.AbstractWireOperations.readResponse(AbstractWireOperations.java:150) > at > org.firebirdsql.gds.ng.wire.AbstractWireOperations.readGenericResponse(AbstractWireOperations.java:252) > at > org.firebirdsql.gds.ng.wire.AbstractFbWireService.readGenericResponse(AbstractFbWireService.java:138) > at > org.firebirdsql.gds.ng.wire.version10.V10Service.startServiceAction(V10Service.java:212) > at > org.firebirdsql.management.FBServiceManager.executeServicesOperation(FBServiceManager.java:280) > at > org.firebirdsql.management.FBMaintenanceManager.validateDatabase(FBMaintenanceManager.java:239) > at > br.com.jjw.besser.atualizador.client.utils.firebird.FirebirdMaintenanceHelper.validate(FirebirdMaintenanceHelper.java:209) > at > br.com.jjw.besser.atualizador.client.utils.firebird.FirebirdMaintenanceHelper.main(FirebirdMaintenanceHelper.java:261) > Caused by: org.firebirdsql.jdbc.FBSQLExceptionInfo: bad parameters on > attach or create database > > But, if I use the gfix command: gfix -shut multi -force 0 remote:database > the validation performs! > > Em seg., 25 de nov. de 2019 às 10:11, Mark Rotteveel m...@lawinegevaar.nl > [firebird-support] escreveu: > >> >> >> On 25-11-2019 13:52, Roberto Vieweg jjw.roberto.fireb...@gmail.com >> [firebird-support] wrote: >> > I'm trying to use Jaybird to validate a database before start the >> > update process of my database definition. >> > >> > This validation is necessary to prevent the update of a corrupted >> database. >> >> What is the nature of your problem. If your problem is with Jaybird, >> then please ask on the firebird-java mailing list, and make sure to >> provide a minimal but reproducible example and errors (if any) or a >> description of the problem. >> >> Mark >> -- >> Mark Rotteveel >> >> >
Re: [firebird-support] Why I cannot use firebird services to validate a remote database
I was trying to shutdown a Firebird 2.1 using the Jaybird 3.x to validate the database. I wasn't abble to shutdown it like "gfix -shut multi -force 0 remote_server_host:database" So, when I perform the validate using the jaybird service I got this: java.sql.SQLException: bad parameters on attach or create database; secondary server attachments cannot validate databases [SQLState:HY000, ISC error code:335544325] at org.firebirdsql.gds.ng.FbExceptionBuilder$Type$1.createSQLException(FbExceptionBuilder.java:498) at org.firebirdsql.gds.ng.FbExceptionBuilder.toFlatSQLException(FbExceptionBuilder.java:299) at org.firebirdsql.gds.ng.wire.AbstractWireOperations.readStatusVector(AbstractWireOperations.java:135) at org.firebirdsql.gds.ng.wire.AbstractWireOperations.processOperation(AbstractWireOperations.java:199) at org.firebirdsql.gds.ng.wire.AbstractWireOperations.readSingleResponse(AbstractWireOperations.java:166) at org.firebirdsql.gds.ng.wire.AbstractWireOperations.readResponse(AbstractWireOperations.java:150) at org.firebirdsql.gds.ng.wire.AbstractWireOperations.readGenericResponse(AbstractWireOperations.java:252) at org.firebirdsql.gds.ng.wire.AbstractFbWireService.readGenericResponse(AbstractFbWireService.java:138) at org.firebirdsql.gds.ng.wire.version10.V10Service.startServiceAction(V10Service.java:212) at org.firebirdsql.management.FBServiceManager.executeServicesOperation(FBServiceManager.java:280) at org.firebirdsql.management.FBMaintenanceManager.validateDatabase(FBMaintenanceManager.java:239) at br.com.jjw.besser.atualizador.client.utils.firebird.FirebirdMaintenanceHelper.validate(FirebirdMaintenanceHelper.java:209) at br.com.jjw.besser.atualizador.client.utils.firebird.FirebirdMaintenanceHelper.main(FirebirdMaintenanceHelper.java:261) Caused by: org.firebirdsql.jdbc.FBSQLExceptionInfo: bad parameters on attach or create database But, if I use the gfix command: gfix -shut multi -force 0 remote:database the validation performs! Em seg., 25 de nov. de 2019 às 10:11, Mark Rotteveel m...@lawinegevaar..nl [firebird-support] escreveu: > > > On 25-11-2019 13:52, Roberto Vieweg jjw.roberto.fireb...@gmail.com > [firebird-support] wrote: > > I'm trying to use Jaybird to validate a database before start the > > update process of my database definition. > > > > This validation is necessary to prevent the update of a corrupted > database. > > What is the nature of your problem. If your problem is with Jaybird, > then please ask on the firebird-java mailing list, and make sure to > provide a minimal but reproducible example and errors (if any) or a > description of the problem. > > Mark > -- > Mark Rotteveel > >
[firebird-support] Why I cannot use firebird services to validate a remote database
I'm trying to use Jaybird to validate a database before start the update process of my database definition. This validation is necessary to prevent the update of a corrupted database.
Re: [firebird-support] Unable to complete network request to host "127.0.0.1" [SQLState:08006, ISC error code:335544721]
Full stack java.sql.SQLException: Unable to complete network request to host "127.0.0.1". [SQLState:08006, ISC error code:335544721] at org.firebirdsql.gds.ng.FbExceptionBuilder$Type$1.createSQLException(FbExceptionBuilder.java:498) at org.firebirdsql.gds.ng.FbExceptionBuilder$ExceptionInformation.toSQLException(FbExceptionBuilder.java:454) at org.firebirdsql.gds.ng.FbExceptionBuilder.toSQLException(FbExceptionBuilder..java:218) at org.firebirdsql.gds.ng.wire.WireConnection.identify(WireConnection.java:331) at org.firebirdsql.gds.ng.wire.FbWireDatabaseFactory.performConnect(FbWireDatabaseFactory.java:51) at org.firebirdsql.gds.ng.wire.FbWireDatabaseFactory.serviceConnect(FbWireDatabaseFactory.java:45) at org.firebirdsql.management.FBServiceManager.attachServiceManager(FBServiceManager.java:194) at org.firebirdsql.management.FBBackupManager.backupDatabase(FBBackupManager.java:95) at org.firebirdsql.management.FBBackupManagerBase.backupDatabase(FBBackupManagerBase.java:142) at br.com.jjw.besser.retaguarda.database.DatabaseBackup.backup(DatabaseBackup.java:100) at br.com.jjw.besser.retaguarda.database.DatabaseBackup.backup(DatabaseBackup.java:71) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65) at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.io.EOFException: null at org.firebirdsql.gds.impl.wire.XdrInputStream.readInt(XdrInputStream.java:181) at org.firebirdsql.gds.ng.wire.WireConnection.readNextOperation(WireConnection..java:418) at org.firebirdsql.gds.ng.wire.WireConnection.identify(WireConnection.java:273) ... 21 common frames omitted Em qui., 21 de nov. de 2019 às 15:35, Mark Rotteveel m...@lawinegevaar..nl [firebird-support] escreveu: > > > On 2019-11-21 18:59, Roberto Vieweg jjw.roberto.fireb...@gmail.com > [firebird-support] wrote: > > I have my java application running as a linux Systemd service (Fedora > > 29 server). > > > > My application perform a backup each day, but the process are throwing > > an exception: > > > > java.sql.SQLException: Unable to complete network request to host > > "127.0.0.1". [SQLState:08006, ISC error code:335544721] > > at > > > org.firebirdsql.gds.ng.FbExceptionBuilder$Type$1.createSQLException(FbExceptionBuilder.java:498) > > at > > > org.firebirdsql.gds.ng.FbExceptionBuilder$ExceptionInformation.toSQLException(FbExceptionBuilder.java:454) > > at > > > org.firebirdsql.gds.ng.FbExceptionBuilder.toSQLException(FbExceptionBuilder.java:218) > > at > > > org.firebirdsql.gds.ng.wire.WireConnection.identify(WireConnection.java:331) > > at > > > org.firebirdsql.gds.ng.wire.FbWireDatabaseFactory.performConnect(FbWireDatabaseFactory.java:51) > > at > > > org.firebirdsql.gds.ng.wire.FbWireDatabaseFactory.serviceConnect(FbWireDatabaseFactory.java:45) > > at > > > org.firebirdsql.management.FBServiceManager.attachServiceManager(FBServiceManager.java:194) > > at > > > org.firebirdsql.management.FBBackupManager.backupDatabase(FBBackupManager..java:95) > > at > > > org.firebirdsql.management.FBBackupManagerBase.backupDatabase(FBBackupManagerBase.java:142) > > at > > > br.com.jjw.besser.retaguarda.database.DatabaseBackup.backup(DatabaseBackup.java:100) > > > > What can be this? The 127.0.0.1 is not reacheable? > > You haven't posted the full exception stacktrace. There should also be > an IOException or SocketTimeoutException as the cause of this exception, > which would tell us more. > > Mark > >
[firebird-support] Unable to complete network request to host "127.0.0.1" [SQLState:08006, ISC error code:335544721]
I have my java application running as a linux Systemd service (Fedora 29 server). My application perform a backup each day, but the process are throwing an exception: java.sql.SQLException: Unable to complete network request to host "127.0.0.1". [SQLState:08006, ISC error code:335544721] at org.firebirdsql.gds.ng.FbExceptionBuilder$Type$1.createSQLException(FbExceptionBuilder.java:498) at org.firebirdsql.gds.ng.FbExceptionBuilder$ExceptionInformation.toSQLException(FbExceptionBuilder.java:454) at org.firebirdsql.gds.ng.FbExceptionBuilder.toSQLException(FbExceptionBuilder.java:218) at org.firebirdsql.gds.ng.wire.WireConnection.identify(WireConnection.java:331) at org.firebirdsql.gds.ng.wire.FbWireDatabaseFactory.performConnect(FbWireDatabaseFactory.java:51) at org.firebirdsql.gds.ng.wire.FbWireDatabaseFactory.serviceConnect(FbWireDatabaseFactory.java:45) at org.firebirdsql.management.FBServiceManager.attachServiceManager(FBServiceManager.java:194) at org.firebirdsql.management.FBBackupManager.backupDatabase(FBBackupManager.java:95) at org.firebirdsql.management.FBBackupManagerBase.backupDatabase(FBBackupManagerBase.java:142) at br.com.jjw.besser.retaguarda.database.DatabaseBackup.backup(DatabaseBackup.java:100) What can be this? The 127.0.0.1 is not reacheable?
[firebird-support] How check if database iscorrupted: backup/restore or validation
I'm developing a new updater for my application that uses a Firebird database. My old version was using the gbak tool for backup and restore the database (in a secondary FDB). If the backup and restore was finishing with success, I acsume that the database integrity is OK. The problem is that this approch consumes a lot of time in large databases. So my question here is: Can I run a database validation (gfix -validate -no_update) and acsume that the database integrity is OK when this command finishes without errors ? In this case I'll only perform a backup for rollback the update in cases of errors.
[firebird-support] Firebird 3.0 - local access works, but remote acess doesn't
I am using Firebird server on a Debian 9 stretch on a Virtual Box machine and FlameRobin client on another Windows 7 VM for testing. There is no firewall activated. I can access the database locally using isql-fb. I have installed Firebird 3.0 via Debian oficial packages: # apt-get install firebird3.0-server And I have changed SYSDBA password: # dpkg-reconfigure firebird3.0-server And I have changed SYSDBA password via isql-fb: - https://firebirdsql.org/file/documentation/reference_manuals/user_manuals/Firebird-3-QuickStart.pdf - In this example, the “employee” example database is used, because its alias is always present in a freshly installed Firebird setup: #isql-fb connect localhost:employee user sysdba password masterkey; If you do this in isql, it should respond with: #isql-fb Database: localhost:employee, User: SYSDBA Now alter the sysdba password: #isql-fb alter user sysdba set password 'Zis4_viZuna83YoYo'; - # cat /etc/debian_version 9.0 # firebird -z (via apt-get install firebird3.0-server) Firebird TCP/IP server version LI-V3.0.1.32609 Firebird 3.0 I have added the following to /etc/firebird/3.0/firebird.conf DatabaseAccess = Full RemoteAccess = True UdfAccess = Full AuthServer = Legacy_Auth, Srp, Win_Sspi AuthClient = Legacy_Auth, Srp, Win_Sspi UserManager = Legacy_UserManager, Srp Providers = Remote,Engine12,Loopback WireCrypt = Enabled WireCompression = True RemoteServicePort = 3050 ServerMode = Super I am using Flamerobin 64 bits and Firebird Client 64 bits (fbclient.dll version 3.0.2.32703) on the same FlameRobin's folder on another VM with Windows 7 Profissional 64 bits: --- About FlameRobin --- FlameRobin 0.9.3 (git hash 5ece15b) Unicode (x64) Database administration tool for Firebird RDBMS This tool uses IBPP library version 2.5.2.1 wxWidgets library version 2.8.12 and Boost library version 1.54.0 --- I can ping and access Samba from Windows VM to Debian Linux VM, but I can't access Firebird 3.0: --- Unhandled Error in FlameRobin --- *** IBPP::SQLException *** Context: Database::Connect Message: isc_attach_database failed SQL Message : -902 can't format message 13:98 -- message file C:\Program Files\FlameRobin (x64)\firebird.msg not found Engine Code: 335544721 Engine Message : Unable to complete network request to host "192.168.100.100". Failed to establish a connection. --- What am I missing?
RE: [firebird-support] Basics of Statistics - Mathematics: Mean (Average), Median, Mode and Range ?
[firebird-support] Basics of Statistics - Mathematics: Mean (Average), Median, Mode and Range ?
Basics of Statistics - Mathematics: Mean (Average), Median, Mode and Range I want to calculate Mean (Average), Median, Mode and Range in Firebird 2.5 and 3.0. I know that Firebird internal function for Mean (Average) is AVG(), but what are the internal functions for Median, Mode and Range in Firebird 2.5 and 3.0? If there are not such functions, how can I calculate them using Firebird? Thanks for all and any help. [Non-text portions of this message have been removed]
[firebird-support] Is safe to downgrade from 2.5.3 to 2.5.2?
Hi, Some of our clients are suffering with the CORE-4546 <http://tracker.firebirdsql.org/browse/CORE-4546> issue and I need to know if I can simply downgrade from 2.5.3 to 2.5.2. Roberto Schneiders Monde Sistemas (19) 3478-8880 www.monde.com.br
[firebird-support] UDF in FB3
Will UDF (User-Defined Functions) as done up to FB 2.5 (based on DLL or SO libraries) on Firebird 3 be considered obsolete or even disappear in future versions since the new features of SQL functions, sub-routines and packages? How will work the external functions, procedures and triggers in C, C++, Pascal and Java? They work similar to FB 2.5 UDFs (DLL / SO libraries)? http://www.slideshare.net/mindthebird/fb2014whatsnew30en http://firebird3.com/en/news/firebird-release-strategy-for-2015-2016/ Thanks for any information. [Non-text portions of this message have been removed]
[firebird-support] Firebird 2.5.x or 3.0.x on an ext4 Samba4 or Samba4.1 partition
Is there any problem or should I take any special care on having Firebird 2.5.x or 3.0.x data files (FDB) on the same partion of Samba 4 (or Samba 4.1) in a directory for databases not shared, of course? My second hard drive is mounted on an ext4 partition using the attributes "user_xattr,acl,barrier=1". vim /etc/fstab # # /srv was on /dev/sdb1 during installation UUID=d24a1b4e-c691-49a2-ab3f-d294d5e8038c /srv ext4 user_xattr,acl,barrier=1 1 1 Thanks for any suggestion or advice. [Non-text portions of this message have been removed]
Re: [firebird-support] Can a Firebird database be hosted on a hosting site?
Cedriz, Since you know the data for to configurate your DB connection, your application must connect this way. At my company, at Brazil as you, we have Delphi application running this way. We use Delphi 2007, but the compiler version itself has to have nothing to avoid you to connect this way. Roberto Camargo. From: cedriz monteagudo To: "firebird-support@yahoogroups.com" Sent: Subject: Re: [firebird-support] Can a Firebird database be hosted on a hosting site? Thanks to all those replied. I was just wondering what interface are you using when accessing data from a web host? We are currently running a interface built on delphi 7 with zeos as its component. Will it work? Thanks On Sunday, January 5, 2014 2:41 AM, W O wrote: We had used www.inspirohost.com the last year with good results. Greetings. Walter. On Sat, Jan 4, 2014 at 2:22 PM, wrote: > >Hello to all, > > >I would like to host my firebird database on a provider, but don't have an >idea on where to start. We currently have a firebird database in which is >connected via lan. As our company grows, so its needs. We plan to expand on >another branch which will be located on a different site, and we plan to have >a website so that we can access our database from one branch to another. I >tried searching for providers which can host my database, but failed to find >one. I was also thinking of hosting it on our own server but don't know where >to start also. > > >Thank you very much.
Re: [firebird-support] Re: Full Cross Tab but unknown column headers
I agree: more complicated, a lot. And still less dynamic and powerfull. -- Em sáb, 28 de dez de 2013 18:02 MSK Svein Erling Tysvær escreveu: >Hi Bhavbhuti! > >Let's split this into two parts. > >Running > >EXECUTE BLOCK returns (Mystatement varchar(4096)) AS >DECLARE VARIABLE S VARCHAR(256); >DECLARE VARIABLE I INTEGER; >DECLARE VARIABLE S2 VARCHAR(256); >DECLARE VARIABLE SIIF VARCHAR(1024); >DECLARE VARIABLE SJOIN VARCHAR(1024); >BEGIN > S=''; > S2=''; > SIIF=''; > SJOIN=''; > I=1; > FOR SELECT 'LEFT JOIN MACCOUNTS MA'||:I||' ON MA'||:I||'.CCODE = '''||CCODE|| >''' AND MA'||:I||'.IID = r.IACCOUNTID ', > 'SUM(IIF(MA'||:I||'.IID IS NOT NULL, r.BAMT, 0))' > FROM MACCOUNTS MA1 > WHERE MA1.CCODE > '' >AND NOT EXISTS(SELECT * FROM MACCOUNTS MA2 > WHERE MA1.CCODE = MA2.CCODE > AND MA1.IID > MA2.IID) INTO :S, S2 DO > BEGIN >SJOIN = SJOIN||S; >SIIF = SIIF||', '||S2; >I=I+1; > END > > FOR WITH TMP(FIELD_NAMES) AS >(SELECT LIST(CCODE) FROM MACCOUNTS MA1 >WHERE MA1.CCODE > '' > AND NOT EXISTS(SELECT * FROM MACCOUNTS MA2 > WHERE MA1.CCODE = MA2.CCODE > AND MA1.IID > MA2.IID)) >SELECT 'WITH TMP(IPID,'||FIELD_NAMES||') AS (SELECT r.IPID'||:SIIF|| > 'FROM SSALEINVOICEFOOTER r ' || :SJOIN||' GROUP BY 1) SELECT * > FROM TMP' >FROM TMP INTO :MyStatement DO > SUSPEND; >END; > >will return a statement that, when run, will return almost the result you want >('almost' being that it returns 0 and not NULL for columns not existing and >that you may have to do some modifications if there may exist named rows in >MACCOUNTS that doesn't exist in SSALEINVOICEFOOTER and hence, shouldn't be a >column). > >I still think this is far more complicated than doing such conversions using >PivotTables in Excel or similar. > >HTH, >Set > > > >++ > >Visit http://www.firebirdsql.org and click the Resources item >on the main (top) menu. Try Knowledgebase and FAQ links ! > >Also search the knowledgebases at http://www.ibphoenix.com > >++ >Yahoo Groups Links > > >
Re: [firebird-support] RE: group by and sub-selects
Kelly, I forgot something. If agree to send the data, make use of IBPhoenix ODBC driver to connect Firebird to MS Access to export your data (and the tables model). After having exported the envolved tables, inside MS Access db, connect them to each other as they are in your db (I hope your db has referencial integrity). Then, the data will be very usefull to make this analisys. Roberto Camargo. From: Roberto To: "firebird-support@yahoogroups.com" Sent: Friday, December 27, 2013 6:57 AM Subject: Re: [firebird-support] RE: group by and sub-selects Kelly, As the counts shows - and I previewed this - you still have to do some bindings more to the count subquery. Can be of help if you send the structure of the tables involved in this query, to see how the tables are linked between them. Still better can be if you send a MS Access db having the same structure and a little amount of data. Then, one can play with the data and have more conditions to find the solution you need. If possible. The way I think the solution, one will not only scroll trough the data, but also contract the tuples of no interest, and expand those where one think to better analyse. Having data as I told, it´s possible to do that. And all the solution build using MS Access (you can bind your FB db to MS Access db and run such solution, without having to export data). And you don´t need extra tables. Some views may help to divide the problem for better understanding. Regards, Roberto Camargo. From: "av...@telusplanet.net" To: firebird-support@yahoogroups.com Sent: Thursday, December 26, 2013 7:24 PM Subject: [firebird-support] RE: group by and sub-selects Hi-- Thanks for the reply. You've got a handle on what I want to return and the industry. The query I'm still not clear on. I did clean it up a bit and it ran: select x.ownername, x.location, x.RVYear, ( select count(1) from reliefd r where r.plantkey=x.uniquekey ) RV_Mfg_Event_count from ( select o.ownername, p.location, p.uniquekey, substring( r.datetested from 1 for 4 ) as RVYear from plants p, reliefd r join owners o on p.ownerkey = o.uniquekey where r.plantkey = p.uniquekey and r.datetested=coalesce(r.datetested, '', null, ' ' ) and RVYear ) x order by x.ownername, x.location, rvyear results OWNERNAME LOCATION RVYEAR RV MFG EVENT COUNT Our GTC & MARC Inventory Our Warehouse 19 Our GTC & MARC Inventory Our Warehouse 2009 19 Our GTC & MARC Inventory Our Warehouse 2009 19 Our GTC & MARC Inventory Our Warehouse 2009 19 Our GTC & MARC Inventory Our Warehouse 2009 19 Our GTC & MARC Inventory Our Warehouse 2010 19 Our GTC & MARC Inventory Our Warehouse 2010 19 Our GTC & MARC Inventory Our Warehouse 2010 19 Our GTC & MARC Inventory Our Warehouse 2010 19 Our GTC & MARC Inventory Our Warehouse 2010 19 So, the counts aren't bound to the "group" by in my original query. I realize I could have a single data grid with an overview grid of owners/plant and counts grouped by year or /MM. Then, when users scroll that? I could have a results grid in which I do all the counts using the "where" of the row i'm on in the grouped by grid. But i'd like it all in one grid (for export, reports, plotting). The problem seems to be, I want to do aggrigate functions (count) and have each use it's own where clause. BUT i need each count to understand the group it's in. That's where I don't know how to write the select for the count. I can figure it out for one single column but not multiples each with their own where clause. Somehow I think I need a CTE or a derived table for the list of owners/plant and grouped by or /MM THEN i need to use that table, each row of it, and join that to the counts being done for each row. I really thankyou for taking time to look at this and your suggestions. regards kelly
Re: [firebird-support] RE: group by and sub-selects
Kelly, As the counts shows - and I previewed this - you still have to do some bindings more to the count subquery. Can be of help if you send the structure of the tables involved in this query, to see how the tables are linked between them. Still better can be if you send a MS Access db having the same structure and a little amount of data. Then, one can play with the data and have more conditions to find the solution you need. If possible. The way I think the solution, one will not only scroll trough the data, but also contract the tuples of no interest, and expand those where one think to better analyse. Having data as I told, it´s possible to do that. And all the solution build using MS Access (you can bind your FB db to MS Access db and run such solution, without having to export data). And you don´t need extra tables. Some views may help to divide the problem for better understanding. Regards, Roberto Camargo. From: "av...@telusplanet.net" To: firebird-support@yahoogroups.com Sent: Thursday, December 26, 2013 7:24 PM Subject: [firebird-support] RE: group by and sub-selects Hi-- Thanks for the reply. You've got a handle on what I want to return and the industry. The query I'm still not clear on. I did clean it up a bit and it ran: select x.ownername, x.location, x.RVYear, ( select count(1) from reliefd r where r.plantkey=x.uniquekey ) RV_Mfg_Event_count from ( select o.ownername, p.location, p.uniquekey, substring( r.datetested from 1 for 4 ) as RVYear from plants p, reliefd r join owners o on p.ownerkey = o.uniquekey where r.plantkey = p.uniquekey and r.datetested=coalesce(r.datetested, '', null, ' ' ) and RVYear ) x order by x.ownername, x.location, rvyear results OWNERNAME LOCATION RVYEAR RV MFG EVENT COUNT Our GTC & MARC Inventory Our Warehouse 19 Our GTC & MARC Inventory Our Warehouse 2009 19 Our GTC & MARC Inventory Our Warehouse 2009 19 Our GTC & MARC Inventory Our Warehouse 2009 19 Our GTC & MARC Inventory Our Warehouse 2009 19 Our GTC & MARC Inventory Our Warehouse 2010 19 Our GTC & MARC Inventory Our Warehouse 2010 19 Our GTC & MARC Inventory Our Warehouse 2010 19 Our GTC & MARC Inventory Our Warehouse 2010 19 Our GTC & MARC Inventory Our Warehouse 2010 19 So, the counts aren't bound to the "group" by in my original query. I realize I could have a single data grid with an overview grid of owners/plant and counts grouped by year or /MM. Then, when users scroll that? I could have a results grid in which I do all the counts using the "where" of the row i'm on in the grouped by grid. But i'd like it all in one grid (for export, reports, plotting). The problem seems to be, I want to do aggrigate functions (count) and have each use it's own where clause. BUT i need each count to understand the group it's in. That's where I don't know how to write the select for the count. I can figure it out for one single column but not multiples each with their own where clause. Somehow I think I need a CTE or a derived table for the list of owners/plant and grouped by or /MM THEN i need to use that table, each row of it, and join that to the counts being done for each row. I really thankyou for taking time to look at this and your suggestions. regards kelly
Re: [firebird-support] linker error in VS 2005
sgcoutts, Maybe you have biblios compiled not with Win7, and this may be causing your problem. The solution could be to get the code for these bibliotecs and compile them at your machine. You seem to be programming with C. If yes, I think you could try C# - also from VS - with ODBC connection. And may be you would have an easyer way to get your solution. From my point of view, C# is more user friendly - I know some C programmers don´t like C#. If I am wrong, excuse me. Friendly, Roberto Camargo. From: "sgcou...@telus.net" To: firebird-support@yahoogroups.com Sent: Tuesday, December 24, 2013 3:04 AM Subject: [firebird-support] linker error in VS 2005 I am building an application with the firebird 2.5 API. I keep getting the following errors at compile time. I am using VS 2005 on win 7. Error 1 error LNK2028: unresolved token (0A4B) "extern "C" int __stdcall isc_print_status(int const *)" (?isc_print_status@@$$J14YGHPBH@Z) referenced in function __catch$??0Form1@CallSheet@@$$FQ$AAM@XZ$0 CallSheet.obj Error 2 error LNK2028: unresolved token (0A4C) "extern "C" int __stdcall isc_attach_database(int *,short,char const *,void * *,short,char const *)" (?isc_attach_database@@$$J224YGHPAHFPBDPAPAXF1@Z) referenced in function "public: __clrcall CallSheet::Form1::Form1(void)" (??0Form1@CallSheet@@$$FQ$AAM@XZ) CallSheet.obj Error 3 error LNK2019: unresolved external symbol "extern "C" int __stdcall isc_print_status(int const *)" (?isc_print_status@@$$J14YGHPBH@Z) referenced in function __catch$??0Form1@CallSheet@@$$FQ$AAM@XZ$0 CallSheet.obj Error 4 error LNK2019: unresolved external symbol "extern "C" int __stdcall isc_attach_database(int *,short,char const *,void * *,short,char const *)" (?isc_attach_database@@$$J224YGHPAHFPBDPAPAXF1@Z) referenced in function "public: __clrcall CallSheet::Form1::Form1(void)" (??0Form1@CallSheet@@$$FQ$AAM@XZ) here is the code snippet where i get the errors: #include #include #include #include "ibase.h" #include "ib_util.h" #include "iberror.h" *** db1 = initDBhandle(db1); param_buffer = populate_dpb("SYSDBA", "masterkey"); db_pathname = "..\\CallSheet_DB\\CallSheet.fdb"; try{ isc_attach_database(status_vector,strlen(db_pathname.c_str()),db_pathname.c_str(),&db1, dpb_length, param_buffer); } catch(exception e){ if (status_vector[0] == 1 && status_vector[1]){ /* An error occurred. */ isc_print_status (status_vector); } } I have done extensive searching on the web for a solution to this. Near as I can tell, I am missing an library file of some sort with the actual functions in them. Any help would be greatly appreciated. If you need more info please ask Thanks
Re: [firebird-support] group by and sub-selects
Kelly, If I understood what you want, you wanna do something like a decision cube. I would take your query and change it to... select x.ownername, x.location, x.RVYear, x.RVMonth, ( select count(1) from reliefd r where r.plantkey=x.uniquekey and r.manufacturer=’The Manufacturer I want’) RV_Mfg_Event_count from ( select o.ownername, p.location, p.uniquekey, substring( r.datetested from 1 for 4 ) as RVYear, substring( r.datetested from 1 for 7 ) as RVMonth, from plants p, reliefd r join owners o on p.ownerkey = o.uniquekey where r.plantkey = p.uniquekey and r.datetested=coalesce(r.datetested, '', null, ' ' ) ) x order by o.ownername, p.location, rvyear With x.ownername and x.location, you have one axis of your cube. And with RVYear and x.RVMonth you get the time axis. Probably, you will need some more binding between your count subquery and the other one (its where clause). The way you will get this data, you apply to some front-end controls, like some grids, or to a Excel worksheet, and you can have a drill-down for your data, in two axis. From this, you can build a 3D graphic, or dinamically see your data, according to the attention point where you want to expand your data. Excel or these kind of controls will by themselves aggregate the data acording to their affiliation, according to the data axis. If I am wrong about your intentions, excuse me. But I see you building a solution for industry maintenance, where I worked years ago. And also I worked a little with DataWarehouse, and I believe your solution has both pratical connections. You can also run counts on the many possible combinations of data, but I don´t see them very usefull for you. But, may be another one has other point of view than mine. Good luck, Roberto Camargo. From: "av...@telusplanet.net" To: firebird-support@yahoogroups.com Sent: Tuesday, December 24, 2013 8:39 PM Subject: [firebird-support] group by and sub-selects Hey All-- Always such a great forum!! i’ve got a SQL question without using stored procedures this works: select o.ownername, p.location, (select count(1) from reliefd r where r.plantkey=p.uniquekey) RV_Event_count, (select count(1) from cv c where c.plantkey=p.uniquekey and upper(substring( c.manufacturer from 1 for 4))='MINE' ) CV_MINE_count from owners o, plants p where p.ownerkey = o.uniquekey order by rv_event_count desc (returns counts for each owner and plant) BUT I want to do some grouping by too ie. group by year or /mm (stored as text in the layout of /MM/DD it's NOT a TimeDate field) select o.ownername, p.location, substring( r.datetested from 1 for 4 ) as RVYear, count(1) as RV_Event_Count from plants p, reliefd r join owners o on p.ownerkey = o.uniquekey where r.plantkey = p.uniquekey and r.datetested=coalesce(r.datetested, '', null, ' ' ) group by o.ownername, p.location, rvyear order by o.ownername this works, Owners, Plants and grouped by year with count in the year of records BUT what i want is the various count-of-rows columns based upon "where" clauses like the first BUT grouped this does NOT run... i cannot do the nested ( select ) in the group by?? ie. what i want select o.ownername, p.location, substring( r.datetested from 1 for 4 ) as RVYear, ( select count(1) from reliefd r where r.plantkey=p.uniquekey and r.manufacturer=’The Manufacturer I want’) RV_Mfg_Event_count from plants p, reliefd r join owners o on p.ownerkey = o.uniquekey where r.plantkey = p.uniquekey and r.datetested=coalesce(r.datetested, '', null, ' ' ) group by o.ownername, p.location, rvyear, RV_Mfg_Event_count order by o.ownername, rv_event_count desc somehow there has to be a way with derived tables? subqueries? or CTE (common table expressions)? any suggestions or things I shuold google? (yes, I've been trying for days to figure this out with google... my SQL isn't very strong) thanks kelly
[firebird-support] error en firebird
good morning work with firebird 2.5 installed on ubuntu 12.04 server, this database is working more than two years and is about 2 weeks has presented the following problem error database command native error -904 Firebird ODBC Driver unable to allocate memory from operating system 0 Query [SELECT * FROM Leecontrol ('01 ')] The stored procedure LeeControl only reads a record from the database. The error is not frequent random They could show me some light on this problem In advance, thanks Roberto Quiroz Lima - Peru
[firebird-support] IPv6
Does Firebird 2.5 work on IPv6? If so, does it need any special setting on firebird.conf?
[firebird-support]
Does Firebird 2.5 work on IPv6? If so, does it need any special setting on firebird.conf?
[firebird-support] subject:
http://dontarot.com/us/mqq.htm [Non-text portions of this message have been removed]
[firebird-support] Prime numbers
The example below is from PostgreSQL. Is there an easy way to do it in Firebird 2.5 or 3.0? I need prime numbers to analyse bio data: with primes (num) as ( select generate_series(2,1) ) SELECT num FROM primes p1 WHERE num not in ( SELECT p1.num FROM primes p2 WHERE p2.num < p1.num AND MOD(p1.num, p2.num) = 0 );
[firebird-support] migrate mysql 5 php script to firebird 2.5
How could I convert the following php script from mysql to firebird? //Get records from database $result = mysql_query("SELECT * FROM people;"); //Add all records to an array $rows = array(); while($row = mysql_fetch_array($result)) { $rows[] = $row; } //Return result to jTable $jTableResult = array(); $jTableResult['Result'] = "OK"; $jTableResult['Records'] = $rows; print json_encode($jTableResult); thanks for any help.
Re: [firebird-support] avoiding corruption?
If possible, use nobreak, RAID 10 storage and regular backups. Roberto Em 13/10/2012 18:32, heineferreira < heineferre...@yahoo.com > escreveu: Hi I am still fairly new to Firebird. Are there any best practices for avoiding Firebird database corruption or minimizing database corruption? I suppose the most obvious one is having a ups on your Firebird server. Thanks H.F.
Re: [firebird-support] Comparing databases using scripts generated from isql -extract?
Compare to Firebird databases via system tables (rdb$) is basically a bunch of WHILEs and FORs. For compare scripts on Debian Linux, use DIFF: apt-get install diffutils diffutils-doc Study the programs: diff, diff3, sdiff and cmp. Roberto Em 13/10/2012 14:30, tomsee7 < tomconl...@gmail.com > escreveu: Hi, Does anyone of any tools for comparing databases using scripts generated from the isql -extract command? This seems to be the most convenient way (i.e. comparing scripts) and must be a common need. The ones that I've come across seem to want you to be connected to one or more of the databases. Thanks Tom
[firebird-support] FB 2.5.1 - cannot read external table file through text editor
I am using FB 2.5.1 on Windows 7 64 bits. It works perfectly on FlameRobin 0.9.3.2219 Unicode (x64): --- Create Database test.fdb Default Character Set utf8; Create Table test15 External 'c:\mytable15.txt' ( code1 Integer, code2 Integer, namechar(20), borndate default current_date, crlfchar(2) ); Commit; Insert Into test15(code1, code2, name, born, crlf) Values(1, 2, 'abc', '01.01.2001', ascii_char(13)||ascii_char(10)); Insert Into test15(code1, code2, name, born, crlf) Values(3, 5, 'def', '02.02.2002', ascii_char(13)||ascii_char(10)); Insert Into test15(code1, code2, name, born, crlf) Values(5, 6, 'ghi', '03.03.2003', ascii_char(13)||ascii_char(10)); Insert Into test15(code1, code2, name, born, crlf) Values(7, 8, 'jkl', '04.04.2004', ascii_char(13)||ascii_char(10)); Insert Into test15(code1, code2, name, born, crlf) Values(9, 0, 'mno', '05.05.2005', ascii_char(13)||ascii_char(10)); Commit; Select * From test15; --- But when I open c:\mytable15.txt on Notepad++ 6.1.8 (UNICODE), I only can understand column NAME. The other columns are not human readble. Why I cannot read number and date fields on the text file, but Firebird show them perfectly on select statement? Thanks for any help or hint.
[firebird-support] substract just some minutes from a timestamp?
Firebird 2.5.1 Select Current_TimeStamp - Cast('00:20:00' as Time) From rdb$database; Select Current_TimeStamp - Cast('00:20:00' as TimeStamp) From rdb$database; Dynamic SQL Error expression evaluation not supported unknown ISC error 336397244 How can I correctly substract just some minutes from a timestamp?