Re: [firebird-support] port requirements for Firebird Services API - IBAnalyst

2014-05-30 Thread Office Manager office...@href.com [firebird-support]
Follow-up on this issue...

The problem was that an old copy of gdb32.dll was sitting in 
C:\Windows\SysWOW64. That was loaded before IBAnalyst tried to use 
fbclient.dll, and it was not suitable.  The solution was to copying the 
recent 32-bit fbclient.dll to gds32.dll in the same folder as IBAnalyst.exe.

There was no mysterious firewall issue whatsoever.

Many thanks to Alexey at IBSurgeon for all the off-list emails and 
remote support to resolve this.

Ann






[firebird-support] How to convert big FIREBIRD DB to one charset (win1251) to UTF8 ?

2014-05-30 Thread loris.lu...@gmail.com [firebird-support]
I need your help and/or suggestions to solve a (maybe uncommon) task.
 

 I searched a lot on the web and  I had some success using a tool called 
fbclone but
 this is definitely not a solution (due to extreme slowness of the conversion, 
many days,
something must be wrong with this software)
 

 I have a large Firebird 2.5 DB (a couple of tables have few millions records) 
to convert from WIN1251 charset to UTF8 charset.
 

 Is there a way to do efficiently this kind of conversion? (preferably not 
using a intermediate text sql dump, that would not applicable because the size 
of the DB).
 

 I'm using Firebird on a linux machine, and I really like to do the job using a 
bash script,
 but I can fallback also using a remote Windows pc.
 

 Thanks for any suggestions.
 

 Best regards.
 



[firebird-support] Firebird 2.5 built on AIX 6.1 - core dump

2014-05-30 Thread vvm...@gmail.com [firebird-support]
Hi All,

I'm trying to built  FB from the source code v. 2.5.2.26540-0 on AIX 6.1 (PPC). 
I've made some minor changes in the build script to let it create ./configure 
script, also a couple of source code files slightly changed (mostly to avoid 
conflicts).
But now I'm facing a problem - attempt to create/access to DB file causes core 
dump in Jrd::LockManager::attach_shared_file() function.
Actually, it happens during the build when empty.fdb and other DB files are 
created. Manually retrying create_db I can get all all .fdb files created 
(files are created in spite of  core dump).

AIX 6.1 PPC, XL C++ compiler 

My settings:
 export CC=xlc_r
 export CXX=xlC_r
 export CFLAGS=-q64 -gxlc
 export CXXFLAGS=-q64 -gxlC

 
 ./autogen.sh --enable-debug=yes 
 

 this is the core stack of create_db:
 (gdb) where
#0  0x00010037945c in Jrd::LockManager::attach_shared_file( (long *)) 
(this=0x7006fa0,
status=0xfffe660) at ../src/lock/lock.cpp:344
#1  0x00010038aa9c in 
__ct__Q2_3Jrd11LockManagerFRCQ2_8Firebird10StringBaseXTQ2_8Firebird16StringComparator_
 (
this=0x7006fa0, id=@0xfffef50: ???) at 
../src/lock/lock.cpp:232
#2  0x00010038ae98 in 
create__Q2_3Jrd11LockManagerFRCQ2_8Firebird10StringBaseXTQ2_8Firebird16StringComparator_
 (
id=@0xfffef50: ???) at ../src/lock/lock.cpp:182
#3  0x00010026d6a8 in jrd8_attach_database (user_status=0x6d0,
filename=0x7008c60 error: Cannot access memory at address 
0x7008c60, handle=0x318,
dpb_length=17, dpb=0x4c8 \001M) at ../src/jrd/jrd.cpp:1039
#4  0x0001000a64e8 in isc_attach_database (user_status=0x6d0, 
file_length=0,
file_name=0xa55 empty.fdb, public_handle=0x770, 
dpb_length=4,
dpb=0x7b8 \001@\001\001П) at ../src/jrd/why.cpp:1493
#5  0x00011338 in main (argc=2, argv=0x910) at 
../src/utilities/create_db.cpp:49


 

 Any ideas what should I do to make it working would be appreciated.
 

 Thanks.

 



[firebird-support] Update only changed tuple/ execute if-statement via execute statement?

2014-05-30 Thread eric wulfhekel eric.wulfhe...@gmail.com [firebird-support]
Hello,


I would be very happy if anybody could help me. I want to create a update
trigger which sets the current date to a field modified if values has
changed. I have a lot of tables with a lot of columns so i want to work
with system table for that task. I build the if-statement within a select
and wat to execute this statement


Like:


CREATE TRIGGER PLZTEST_MODIFIED FOR PLZTEST
ACTIVE BEFORE UPDATE POSITION 0
AS
declare variable stmt varchar(1024);
begin
for
select 'if (new.' || rdb$field_name || ' is null and old.' ||
rdb$field_name || ' is not null or new.' || rdb$field_name ||
'is not null and old.' || rdb$field_name || ' is null or new.' ||
rdb$field_name || '  old.' || rdb$field_name || ') then
new.MODIFIED = current_timestamp;'
 from rdb$relation_fields
 where rdb$relation_name = 'PLZTEST'
 into :stmt
do
execute statement stmt;
end




The resulting statement looks good.
The problem here seems, that i could not execute statements starts with if.
the error occur is


Dynamic SQL Error.
SQL error code = -104.
Token unknown - line 1, column 1.
if.


Or maybe is there another way to realise that?


Thank you in advance


RE: [firebird-support] Update only changed tuple/ execute if-statement via execute statement?

2014-05-30 Thread Svein Erling Tysvær svein.erling.tysv...@kreftregisteret.no [firebird-support]
Hello, 
I would be very happy if anybody could help me. I want to create a update 
trigger which sets the current date to a field modified 
if values has changed. I have a lot of tables with a lot of columns so i want 
to work with system table for that task. I build the 
if-statement within a select and wat to execute this statement

Like:

CREATE TRIGGER PLZTEST_MODIFIED FOR PLZTEST
ACTIVE BEFORE UPDATE POSITION 0
AS
declare variable stmt varchar(1024);
begin
for
    select 'if (new.' || rdb$field_name || ' is null and old.' ||
    rdb$field_name || ' is not null or new.' || rdb$field_name ||
    'is not null and old.' || rdb$field_name || ' is null or new.' ||
    rdb$field_name || '  old.' || rdb$field_name || ') then new.MODIFIED 
= current_timestamp;'
 from rdb$relation_fields
     where rdb$relation_name = 'PLZTEST'
 into :stmt
do
execute statement stmt;
end

The resulting statement looks good.

Are you sure? I’ve never tried doing what you’re doing, but would 
(unfortunately) be surprised if new.* and old.* was available in 
rdb$relations_fields.

The problem here seems, that i could not execute statements starts with if. 
the error occur is

Dynamic SQL Error.
SQL error code = -104.
Token unknown - line 1, column 1.
if.
Or maybe is there another way to realise that?

Rather than writing a general trigger for modifying any table, I think I would 
recommend that you write a stored procedure that takes a table name as an input 
parameter that then dynamically creates a CREATE OR ALTER TRIGGER statement 
specifically targeted towards the table in question (hence a stored procedure 
that creates specific triggers (DDL) as opposed to one generic trigger).

By the way, if you’re using Firebird 2.x, it’s simpler to use IS DISTINCT FROM 
which treats NULL as if it was a value and have one rather than three 
comparisons for each field.

HTH,
Set


RE: [firebird-support] Firebird 1.5 on 64bit OS. Newer Hardware but bad performance

2014-05-30 Thread Halim Boumedjirek halim1...@hotmail.com [firebird-support]
Hi Alexey,Here is where I read it. Page 7. PPT Presentation during FDD 2012, 
Brazil.http://www.slideshare.net/ibsurgeon/resolving-firebird-performance-problems#Keep
 in mind, we are still using 1.5 FB.Thank you,-Halim

To: firebird-support@yahoogroups.com
From: firebird-support@yahoogroups.com
Date: Fri, 30 May 2014 08:06:04 +0400
Subject: Re: [firebird-support] Firebird 1.5 on 64bit OS. Newer Hardware but 
bad performance














 

 



  



  
  
  
Halim,


It is out of context. Recent 2.5.2 has no such problem.

Where did you read it?

Regards,

Alexey Kovyazin

IBSurgeon 

30.05.2014 4:41 пользователь halim1...@hotmail.com [firebird-support] 
firebird-support@yahoogroups.com написал:














 

 



  



  
  
  
We recently upgraded our database server from Win server 2003 to Win 2008 
server. We upgraded hardware as well.
The new hardware (IBM x3550 M4) is way more advanced than the old one. 4 times 
the RAM and CPU speed.

We ran some tests on the new hardware(a few select/update queries), the 
performance was way less than the old server using the same database.
I read somewhere on one of IB Surgeon slides that All architectures of 32 bit 
Firebird will work bad at 64-bit Windows with 4Gb RAM.


Since we can't upgrade our Firebird DB to 2.x, Do we need to downgrade our OS 
to a 32 bit version and install less RAM to gain a little more performance or 
we missing something else?



Thanks,
-Halim







 









  











 









  

Re: [firebird-support] Firebird 1.5 on 64bit OS. Newer Hardware but bad performance

2014-05-30 Thread Alexey Kovyazin a...@ib-aid.com [firebird-support]

Halim,

Ok, thank you.
1.5 is really old, upgrade asap.

Regards,
Alexey Kovyazin



Hi Alexey,
Here is where I read it. Page 7. PPT Presentation during FDD 2012, Brazil.
http://www.slideshare.net/ibsurgeon/resolving-firebird-performance-problems#
Keep in mind, we are still using 1.5 FB.
Thank you,
-Halim



To: firebird-support@yahoogroups.com
From: firebird-support@yahoogroups.com
Date: Fri, 30 May 2014 08:06:04 +0400
Subject: Re: [firebird-support] Firebird 1.5 on 64bit OS. Newer 
Hardware but bad performance



Halim,

It is out of context. Recent 2.5.2 has no such problem.
Where did you read it?
Regards,
Alexey Kovyazin
IBSurgeon
30.05.2014 4:41 пользователь halim1...@hotmail.com 
mailto:halim1...@hotmail.com [firebird-support] 
firebird-support@yahoogroups.com 
mailto:firebird-support@yahoogroups.com написал:



We recently upgraded our database server from Win server 2003 to
Win 2008 server. We upgraded hardware as well.
The new hardware (IBM x3550 M4) is way more advanced than the old
one. 4 times the RAM and CPU speed.
We ran some tests on the new hardware(a few select/update
queries), the performance was way less than the old server using
the same database.
I read somewhere on one of IB Surgeon slides that All
architectures of 32 bit Firebird will work bad at 64-bit Windows
with 4Gb RAM.

Since we can't upgrade our Firebird DB to 2.x, Do we need to
downgrade our OS to a 32 bit version and install less RAM to gain
a little more performance or we missing something else?


Thanks,
-Halim









RE: [firebird-support] Firebird 1.5 on 64bit OS. Newer Hardware but bad performance

2014-05-30 Thread Halim Boumedjirek halim1...@hotmail.com [firebird-support]
Will do.Thank you.-Halim

To: firebird-support@yahoogroups.com
From: firebird-support@yahoogroups.com
Date: Fri, 30 May 2014 14:31:07 +0400
Subject: Re: [firebird-support] Firebird 1.5 on 64bit OS. Newer Hardware but 
bad performance














 

 



  



  
  
  
  
  

Halim,

  

  Ok, thank you. 

  1.5 is really old, upgrade asap.

  

  Regards,

  Alexey Kovyazin

  

  


  
  
  



Hi Alexey,
  Here is where I read it. Page 7. PPT Presentation
during FDD 2012, Brazil.
  
http://www.slideshare.net/ibsurgeon/resolving-firebird-performance-problems#
  Keep in mind, we are still using 1.5 FB.
  Thank you,
  -Halim
  




  To:
  firebird-support@yahoogroups.com

  From: firebird-support@yahoogroups.com

  Date: Fri, 30 May 2014 08:06:04 +0400

  Subject: Re: [firebird-support] Firebird 1.5 on 64bit
  OS. Newer Hardware but bad performance

  

   
  

   

Halim,



It is out of context. Recent 2.5.2 has no such
problem.

Where did you read it?

Regards,

Alexey Kovyazin

IBSurgeon 

30.05.2014 4:41
  пользователь halim1...@hotmail.com
  [firebird-support] firebird-support@yahoogroups.com
  написал:

  

   
  

   

We recently upgraded our database
server from Win server 2003 to Win
2008 server. We upgraded hardware as
well.

The new hardware (IBM x3550 M4) is
way more advanced than the old one.
4 times the RAM and CPU speed.

We ran some tests on the new
hardware(a few select/update
queries), the performance was way
less than the old server using the
same database.

I
  read somewhere on one of IB
  Surgeon slides that All
  architectures of 32 bit Firebird
  will work bad at
  64-bit Windows with 4Gb RAM.



Since
  we can't upgrade our Firebird DB
  to 2.x, Do we need to downgrade
  our OS to a 32 bit version and
  install less RAM to gain a little
  more performance or we missing
  something else?





Thanks,

-Halim







  

  

  



  

  

  

  
  
  
  



  





 









  

Re: [firebird-support] Update only changed tuple/ execute if-statement via execute statement?

2014-05-30 Thread Ann Harrison aharri...@ibphoenix.com [firebird-support]
On Sat, May 24, 2014 at 8:51 AM, eric wulfhekel eric.wulfhe...@gmail.com
[firebird-support] firebird-support@yahoogroups.com wrote:


  I want to create a update trigger which sets the current date to a field
 modified if values has changed. I have a lot of tables with a lot of
 columns so i want to work with system table for that task. I build the
 if-statement within a select and wat to execute this statement


I've left your example below.  You're on the right track.  The actual
problem you're having is that EXECUTE STATEMENT executes SQL statements.
 You're generating a statement that can be used only in triggers and stored
procedures.  As Set suggested, a better plan would be to use your current
approach, but generate actual CREATE TRIGGER statements rather than the
PSQL.  Yes, that means that you will need to recreate triggers when your
tables change, but you may be able to do that - or at least signal that
maintenance is required - with a DDL trigger.

Alternately you could generate a series of SQL statements - UPDATE ...
WHERE NEW.field IS DISTINCT FROM OLD.field - and execute them.
 However, that would be horribly inefficient - searching the system tables,
generating a query, passing that query to the engine where it has to be
parsed, compiled, optimized, executed, and released - all of that for every
field in every record you change.  I'd bet that performance would be
measured not by wall clock, but by calendar.

Good luck,

Ann




Here's the statement you tried and the error...



 CREATE TRIGGER PLZTEST_MODIFIED FOR PLZTEST
 ACTIVE BEFORE UPDATE POSITION 0
 AS
 declare variable stmt varchar(1024);
 begin
 for
 select 'if (new.' || rdb$field_name || ' is null and old.' ||
 rdb$field_name || ' is not null or new.' || rdb$field_name ||
 'is not null and old.' || rdb$field_name || ' is null or new.' ||
 rdb$field_name || '  old.' || rdb$field_name || ') then
 new.MODIFIED = current_timestamp;'
  from rdb$relation_fields
  where rdb$relation_name = 'PLZTEST'
  into :stmt
 do
 execute statement stmt;
 end


 The resulting statement looks good.
 The problem here seems, that i could not execute statements starts with
 if. the error occur is

 Dynamic SQL Error.
 SQL error code = -104.
 Token unknown - line 1, column 1.
 if.

 Or maybe is there another way to realise that?

 Thank you in advance


 



RES: [firebird-support] Firebird 1.5 on 64bit OS. Newer Hardware but bad performance

2014-05-30 Thread 'Fabiano - Desenvolvimento SCI' fabi...@sci10.com.br [firebird-support]
Maybe you dont have a HDD cached controller.

Run a program like Crystal Disk Mark in the old computer and in the new 
computer. If the performance of new computer is terrible you must change your 
physical hard disk controller. 

I had this problem with a Dell server that is a “internet server” (without 
cache) instead of a “Database serve”.

 

De: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] 
Enviada em: quinta-feira, 29 de maio de 2014 21:42
Para: firebird-support@yahoogroups.com
Assunto: [firebird-support] Firebird 1.5 on 64bit OS. Newer Hardware but bad 
performance

 

  

We recently upgraded our database server from Win server 2003 to Win 2008 
server. We upgraded hardware as well.

The new hardware (IBM x3550 M4) is way more advanced than the old one. 4 times 
the RAM and CPU speed.

We ran some tests on the new hardware(a few select/update queries), the 
performance was way less than the old server using the same database.

I read somewhere on one of IB Surgeon slides that All architectures of 32 bit 
Firebird will work bad at 64-bit Windows with 4Gb RAM.

Since we can't upgrade our Firebird DB to 2.x, Do we need to downgrade our OS 
to a 32 bit version and install less RAM to gain a little more performance or 
we missing something else?

 

Thanks,

-Halim

 





Re: RES: [firebird-support] Firebird 1.5 on 64bit OS. Newer Hardware but bad performance

2014-05-30 Thread Josh Hartmann jhartm...@computekdental.com [firebird-support]
We recently had to deal with this issue. Going from 2003 32bit to 08
64bit. The problem is the way FB utilizes system memory when using an
older version on a 64bit system. We upgraded to 2.5.2 64bit and it gave
us more options for tweaking the usage of system memory VS FB cache. It
also fixed FB's memory bug on 64bit systems. Completely solved our issue.

We also did a bunch of other tweaks that really helped. Let me know if
you need any help with this.

-Josh

_*Josh Hartmann*_
Senior Engineer
COMPUtek Dental Systems
P: 970-224-4022
F: 970-224-4001


On 05/30/2014 09:38 AM, 'Fabiano - Desenvolvimento SCI'
fabi...@sci10.com.br [firebird-support] wrote:
 Maybe you dont have a HDD cached controller.

 Run a program like Crystal Disk Mark in the old computer and in the new 
 computer. If the performance of new computer is terrible you must change your 
 physical hard disk controller. 

 I had this problem with a Dell server that is a “internet server” (without 
 cache) instead of a “Database serve”.

  

 De: firebird-support@yahoogroups.com 
 [mailto:firebird-support@yahoogroups.com] 
 Enviada em: quinta-feira, 29 de maio de 2014 21:42
 Para: firebird-support@yahoogroups.com
 Assunto: [firebird-support] Firebird 1.5 on 64bit OS. Newer Hardware but bad 
 performance

  

   

 We recently upgraded our database server from Win server 2003 to Win 2008 
 server. We upgraded hardware as well.

 The new hardware (IBM x3550 M4) is way more advanced than the old one. 4 
 times the RAM and CPU speed.

 We ran some tests on the new hardware(a few select/update queries), the 
 performance was way less than the old server using the same database.

 I read somewhere on one of IB Surgeon slides that All architectures of 32 bit 
 Firebird will work bad at 64-bit Windows with 4Gb RAM.

 Since we can't upgrade our Firebird DB to 2.x, Do we need to downgrade our OS 
 to a 32 bit version and install less RAM to gain a little more performance or 
 we missing something else?

  

 Thanks,

 -Halim