Re: [firebird-support] Query problem

2018-02-08 Thread michael.vilhelm...@microcom.dk [firebird-support]
Thank you. Now I understand and now it works. Like this: SELECT VARER.PLU_NR, VAREFRVSTR_DETAIL.V509INDEX, Sum(VAREFRVSTR_DETAIL.ANTALSTK) AS AntalStk, (SELECT Sum(TRANSAKTIONER.SALGSTK) FROM TRANSAKTIONER WHERE TRANSAKTIONER.ART IN (0, 1) AND TRANSAKTION

Re: [firebird-support] Query problem

2018-02-08 Thread michael.vilhelm...@microcom.dk [firebird-support]
Hi Your bolded subquery need to have value e.g. VAREPLU_ID but you not group by this field and server do not know its value then If I understand that correct, I should do something like this: SELECT VARER.PLU_NR, VAREFRVSTR_DETAIL.V509INDEX, Sum(VAREFRVSTR_DETAIL.ANTALSTK) AS AntalStk,

[firebird-support] Query problem

2018-02-07 Thread michael.vilhelm...@microcom.dk [firebird-support]
Hi I have 2 querys. One is working. The other is not. I use Firebird 2.5.3.26780 (i have tried in 2.5.6.27020 and 3.0.0.32483 as well with same result) Query working: SELECT VARER.PLU_NR, VAREFRVSTR_DETAIL.V509INDEX, Sum(VAREFRVSTR_DETAIL.ANTALSTK) AS AntalStk, (SELECT Sum(VV_OM

Re: [firebird-support] Re: Performance problem - input wanted

2017-11-21 Thread michael.vilhelm...@microcom.dk [firebird-support]
Try changing to Afdeling_ID||'' (or Afdeling_ID+0 if it is a number) in your trigger. That should make RDB$FOREIGN105 useless for the query. I did know about this. But I can see now, that there are other querys around the program, which has the same WHERE clause, which causes the same PLAN. A

Re: [firebird-support] Re: Performance problem - input wanted

2017-11-21 Thread michael.vilhelm...@microcom.dk [firebird-support]
ALTER TABLE VAREFRVSTR_DETAIL ADD CONSTRAINT VAREFRVSTR_DETAIL_VNR FOREIGN KEY (VAREPLU_ID) REFERENCES VARER (PLU_NR) ON DELETE NO ACTION ON UPDATE CASCADE RDB$FOREIGN105 ALTER TABLE VAREFRVSTR_DETAIL ADD FOREIGN KEY (AFDELING_ID) REFERENCES AFDELING (AFDELINGSNUMMER)

Re: [firebird-support] Performance problem - input wanted

2017-11-21 Thread michael.vilhelm...@microcom.dk [firebird-support]
Hi all Sorry for my late answer and thank you all for your input. We experienced a large performance drop friday and it lasted until monday around 17. The place where we host our servers, had an update of some antivirus software which gave huge problems. At first we suspected Firebird and

[firebird-support] Re: Performance problem - input wanted

2017-11-21 Thread michael.vilhelm...@microcom.dk [firebird-support]
Hi all Sorry for my late answer and thank you all for your input. We experienced a large performance drop friday and it lasted until monday around 17. The place where we host our servers, had an update of some antivirus software which gave huge problems. At first we suspected Firebird and

[firebird-support] Performance problem - input wanted

2017-11-17 Thread michael.vilhelm...@microcom.dk [firebird-support]
Hi I need some input to a problem I struggle with. I have a Firebird 2.5 database. The size is somewhat 220 Gb. This database has just been moved to a new databaseserver. This new server is a virtual server with the fastest storage available to us (Where we host our servers, they call

[firebird-support] Re: Rename a foreign key

2017-11-16 Thread michael.vilhelm...@microcom.dk [firebird-support]
have you tried altering rdb$indices ? No - but I can try.

[firebird-support] Re: Rename a foreign key

2017-11-16 Thread michael.vilhelm...@microcom.dk [firebird-support]
I think, "slow" here is not a problem - you do it only one time, and not on regular basis. I do know, that its a onetime thing, but if Ihave to wait for it to finish all I want to change, I will not do it. I never do a database structure change when users are connected and do not allow them

[firebird-support] Re: Rename a foreign key

2017-11-16 Thread michael.vilhelm...@microcom.dk [firebird-support]
Use "ALTER TABLE ... DROP CONSTRAINT ..." and then "ALTER TABLE ... ADD CONSTRAINT ... FOREIGN KEY ..." Thats no fast if the table is huge. This method I know. Where you see such FK name as "RDB$FOREIGN60"? It created by you or some DB management tool? As I know, there is no automa

[firebird-support] Rename a foreign key

2017-11-16 Thread michael.vilhelm...@microcom.dk [firebird-support]
Hi Is there any easy and fast way to rename a foreign key constraint? We have a lot like: RDB$FOREIGN60 Which I would like to rename to something more saying. As of now its in Firebird 2.5.7. Regards Michael

[firebird-support] GBak and ERRORLEVEL

2017-05-10 Thread michael.vilhelm...@microcom.dk [firebird-support]
Hi On one of our servers, we do 3 firebird backup each nigth. There are made from a batchfile, which is run via scheduled jobs. On this server, I get ERRORLEVEL=1 every once in a while on either one of them. Whenever I afterwards restores the dump file there is no problem with it. The 3 dump lin

[firebird-support] Re: Error registered in Windows event Viewer

2017-02-21 Thread michael.vilhelm...@microcom.dk [firebird-support]
Thanks for the answer. Mivi

[firebird-support] Error registered in Windows event Viewer

2017-02-21 Thread michael.vilhelm...@microcom.dk [firebird-support]
Hi We have a server running Firebird 2.5.6 SuperServer.On a Windows 64 bits. Every once in a while we get this in the Event Viewer: ANS4005E Error processing '\\db07\c$\ProgramData\firebird\fb_lock_068acd221200a400': file not found Eventid: 4099 Source: AdsmClientService XM

[firebird-support] Trigger after insert question

2016-10-11 Thread michael.vilhelm...@microcom.dk [firebird-support]
hi I have an installation running Firebird 2.5.6 Classic server. On one table, I have e trigger, which is defined as this: SET TERM ^^ ; CREATE TRIGGER UDVALG_MASTER_WEBDANMARK FOR UDVALG_MASTER ACTIVE BEFORE INSERT POSITION 10 AS begin if (NEW.NAVN='WEBDK') then begin /*CREATE RECORD

[firebird-support] Re: Index and statistics

2016-08-19 Thread michael.vilhelm...@microcom.dk [firebird-support]
Thank you. Got it work :)

[firebird-support] Index and statistics

2016-08-19 Thread michael.vilhelm...@microcom.dk [firebird-support]
Hi Every once in a while we need to recalculate statistics for the index. This we do manually. I would like to do this automatically. Can I do this from a batch file? Or from the command line

Re: [firebird-support] Transaction in limbo

2016-07-19 Thread michael.vilhelm...@microcom.dk [firebird-support]
No - here I cannot since we have one external access to this database. And sinse this database is the only one doing this, I have a suspecion that this external access is doing something wrong. But I will check my own programs first to be sure I do not do it wrong

Re: [firebird-support] Transaction in limbo

2016-07-19 Thread michael.vilhelm...@microcom.dk [firebird-support]
I have total access to the code :) I wrote all of it. I only have one routine, where I do two connects to the database. Those do not interact in any way. Or at least they shouldn't - i'll do a check.

[firebird-support] Re: Transaction in limbo

2016-07-19 Thread michael.vilhelm...@microcom.dk [firebird-support]
We have made a POS system. Made in Delphi 2010. Its made of 2 seperate programs. A backend and a frontend. backend uses TIB to communicate with the database. Frontend uses IBObjects. The program will do a lot of read-committed. Upon an update/insert/delete the program will do a start transactio

Re: [firebird-support] Transaction in limbo

2016-07-19 Thread michael.vilhelm...@microcom.dk [firebird-support]
As I read about 2 phase commits, its about 2 databases. We do not use more than one

Re: [firebird-support] Transaction in limbo

2016-07-19 Thread michael.vilhelm...@microcom.dk [firebird-support]
We do not use either replication or more than one database.

[firebird-support] Transaction in limbo

2016-07-19 Thread michael.vilhelm...@microcom.dk [firebird-support]
Hi I have a database, which have had to instances where there have been Transactions in limbo. I know how to fix this. I am on the other hand unsure why they appear. What can cause this? What should/could I check, so I can eliminate this from occuring. The database is a Firebird 2.5 running C

Re: [firebird-support] FB 3.0, Dialect 1 and SQL Error

2016-05-20 Thread michael.vilhelm...@microcom.dk [firebird-support]
Of course Firebird didn't know. And it seems to work. Thank you

[firebird-support] FB 3.0, Dialect 1 and SQL Error

2016-05-20 Thread michael.vilhelm...@microcom.dk [firebird-support]
Hi I have installed Firebird 3.0. I'm testing our program up against this one. Our databases are in SQL dialect 1. I have a table like this: CREATE TABLE MYTABLE ( ID INTEGER NOT NULL, NAME_ VARCHAR(30), VALUEFLOAT NUMERIC(

Re: [firebird-support] Firebird 3.0 and GDS32.DLL

2016-05-04 Thread michael.vilhelm...@microcom.dk [firebird-support]
But it works on the other machine, where I copied it from?

[firebird-support] Firebird 3.0 and GDS32.DLL

2016-05-02 Thread michael.vilhelm...@microcom.dk [firebird-support]
Hi I have succesfully installed Firebird 3.0 on my home computer. I can use our program. We have 3 main programs. Two are using IBX component and the last uses IBObjects. On my local mashine it runs smoothly. I have then installed Firebird 3.0 alongside Firebird 2.5 and 2.1 on a server. Using

[firebird-support] Re: Installing Firebird 3.0 alongside Firebird 2.5 and 2.1

2016-04-28 Thread michael.vilhelm...@microcom.dk [firebird-support]
Thanks Thomas. I have used some of this as well :)

[firebird-support] Re: Installing Firebird 3.0 alongside Firebird 2.5 and 2.1

2016-04-28 Thread michael.vilhelm...@microcom.dk [firebird-support]
Thanks Mark (and all others). I think I have succesfully installed FB 3.0 alongside the other. In legacy mode. This is perfect for testing. Now I'm strucling with GDS32.DLL. We still have programs, which uses these connections. According to: http://firebirdsql.org/file/documentation/release

[firebird-support] Installing Firebird 3.0 alongside Firebird 2.5 and 2.1

2016-04-20 Thread michael.vilhelm...@microcom.dk [firebird-support]
Hi I have a testserver currently running both Firebird 2.1 and 2.5. I need this to support and test various situations with different firebird versions. Now I would like to install Firebird 3.0 manually as well, so I can have 2.1, 2.5 and 3.0 on the same server. 2.1 listens on port 3050, 2.5 li

Re: [firebird-support] Delete global temporary table

2016-04-03 Thread michael.vilhelm...@microcom.dk [firebird-support]
at this Point I have tried (both on the real on Classic Server and on a copy on a SuperServer): - GFIX -sweep - GFIX -v -f I still have the mentionen global temp. table, which cannot be dropped and I suspect is the cause I cannot do a backup. Sugestions?

Re: [firebird-support] Delete global temporary table

2016-04-03 Thread michael.vilhelm...@microcom.dk [firebird-support]
I have already tried GFIX -v and GFIX -v -f and GFIX -mend with no succes. Whatever I do, I cannot drop the global temporary table or do a full backup.

[firebird-support] Delete global temporary table

2016-04-03 Thread michael.vilhelm...@microcom.dk [firebird-support]
Hi I have a routine in my program, where I create af user specific global temporary table. Below you can see, how its created. At some point last monday, a user had a program breakdown, which har left the database in a state, where I cannot make a backup, cannot access one of the global tempo

[firebird-support] Re: Triggers and special characters

2015-11-30 Thread michael.vilhelm...@microcom.dk [firebird-support]
I must learn to google better - I found what I was looking for. Malformed string error on Firebird 2.5 http://firebird-devel.narkive.com/v4Jy7k1h/malformed-string-error-on-firebird-2-5 Malformed string error on Firebird 2.5 http://firebird-devel.narkive.com/v4Jy7k1h/malformed-string-error-

[firebird-support] Triggers and special characters

2015-11-30 Thread michael.vilhelm...@microcom.dk [firebird-support]
Hello I have come across a problem regarding special characters and triggers. I would like to create this trigger: SET TERM ^^ ; CREATE TRIGGER UPD_VV_LAENGDE FOR VAREFRVSTR_DETAIL ACTIVE AFTER UPDATE POSITION 23 AS BEGIN IF ((OLD.AntalStk <> NEW.AntalStk) or (OLD.Beh_Kostpris <> NE

RE: [firebird-support] SQL Creation question

2015-04-01 Thread michael.vilhelm...@microcom.dk [firebird-support]
So simple. Thank you

[firebird-support] SQL Creation question

2015-04-01 Thread michael.vilhelm...@microcom.dk [firebird-support]
Hi I have two tables. They are not related in anyway. One table contains groups and the other contains suppliers Lets say they have this content GROUP = Group 1 Group 2 SUPPLIER Supplier 1 Supplier 2 Can I create a SELECT statement, which will re

[firebird-support] Re: Function - what is it called

2015-01-23 Thread michael.vilhelm...@microcom.dk [firebird-support]
Thanks :) All I was looking for Mivi

[firebird-support] Function - what is it called

2015-01-23 Thread michael.vilhelm...@microcom.dk [firebird-support]
Hi I am looking for a function which are able to add values from a table as records are fetched. Something like this: Value Calculated value 1 1 2 3 3 6 4 10 5 15 The calculated value is just the sum of all previous values of VALUE. Whats the name of such function in engli

Re: [firebird-support] Re: Trace cause of performance drop

2014-12-16 Thread michael.vilhelm...@microcom.dk [firebird-support]
I stand corrected :) Version is 2.5.2.26540. We have planned an update to the newest Firebird version december 25. This database runs live and due to the christmas shopping users are online from 6 to 23.30.And the database must not be unavailable. So - we will wait. Backup / Restore has

[firebird-support] Re: Trace cause of performance drop

2014-12-16 Thread michael.vilhelm...@microcom.dk [firebird-support]
Firebird version is: WI-V6.3.2.26540 Firebird 2.5 I am not very familiar with working with the Trace API at all at this point. So this will be a later task, should I not be able to locate the problem here. Unless you have a suggestion here? Michael

[firebird-support] Trace cause of performance drop

2014-12-15 Thread michael.vilhelm...@microcom.dk [firebird-support]
Hi I have a performance problem at a customer site. At this point I suspect one specific external user connection to cause the problems, but I can't pinpoint it so exactly just yet. But there is one table, where there is inserted records almost all the time. When the user connects, do

Re: [firebird-support] Re: Gbak Restore - SuperServer vs. SuperClassic

2014-11-17 Thread michael.vilhelm...@microcom.dk [firebird-support]
Hmmm, database dialect is 1. No, not really. It was originally created as Dialect 1 back in 1998. It has never been changed, it works and as a matter of fact I'm not sure what happens if the dialect is changed...

Re: [firebird-support] Re: Gbak Restore - SuperServer vs. SuperClassic

2014-11-17 Thread michael.vilhelm...@microcom.dk [firebird-support]
Isnt the transaction per second wrongly calculated? DB is created november 2013. Approcimatly 365 days ago. Transaction is at 96.356.705. Per day is approx: 263.990 Per hour: 10.999 Per minut: 183. Per second: 3

Re: [firebird-support] Re: Gbak Restore - SuperServer vs. SuperClassic

2014-11-17 Thread michael.vilhelm...@microcom.dk [firebird-support]
Beside your gbak restore issue, your counters here show some interesting throughput numbers, when taking the creation date of the database into account: ~ 170 transactions / sec ~ 9 connections / sec We have a external connection from a WEBStore. Whatever they do, they connect and discon

[firebird-support] Re: Gbak Restore - SuperServer vs. SuperClassic

2014-11-17 Thread michael.vilhelm...@microcom.dk [firebird-support]
* What is the page buffers value at database level? (gstat -h) E:\DB\Kaufmann>"c:\Program Files\Firebird\Firebird_2_5\bin\gstat.exe" localhost: e:\db\Kaufmann\OCCEasyPos.FDB -h Database "e:\db\Kaufmann\OCCEasyPos.FDB" Database header page information: Flags 0

[firebird-support] Gbak Restore - SuperServer vs. SuperClassic

2014-11-17 Thread michael.vilhelm...@microcom.dk [firebird-support]
Hi Does GBak behave different on a Classic Server than on a SuperServer regarding restore speed? I ask this, because around 1 year ago I installed Firebird 2.5 SS on a Windows environment. Here I did a restore of a 90 Gb DB. This took around 8 hours. Since then we have switched fr

[firebird-support] Re: Strange connection problem

2014-08-18 Thread michael.vilhelm...@microcom.dk [firebird-support]
I can now tell all you guys, that my current antivirus program F-Secure is causing all this to happen. If I disable, the problem goes away. So I have no problem anymore. Michael

[firebird-support] Strange connection problem

2014-08-18 Thread michael.vilhelm...@microcom.dk [firebird-support]
Hello I have a strange problem, which I have no idea at the moment how to solve. Let me see if I can describe the problem. 1. I start my program. When this happens, I connect to a licens DB (using user OCCLICENS), check some records, disconnects and continue. Now the program connect