[firebird-support] Trigger created as inactive

2020-05-12 Thread Robert martin r...@chreos.com [firebird-support]
Hi  All

I have a script that creates my database structure.  I create the 
following trigger for a table but unlike my other triggers this one is 
created 'inactive'.  I can run 'ALTER TRIGGER FilterStore_Inc ACTIVE' 
and activate the trigger without issue. The table and sequence are 
already created in the DB before the trigger is created.

CREATE OR ALTER TRIGGER FilterStore_Inc FOR FilterStore

     ACTIVE BEFORE INSERT POSITION 0
     AS BEGIN
         IF (NEW.FilterStoreRef IS NULL) THEN BEGIN
             NEW.FilterStoreRef = GEN_ID(FilterStoreRef_Seq, 1);
         END
     END^

Any idea why this might be?

Thanks
Rob




Re: [firebird-support] How to "remap" the count datatype from BIGINT to INTEGER in firebird 3

2020-03-02 Thread Robert martin r...@chreos.com [firebird-support]
I have dealt with this before on large projects (FB 2.0 / 2.5).  Its not 
really a big deal.  Just do a (text) search through your .dfm 
(form/datamodule) files for the field and edit the text files to change 
the data type to the correct version.  You can even automate the process 
as required. Rebuild the project and your done.  Obviously this doesn't 
work if your dfms are binary.

Cheers
Rob


On 3/03/2020 12:01 am, Roberto Vieweg jjw.roberto.fireb...@gmail.com 
[firebird-support] wrote:
> 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] re: Can't get Firbird 3.x embedded to work in Delphi 10.3 update 1?

2019-04-30 Thread Robert martin r...@chreos.com [firebird-support]

Hi Chris

I haven't been following the thread, so this may be totally of track 
but, Embedded only supports one connection.  If you try to connect a 
second instance you get the database unavailable error message you are 
seeing.  Is it simply that you have something else (your app or a DB 
tool?) connected to the DB already when you are trying from the IDE?


Cheers
Rob

On 30/04/2019 1:41 PM, 'Chris LeFebvre' lefebv...@comcast.net 
[firebird-support] wrote:


Eric:

Thanks for your help, the example went a long way to getting my 
problem fixed. These are the steps I took and the results:


I saved your programs files to a unique directory, created a new empty 
project and added your .pas file to the project; added the 64bit 
platform to the project and made it active, copied the test employees 
database to the Debug directory along with the files from the Firebird 
x64 kit and set the text of the TEdit to the full path to the 
database. I was able to connect both in designtime and runtime. I 
copied my database to the Debug directory and changed the text of the 
Tedit to be my database and again I was able to connect both in 
designtime and runtime.


I examined the project that I was w orking on and really had a hard 
time pining down what exactly was the difference because everything 
seemed to be the same but when I added your code (customized to my 
component names and details):


  FDConnection1.Params.Clear;

  FDConnection1.DriverName := 'FB';

  FDConnection1.Params.Database := Edit1.Text;

  //FDConnection1.Params.UserName := 'SYSDBA';

  //FDConnection1.Params.Password := 'masterkey';

  FDPhysFBDriverLink1.VendorLib := 'fbclient.dll';

  FDPhysFBDriverLink1.Embedded := True;

  FDConnection1.Connected := True;

  MessageDlg('Connection OK !', mtInformation, [mbOK], 0);

& nbsp;

I got my program to work during runtime but I still can’t get it to 
connect during designtime, even though each of the parameter options 
appear to be exactly what your code is setting them to I still get 
“Unavailable database” when I check off Connected in the IDE.


I’ll have to work on this a little more but there must be some 
parameter that is set incorrectly in designtime that is cleared during 
runtime by the FDConnection1.Params.Clear statement, at least that’s 
my current theory. If I






Re: [firebird-support] Firebird startup issue

2019-02-03 Thread Robert martin r...@chreos.com [firebird-support]
Hi Karol

Yes that fixes it, although I now have to wait 2 minutes after starting 
my computer before I try and use Firebird, but I guess its not a big 
deal as I don't reboot often.

Thanks
Rob





[firebird-support] Firebird startup issue

2019-01-31 Thread Robert martin r...@chreos.com [firebird-support]
Hi

I have just upgraded my PC (everything new except the HDD).  Now when I 
boot my computer the Firebird service shows as started but looking at 
the log I see the following entries

TAU    Fri Feb 01 16:46:47 2019
     INET/inet_error: bind errno = 10013


TAU    Fri Feb 01 16:46:47 2019
     Unable to complete network request to host "Tau".
     Error while listening for an incoming connection.


My computer is Tau.  Attempting to connect to any DN fails. Restarting 
the Firebird service resolves the issue and I can proceed as normal.

I have disabled my Firewalls (Windows Defender & Webroot) but I still 
have the issue after a reboot.  I have also un-installed and re 
installed Firebird (2.5.8 Superclassic).

It is almost like the network stack hasn't finished starting up when the 
Firebird service tries to start.  Any suggestions?


Cheers
Rob




[firebird-support] Service name

2019-01-30 Thread Robert martin r...@chreos.com [firebird-support]
Hi All

I am trying to write something that checks if the Firebird service is 
running (Windows app).  On my machine (running 2.5 super classic) it 
shows as 'FirebirdServerDefaultInstance'.  Do other versions (super 
server, FB 3.0 , 4.0) use different names for the service ?

Would I be safe just searching for name containing 'FirebirdServer'  
(case insensitive) instead?


Thanks
Rob




-- 
-

Robert Martin
Development Manager


Ph 03 377-0495
fax03 377-0496
email  r...@chreos.com

Wild Software Ltd
www.chreos.com

Please forward all support queries to supp...@chreos.com
so we may respond to your query as quickly as possible.



Re: [firebird-support] Remote Event not working on Windows Server 2003

2018-07-05 Thread Robert martin r...@chreos.com [firebird-support]


Hi

I haven't used FB events for a while but most likely the issue is 
security / firewall.  Your Server OS is likely blocking the additional 
Port needed for FB events.  What we used to do was specify a fixed 
'RemoteAuxPort' in the FB conf file and then specifically unblock that 
port in the firewall.  The easiest way to see if it is a security / 
firewall issue is to simply temporarily disable the firewall and see if 
you app starts working (after a restart).


Hope that helps
Rob

On 6/07/2018 2:16 AM, Aleksa Ristic ale...@termodom.rs 
[firebird-support] wrote:


I am having application that is working normally with firebird
2.1.7.18553, .NET 4 and Firebird NET Provider version 5.12.0. Now I am
implementing FbRemoteEvent inside it.

FbRemoteEvent works normally on my local PC (Windows 10 - testing PC)
but it doesn't work when I put it on my Windows Server 2003.

Error I get is:

Error reading data from the connection.
at FirebirdSql.Data.FirebirdClient.FbRemoteEvent.QueueEvents(String[]
events)
at Magacin.Main.DataBaseEventListner()

What i found is that it doesm mean he is connected to database but for
some reason it was rejected.

I do not understand why it rejects it since all my other commands work
in that app (SELECTING, UPDATING, INSERTING, FbDataReader,
FbDataAdapter, FbCommand)

Also what i am assuming is that FbRemoteEvent have some problem with
creating event on Windows Server 2003 since it DOES work on my local
machine and all other components of firebird works on Server too.

Code i am using for FbRemoteEvent is:

private void DataBaseEventListner()
{
FbRemoteEvent revent = new FbRemoteEvent(M.Baza.connectionString);

revent.RemoteEventCounts += (sender, e) =>
{
this.Invoke(new MethodInvoker(delegate
{
Poruka p = new
Poruka(Magacin.Poruka.UcitajPoslednjuPorukuID(Korisnik.korisnikId));
p.Show();
}));
};
revent.QueueEvents(String.Format("nova_poruka~" +
Korisnik.korisnikId.ToString()));
}

I tried removing this part "Poruka p = new Poruka..." since inside that
method I start new connection but it still not works.

I tried setting this method at start of application where I do not have
any connection to database and it still doesn't work

I tried adding "Pooling=false" to connection string and still nothing.

I tried adding "Connection Timeout = 15" but still not working.

Connection string I am having is:

data source=4monitor;initial catalog = C:\Prirucni
Magacin\PRIRUCNIMAGACIN.FDB;user=SYSDBA;password=masterkey

4monitor is computer which Is locally attached to Windows Server 2003
computer and has local ip of 192.168.0.11 which I got with pinging
"4monitor" from cmd from Remote Desktop.







[firebird-support] Embedded with FB 3

2018-04-24 Thread Robert Martin nz...@live.com [firebird-support]
Hi All

In past I have used Embedded to make apps that required no FB (2) install and 
could simply be copied onto machines.  I need to do this for a client running 
FB 3.  I have scanned the notes and find 'A special “embedded library” is no 
longer required. To make the embedded connection, the standard client loads the 
appropriate provider and becomes an embedded server.'

Does this mean I only need to ship the client library now or is it still an 
number of files?  If it's still a number of files where do I find a list of 
what files and directory structure is required.  I can't seem to find any 
information on shipping FB 3 as an embedded DB.

Thanks
Rob



Re: [firebird-support] Firebird:Search All Fields In All Tables For A Specific Value

2018-02-11 Thread Robert martin r...@chreos.com [firebird-support]

On 12/02/2018 10:03 AM, iorip...@sina.com [firebird-support] wrote:
>
> Do not know table name, do not know field name.
>
> Only know A Specific Value.
>
> How to find out witch tables and fields include this Value?
>
> Thank you!
>

Hi

Use the RDB$ (firebird system) tables to first get a list of DB 
tables and then a list of fields for each table.  If your value is 
numeric you can just search numeric type fields.  You can do this on app 
code or in a stored procedure.

Cheers
Rob


Re: [firebird-support] Re: How to get a list of columns from another select

2017-01-25 Thread Robert martin r...@chreos.com [firebird-support]


Hi

We do this all over the place.  We have a custom grid component that has 
a save as option, so the grid could be displaying anything.
We simply iterate the columns collection of the grid component. If your 
custom Query is displayed in a grid you should be able to do this in 
your dev environment.  If its not displayed in a grid you could place a 
hidden grid on the screen and use that, or a better solution would be to 
use your database components which should have a fields (or similar) 
collection of the results (we use IBObjects / Delphi and it definitely 
does) .


Cheers
Rob



On 26/01/2017 9:57 AM, jorg...@yahoo.com [firebird-support] wrote:

Hi Dimitry.
Is not that. The subquery is entered at runtime in my application and 
then exported to a spreadsheet.


In my application there is a screen where the user can enter the query 
(ANY), it is exported and they only see the results but do not know 
the name of the column.


When exporting the query, I must get the names of the columns and also 
send them along with the data.







Re: [firebird-support] internal Firebird consistency check (decompression overran buffer (179), file: sqz.cpp line: 239)

2016-10-05 Thread Robert martin r...@chreos.com [firebird-support]

Hi

I am no expert in these things but I thought that DB file access that 
was not 'through' the FB server while FB server is running could cause 
DB file corruption.  With our systems we always exclude the FDB from 
virus scanning and external backup applications. We have a FB backup 
(GBak) run and then have the external backup tool backup the .fbk file.  
Seems like your external backup could be causing this, which would 
explain the regularity of the issue.


Thanks
Rob



On 4/10/2016 11:00 PM, Alexey Kovyazin a...@ib-aid.com [firebird-support] 
wrote:


Hi Ian,

It seems that you have multi-volume database, is it correct?

Regards,
Alexey Kovyazin
IBSurgeon


Hi FB Support!


We have been running FB since IB4.2 days and have only previously had 
any database corruption when we've had hardware issues...until 
recently, when I've seen this error on 2 different servers that I'm 
reasonably confident are both fine! However, our setup is probably 
fairly unique. I'm not panicking at the moment as we recovered all 
the data from the backup, but as I've had this twice in a month on 
different machines I'm keen to adjust the setup so it doesn't happen 
again.



We are running about 20 customers on a server, each with their own 
set of Firebird/PHP-FPM/Nginx/custom python servers running as 
services bound to separate IP addresses – this is (in theory!) to 
keep each customer isolated from the others whilst sharing most of 
the resources on the box without too much overhead from containers or 
full visualisation.



FB is listening as a tcpsvd service but with a shared lock folder:


exec tcpsvd -c 60 -u firebird:firebird -l $remote_bind_addr 
$remote_bind_addr $remote_bind_port /usr/sbin/fb_inet_server -i -e 
"/srv/$CUSTOMER/interbase/" -el "/tmp/firebird/tmpfs"



and with a “localhost” for our own convenience:


exec tcpsvd -c 60 -u firebird:firebird -l 127.0.0.1 127.0.0.1 3050 
/usr/sbin/fb_inet_server -i -e "/var/interbase/" -el 
"/tmp/firebird/tmpfs"



I had assumed because they were using the share lock folder that this 
is allowed.



Each night we loop through all the customers and run :


for database in /customers/*.gdb

do

echo “Doing $database:”

echo -n “gbak ”

gbak -b -g localhost:$database /backupdata/$database.gbak

echo $?

echo -n “gfix ”

gfix -sweep localhost:$database

echo $?

echo -n “isql “

echo “EXECURE PROCEDURE nightlySQL;” | isql localhost$database

echo $?

done


Whilst this backup is running we don't disable any external access 
and have a mixture of python and php clients accessing throughout the 
night using the $remote_bind_addr:$database connection string rather 
than localhost:.



Over the weekend a 12GB backup finished successfully, but errors 
started appearing in the firebird2.5.log file at the same time as the 
next database was being backed up – suggesting that either the gfix 
or isql had tripped up before the script moved on. However, the 
output from the backup was:



Doing :

gbak 0

gfix 0

isql 0


The firebird log has the next customer's sweep starting immediately 
after the first “internal Firebird consistency check (decompression 
overran buffer (179), file: sqz.cpp line: 239)” on the now corrupt 
database which suggests the isql line is “to blame” - but the 
nightlySQL doesn't do a lot, just deletes from a table and 
re-populates a load of summaries from a big table. The firebird log 
error coincides with an NGINX request for the data that the 
nightlySQL is building, but I've repeated this today and it doesn't 
by itself kill the database. I've got nothing else in either syslog 
or dmesg.



I've run IBSurgeon against the file. It gives me the following output:


03/10/2016 11:23:53 INFO: Open database files: Z:\home\**-bad.gdb


03/10/2016 11:23:53 INFO: Analyzing database low-level structures...

03/10/2016 11:27:42 INFO: Actual PageCount: 1534112 found in database

03/10/2016 11:27:42 ERROR: Found 18 undefined or unrecognized pages.

03/10/2016 11:27:42 INFO: == DATABASE IS READY FOR DIAGNOSING AND 
REPAIRING. 


03/10/2016 11:27:42 INFO: == Now choose "Diagnose" or "Repair". 

03/10/2016 11:51:31 INFO: --- Starting diagnose

03/10/2016 11:51:31 INFO: Running procedure: Header page check

03/10/2016 11:51:31 INFO: ODS Major = 11 (32779)

03/10/2016 11:51:31 INFO: ODS Minor = 2

03/10/2016 11:51:31 INFO: Next transaction = 13910909

03/10/2016 11:51:31 INFO: Oldest transaction = 13910907

03/10/2016 11:51:31 INFO: Oldest active = 13910908

03/10/2016 11:51:31 INFO: Oldest snapshot = 13910908

03/10/2016 11:51:31 INFO: PageSize is Ok = 8192

03/10/2016 11:51:31 INFO: Running procedure: Checking of RDB$Pages 
consistency


03/10/2016 11:53:42 INFO: Checking of RDB$Pages consistency: Ok

03/10/2016 11:53:42 INFO: Running procedure: Low-level check of all 
relations


03/10/2016 11:53:43 INFO: Relation RDB$DATABASE (1) is OK

03/10/2016 11:53:44 INFO: Relation RDB$FIELDS (2) is OK

03/10/2016 11:53:46 INFO: Relation 

Re: [firebird-support] Re: Issue with Database Cache Size on FB 3.0

2016-06-01 Thread Robert martin r...@chreos.com [firebird-support]

Hi Fabian

Can't see your screen shot but FB usage at 2GB sounds like the limit for 
a 32Bit app.  Have you installed the 32Bit version of FB accidentally?


Thanks
Rob

On 2/06/2016 11:12 a.m., fabia...@itbizolutions.com.au 
[firebird-support] wrote:


Dmitry

Something funny is going on regarding the memory consumption, I have 
attached screenshots showing the memory counters. If you look at the 
process itself (file 
TaskManager_Process_Firebird_Only_Consumed_2GB.jpg), it only consumed 
2 GB. If you look at Windows Task Manager (file 
TaskManager_Performance_ALL_RAM_Consumed.jpg), where it says "Physical 
Memory, just under the memory graph where it shows 3.13 GB used, the 
cached memory is 29963 Mb. I know Firebird is who consumed that CACHED 
memory because I am forcing the DB to read 70GB on purpouse, but why 
is the memory not showing under the process Firebird ? (it only shows 
2GB used there).


My aim is to set the config to only use RAM (no file system cache), 
and to place the hole DB in RAM for caching when reading, I am 
struggling to find a config mix that will do that. The config 
variables are:


FileSystemCacheThreshold = 0
FileSystemCacheSize = 80
TempCacheLimit = 24576M (I am not sure what this value is for, it 
seems to mean the maximum amount of temporary things to have in 
memory, like DB read cache)


The above 3 variables are the ones I am playing with, plus the 
DefaultDBCachePages = 9 in Databases.conf


Cheers,
Fabian

- Original Message -
From: Dmitry Yemanov dim...@users.sourceforge.net [firebird-support]
To: firebird-support@yahoogroups.com
Sent: Wednesday, June 01, 2016 3:49 PM
Subject: [firebird-support] Re: Issue with Database Cache Size on FB 3.0

01.06.2016 04:16, Fabian Ernesto Chocron wrote:
>
> We are having trouble setting up the database cache size on FB 3.0
> running on Windows 2008 R2 64 bits with 32 GB ram.
>
> The problem we have is we cannot get the server to allocate the ram for
> the cache as we intend. With FB 2.54 we had the DB cache set very high,
> close to 1 GB per database, all running in RAM memory. With FB 3.0 we
> read it can allocate much more RAM to the cache, but it appears the
> server is allocating very small amount of Ram when the first user
> connects to the DB, and as we connect more users to the DB the ram
> consumption increases slowly.

What memory counters do you look at? Virtual (reserved) memory usage
should grow high with the first connect, physical (committed) memory
usage should grow together with your load, while pages are being read
from disk.

> On firebird.conf
>
> FileSystemCacheThreshold = 0
> FileSystemCacheSize = 17179869184 (this is 16 GB - the server has 32 GB
> ram.)

These changes conflict with each other. You disable filesystem cache
with the first line and still want to use 16GB with the second line.

> On databases.conf
>
> MyTestDB = c:\Temp\MyDb.fdb
> {
> DefaultDbCachePages = 458752
> }

First of all, I'd suggest to reset FileSystemCacheSize back to zero and
set FileSystemCacheThreshold to something higher than 458752 pages (e.g.
50). Then re-test your memory usage and only then start tweaking the
filesystem cache.

BTW, don't you occasionally have page cache override at the database
level? What is gstat -h output?

Dmitry





++

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

[Non-text portions of this message have been removed]



No virus found in this message.
Checked by AVG - www.avg.com 
Version: 2016.0.7598 / Virus Database: 4591/12342 - Release Date: 06/01/16





[firebird-support] Temporarily disable constraints

2016-03-20 Thread Robert martin r...@chreos.com [firebird-support]
Hi

Is it possible to temporarily disable a FK constraint?  I have found a 
couple of requests for this feature dated 2009 but these still show as 
open.  Did this functionality ever get implemented ?

It would save me a lot of work :)

Thanks
Rob


Re: [firebird-support] date format

2015-10-15 Thread Robert martin r...@chreos.com [firebird-support]

OOps sorry, wrong email address :)

On 16/10/2015 11:24 a.m., 'Leyne, Sean' s...@broadviewsoftware.com 
[firebird-support] wrote:

Â



> http://www.sysprobs.com/change-date-format-windows-7-ddmm

Why does this matter to this list?


Sean






[firebird-support] date format

2015-10-15 Thread Robert martin r...@chreos.com [firebird-support]
http://www.sysprobs.com/change-date-format-windows-7-ddmm



-- 
-

Robert Martin
Development Manager


Ph 03 377-0495
fax03 377-0496
email  r...@chreos.com

Wild Software Ltd
www.chreos.com

Please forward all support queries to supp...@chreos.com
so we may respond to your query as quickly as possible.



Re: [firebird-support] SQL for TCC

2015-08-26 Thread Robert martin r...@chreos.com [firebird-support]

Sorry set the SQL to the wrong 'support' email.  Please ignore.

Thanks
Rob

On 27/08/2015 12:07 p.m., Robert martin r...@chreos.com 
[firebird-support] wrote:
 UPDATE CsItem
 SET YeRef = 7051
 WHERE ItemRef IN (688421, 688413, 688405, 688438, 688446)

 To run the above
 - On any ONE machine.
 - Go to Maintenance  Advanced  SQL Entry
 - Cut and paste the SQL into the 'SQL String to be processed' box
 - Click Process
 - The SQL has run so you can now close the screen

 --
 -

 Robert Martin
 Development Manager

 Ph 03 377-0495
 fax 03 377-0496
 email r...@chreos.com

 Wild Software Ltd
 www.chreos.com

 Please forward all support queries to supp...@chreos.com
 so we may respond to your query as quickly as possible.

 

 No virus found in this message.
 Checked by AVG - www.avg.com http://www.avg.com
 Version: 2015.0.6125 / Virus Database: 4409/10518 - Release Date: 08/26/15




[firebird-support] SQL for TCC

2015-08-26 Thread Robert martin r...@chreos.com [firebird-support]
UPDATE CsItem
SET YeRef = 7051
WHERE ItemRef IN (688421, 688413, 688405, 688438, 688446)


To run the above
- On any ONE machine.
- Go to Maintenance  Advanced  SQL Entry
- Cut and paste the SQL into the 'SQL String to be processed' box
- Click Process
- The SQL has run so you can now close the screen


-- 
-

Robert Martin
Development Manager


Ph 03 377-0495
fax03 377-0496
email  r...@chreos.com

Wild Software Ltd
www.chreos.com

Please forward all support queries to supp...@chreos.com
so we may respond to your query as quickly as possible.



Re: [firebird-support] Error While Executing Simple Inner Join SQL With Big database

2015-06-07 Thread Robert martin r...@chreos.com [firebird-support]

Hi

I don't know what the error message is, you didn't include it! but it is 
likely your join is wrong and returning one of every detail record for 
every header (i.e. 78000 * 3000 records !)

Check your query and make sure the detail records are linked to the 
master correctly (i.e. JOIN detail d ON d.ForeignkeyField = 
m.primarykeyfield)

Post your SQL if you cant see the cause :)

Cheers
Rob



On 8/06/2015 4:49 p.m., Vishal Tiwari vishuals...@yahoo.co.in 
[firebird-support] wrote:
 There is enough free disk space (2.75 GB) available.



 On Monday, 8 June 2015 10:08 AM, Vishal Tiwari vishuals...@yahoo.co.in
 [firebird-support] firebird-support@yahoogroups.com wrote:


 Hi All,
 I am running one SQL in that Master table has 78 thousand plus records
 and detail table has 4 Laks and 3 thousand plus records. I have used
 Inner Join on the primary key of Master table with the column in the
 Detail Table.
 When I execute with small size database, but with this database when I
 run SQL using Flamerobin, I get below error.
 Please help.

 With Best Regards.
 Vishal

 [Non-text portions of this message have been removed]









++

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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

* To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

* To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

* Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



Re: [firebird-support] Need Speed Optimization for SQL

2015-04-15 Thread Robert martin r...@chreos.com [firebird-support]
Wow !

Do you have an index on CRM_JOB_ITEMS.PK_JOB_ITEMS ?



On 16/04/2015 10:29 a.m., Vishal Tiwari vishuals...@yahoo.co.in 
[firebird-support] wrote:
 @Rob: Your SQL is taking 28 seconds...



 On Thursday, 16 April 2015 3:56 AM, Robert martin r...@chreos.com
 [firebird-support] firebird-support@yahoogroups.com wrote:


 Hi

 Try replacing your IN statement with an EXISTS clause. Something like

 CRM_DOCUMENT_HEADER.DOCUMENT_TYPE = 1 AND EXISTS(select PK_JOB_ITEMS
 from CRM_JOB_ITEMS where PK_JOB_ITEMS = CRM_DOCUMENT_ITEMS.FK_JOB_ITEM
 and FK_JOB = '{8BDDED49-8509-48C1-A169-B7E68A74C230}' ROWS 1)

 Cheers
 Rob



Re: [firebird-support] Need Speed Optimization for SQL

2015-04-15 Thread Robert martin r...@chreos.com [firebird-support]
Hi

Try replacing your IN statement with an EXISTS clause.  Something like

CRM_DOCUMENT_HEADER.DOCUMENT_TYPE = 1 AND EXISTS(select PK_JOB_ITEMS 
from CRM_JOB_ITEMS where PK_JOB_ITEMS = CRM_DOCUMENT_ITEMS.FK_JOB_ITEM 
and FK_JOB = '{8BDDED49-8509-48C1-A169-B7E68A74C230}' ROWS 1)

Cheers
Rob


On 16/04/2015 9:54 a.m., Vishal Tiwari vishuals...@yahoo.co.in 
[firebird-support] wrote:
 Hi All,

 I have below SQL and DDL of respective columns used in this SQL.

 Below sql takes 6-7 seconds to give the result.

 Would it be possible to bring the output time to 1 seconds, coz there
 are some other operartion I need to perform based on this sql output
 withing short period of time.

 SQL:


 SELECT
Sum(CRM_DOCUMENT_ITEMS.QUANTITY) AS Delivered,
CRM_DOCUMENT_ITEMS.FK_JOB_ITEM
 FROM
CRM_DOCUMENT_ITEMS
INNER JOIN CRM_DOCUMENT_HEADER ON
 CRM_DOCUMENT_ITEMS.FK_DOCUMENT_HEADER =
 CRM_DOCUMENT_HEADER.PK_DOCUMENT_HEADER
 WHERE
CRM_DOCUMENT_HEADER.DOCUMENT_TYPE = 1 and
 CRM_DOCUMENT_ITEMS.FK_JOB_ITEM in (select PK_JOB_ITEMS from
 CRM_JOB_ITEMS where FK_JOB = '{8BDDED49-8509-48C1-A169-B7E68A74C230}')
 GROUP BY
CRM_DOCUMENT_ITEMS.FK_JOB_ITEM

 ---
 DDL:


 There are some other columns also in below three tables:

 CRM_DOCUMENT_ITEMS Table (Total Rows in this table : 803151)
  QUANTITY : Numeric(15,2)
  FK_JOB_ITEM : Char(38) (GUID)
  FK_DOCUMENT_HEADER : Char(38) (GUID)


 CRM_DOCUMENT_HEADER Table (Total Rows in this table : 110238)
  PK_DOCUMENT_HEADER : Char(38) (GUID)
  DOCUMENT_TYPE : Integer

 CRM_JOB_ITEMS Table (Total Rows in this table : 503743)
  PK_JOB_ITEMS : Char(38) (GUID)
  FK_JOB : Char(38) (GUID)



 Thanks In Advance.


 With Best Regards.

 Vishal

 


[firebird-support] Chinese Pinyin to Unicode

2015-03-22 Thread Robert martin r...@chreos.com [firebird-support]
Hi

I have some data that appears to be Chinese entered using Pinyin. The
data is stored in a FB 2.0 DB in Charset NONE.  We want to port the data
over to a FB 2.5 DB with Charset UTF8.  Just pumping the data does not
work.  We thought we had solved it by Exporting from the DB to a UTF8
formatted file of insert statements then loading from the script on a
machine with Chinese installed.  However we have been informed that
these characters are now Japanese and make no sense.

So what I suspect I need to do is take the data in raw btye format and
convert it to the appropriate Unicode character.

Does this sound like the appropriate solution?  Any one know how to do it?

Any other suggestions would be pre appreciated.

Cheers
Rob



[firebird-support] Chinese Code page / Unicode conversion

2015-03-10 Thread Robert martin r...@chreos.com [firebird-support]
Hi

Our product used to run on FB 2.0 with the character set configured to 
'NONE'.  We released a new version using FB 2.5 and character set to 
UTF8.  One of our sites had been storing Chinese data in their database 
using the Chinese langauge pack and Windows XP.  After converting the 
database to UTF8 our new system is running fine for new data but the old 
data has not converted across correctly.

My plan is to either

a) Setup an old copy of data on FB 2.0 and export data to a unicode 
format file (update SQLs) and then use that file to update the data in 
the 'new' database running on FB 2.5
b) Use a data pump (an IBObjects component) to connect to the old 
database running on FB 2.0 and a new database running on FB 2.5

Does that sound like if should work?  Should I leave the CharSet set to 
'NONE' for the FB 2.0 DB or should I change it?  Any other / better 
suggestions ?

Thanks
Rob









++

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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

* To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

* To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

* Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



[firebird-support] TCP connection issue

2015-01-08 Thread Robert martin r...@chreos.com [firebird-support]
Hi

The firebird log file on a newly installed machine shows the following 
messages

MAIN-PCFri Jan 09 15:01:03 2015
 INET/inet_error: read errno = 10054


MAIN-PCFri Jan 09 15:01:04 2015
 Unable to complete network request to host Main-PC.
 Error reading data from the connection.


This has happened a couple of times today, once in the morning and one 
in the afternoon, with one of the client PCs reporting an ISC error this 
morning but no error shown in the afternoon.

I have checked the system (Windows 7) event log and their doesn't appear 
to be any errors.   The system is running the standard windows Firewall 
and windows defender (no other security apps).

Does anyone have any suggestions of where to look next?

Cheers
Rob






++

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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

* To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

* To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

* Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



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

2014-11-17 Thread Robert martin r...@chreos.com [firebird-support]
i

 * How does your gbak restore call look like?
 GBak -C -User %1 -Pas %2 G:\FBDump\OCCEasyPos.fbk
 LocalHost:F:\DB\Kaufmann\Uddannelse\OCCEasyPos.fdb -v -rep -o
 -FIX_FSS_METADATA ISO8859_1 -fix_fss_data ISO8859_1 -y G:\FBDump\
 ;RestoreEasyPos.txt




Have you tried it with the -G flag.  This disables garbage collection, 
which can make backups run much faster.  Obviously if you need / want to 
do the garbage collection this isn't an option but if it works much 
faster it gives you a hit as to what the issue might be :)

Cheers
Rob



[firebird-support] View overflow problem

2014-05-01 Thread Robert martin

Hi

I have some views that are UNIONS of two identical (asside from name) 
tables.  I have noticed that some of these views have stopped 
functioning.  Running a select on them returns no results (TIBOQuery) if 
I browse the data (from IB_UtilitiyBar) selecting the view displays a 
string or numeric overflow error.

Running a select on the view in FlameRobin correctly returns results. 
Running the views source query in IBOQuery works fine to.

I suspect it is something to do with the logic used to determine the 
resulting field sizes from a view not correctly handling UTF8.   It is 
data sensitive and I guess it only fails where stored data nears the 
field limit.  The views work on some of my datasets :)

I'm off home for the weekend soon so won't be able to reply for a while.

Cheers
Rob




Re: [firebird-support] View overflow problem

2014-05-01 Thread Robert martin
Oopps wrong list.  Please ignore :)

On 2/05/2014 5:05 p.m., Robert martin wrote:


 Hi

 I have some views that are UNIONS of two identical (asside from name)
 tables. I have noticed that some of these views have stopped
 functioning. Running a select on them returns no results (TIBOQuery) if
 I browse the data (from IB_UtilitiyBar) selecting the view displays a
 string or numeric overflow error.

 Running a select on the view in FlameRobin correctly returns results.
 Running the views source query in IBOQuery works fine to.

 I suspect it is something to do with the logic used to determine the
 resulting field sizes from a view not correctly handling UTF8. It is
 data sensitive and I guess it only fails where stored data nears the
 field limit. The views work on some of my datasets :)

 I'm off home for the weekend soon so won't be able to reply for a while.

 Cheers
 Rob




Re: [firebird-support] Select Distinct Column Pairs

2014-03-30 Thread Robert martin













[firebird-support] Multi bit install :)

2014-02-19 Thread Robert martin
Hi

We have an installer which install FB 2.5.2 as well as some other 
stuff.  On 64bit machines we would like to install 64Bit super classic 
but need the 32bit client installed for our 32 applications.  Does the 
64bit installer install both clients?  If not what would the be the best 
way to achieve this?

Thanks
Rob



Re: [firebird-support] Very very very slow FB 2.5.2 64bit performance on Windows 2008 R2

2014-02-16 Thread Robert martin













Re: [firebird-support] Very very very slow FB 2.5.2 64bit performance on Windows 2008 R2

2014-02-16 Thread Robert martin













Re: [firebird-support] Very very very slow FB 2.5.2 64bit performance on Windows 2008 R2

2014-01-20 Thread Robert martin













Re: [firebird-support] Accessing Firebird database from a DOS Computer

2013-10-23 Thread Robert martin













[firebird-support] Backup over network

2013-09-26 Thread Robert martin
Hi

I have a utility app that backs up an exiting fdb file, compresses it 
and then FTPs it to a web server.  Has worked great for years but now 
the client needs it (the app) run from another machine.  The App and Db 
are still on the old machine, the app is however run across the network. 
  The app appears to freeze, I am pretty sure that's because the backup 
fails.

I am using the IBOBackupServer for backing up.

Is there anyway / work around I can use to allow the client to run the 
app over the network?

Thanks
Rob





[firebird-support] UTF8 problems

2013-05-02 Thread Robert martin

Hi

I have a field defined as UTF8.  In my app I am trying to write and read 
data from the field.  I am succeeding on some levels but need to need to 
confirm that the data being written and read from the field is correct. 
  I thought I might put some data in using a tool I knew worked properly 
with unicode but am having problems.

When I try and use flame robin (0.9.2.1851 Unicode) I get the following 
message...

Error: *** IBPP::LogicException ***
Context: Statement::Prepare
Message: SQL statement can't be 0.


Have I done something wrong with my DB config?   The Unicode shows 
correctly in the display of FlameRobin prior to executing the insert SQL.

Help !

Thanks
Rob





Re: [firebird-support] Temporarily stop and disable garbage collection

2013-05-01 Thread Robert martin
On 2/05/2013 10:36 a.m., Alan McDonald wrote:

 If you set garbage collection to zero. Installed a scheduled sweep 
 when you
 know its a good time to do it and then do your back up well away from this
 sweep. Wouldn't you avoid this whole issue?
 Alan



Hi Alan

Yes it might (and I may do that).  However others have implied their is 
a difference between garbage collection and a sweep.  Disabling a sweep 
might help but not fix the problem.

Cheers
Rob


[firebird-support] Temporarily stop and disable garbage collection

2013-04-25 Thread Robert martin
Hi

We have a need to ensure garbage collection is not running in a given 
database.  Ideally we would stop / cancel any garbage collection in 
progress, do our stuff, then turn garbage collection back on.

Is this possible?

Thanks
Rob


Re: [firebird-support] Temporarily stop and disable garbage collection

2013-04-25 Thread Robert martin

  Is this possible?

 http://www.firebirdsql.org/file/documentation/reference_manuals/user_manuals/html/gfix-cmdline.html

 Sure.

 see parameter: -housekeeping set sweep interval n


Hi

I was probably not specific enough in my problem description :)

I know that I can disable garbage collection via the cmd line.  What I 
am looking for is the ability to...

1. Cancel any existing garbage collection
2. Disable garbage collection
3. Do my stuff
4. Re enable garbage collection.


I know I can to 2 and 4 via gFix but item 1 is the issue.   Also I would 
want to use the services manager rather than command line tools.

Thanks
Rob


[firebird-support] Sweep causes slow hdd

2013-02-17 Thread Robert martin
Hi

We have a system running Firebird 2.5.2 where the HDD / system 
performance periodically drops to pathetic levels.  I have just 
replicated the issue.

I backed up and restored a 4GB database.  Doing a sweep of the DB prior 
to this caused the HDD performance to drop to 1-2mb/s rather than the 
normal 100ish.  End process FB and restart FB returns performance to 
normal.  Running a sweep on the clean / restored database is quick and 
does not massively reduce performance.

So it looks like the issue is long running transactions causing a sweep 
issue.  However after restarting the web service that accesses this data 
base adn running it for a couple of minutes is enough to cause the sweep 
to be problematic again.  The sweep was done with the web service disabled.


While running the database for about half an hour shows a gap between 
oldest and next transaction of at most 300.  My most recent run showed 
the following and took more than 10 minutes (didn't wait for it to stop 
before I send this email).

 Flags   0
 Checksum12345
 Generation  2525
 Page size   8192
 ODS version 11.2
 Oldest transaction  1834
 Oldest active   1835
 Oldest snapshot 1835
 Next transaction1836
 Bumped transaction  1
 Sequence number 0
 Next attachment ID  680
 Implementation ID   26
 Shadow count0
 Page buffers1024
 Next header page0
 Database dialect3
 Creation date   Feb 18, 2013 9:41:47
 Attributes  force write

 Variable header data:
 Sweep interval: 4


Any suggestions ?

Thanks
Rob



Re: [firebird-support] Sweep causes slow hdd

2013-02-17 Thread Robert martin
Hi

You suspect correctly !  Windows 7 64bit


On 18/02/2013 11:31 a.m., Doug Chamberlin wrote:

 What OS is hosting this setup? I suspect Windows 7.

 



Re: [firebird-support] Re: Issues with String Truncation error on insert (FB 2.1 64 bits windows server)

2013-01-16 Thread Robert martin
Hi

What about Helens suggestion to increase the field size.  If you must 
have a max of 100 characters in the field, you could still increase the 
field size and then your trigger should work. Otherwise it sounds like 
you are cooked/deep fried !

Cheers
Rob

On 17/01/2013 2:21 p.m., fabianchocron wrote:

 I have trouble understanding the following:

 Are you saying that when the application posts the insert statement 
 into firebird's dll the size of the string contained in the insert 
 statment is measured by firebird's engine and that size is what is 
 being compared against the size of the field on the table? If that is 
 the case then I am cooked/fried.

 The application is written in visual basic 6 and the insert in 
 executed multiple times without any issues until the contents of the 
 text inserted is larger than the field definition in Firebird, so what 
 I am trying to do is to catch the string before saved on the DB and 
 trim it to (field size - 1).

 Do you think it could be any way to sort out the issue without 
 modifying and recompiling firebird engine?

 Regards,
 Fabian




[firebird-support] System performance issue

2012-12-13 Thread Robert martin
Hi

One of our clients has a machine where intermittently the system crawls 
to almost stop.  Launching programs (like paint) takes about 2 minutes 
to open.  The CPU usage is low (1-3 %) but HDD usage shows at between 97 
- 100%.  This situation can last 30 mins to 2 hrs before returning to 
normal.

I raise the issue here because we have traced the cause to Firebird. 
When the machine is on a go slow, stopping the Firebird service fixes 
the problem.  Sometimes starting the service again and connecting breaks 
the system again, sometimes it doesn't.  I had though the issue may have 
been garbage collection but we have moved from FB 2.0 super server to FB 
2.5.2 super classic and are still getting the problem.  I'm pretty sure 
garbage collection is supposed to be a low priority activity, right?

The system often enters 'slow more' straight after being rebooted.

The weird thing is that while the system is slow and the HDD shows at 
around 100% use in resource monitor, the actually data throughput is 
about 1 ro 5MB a sec.  This is can be much higher when the system runs 
normally.  This made me think the HDD might be faulty but all 
indications are that its not (according to a hardware technician) and of 
course the problem fixes itself when stopping Firebird.

System is
i7 quad core (8 cores in Windows)
10 GB Ram
Windows 7 64bit
16GB free hdd space

Firebird 2.5.2 64bit
DB size is 2.7 GB


Any suggestions would be greatly appreciated.  I know that there are 
monitoring functions built into FB 2.5.2, should I try those?  If so any 
suggestions as to what to do / look for, I have not used the monitoring 
tables before.



Thanks
Rob





++

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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

* To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

* To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



[firebird-support] System performance issue

2012-12-12 Thread Robert martin

Hi

One of our clients has a machine where intermittently the system crawls 
to almost stop.  Launching programs (like paint) takes about 2 minutes 
to open.  The CPU usage is low (1-3 %) but HDD usage shows at between 97 
- 100%.  This situation can last 30 mins to 2 hrs before returning to 
normal.

I raise the issue here because we have traced the cause to Firebird. 
When the machine is on a go slow, stopping the Firebird service fixes 
the problem.  Sometimes starting the service again and connecting breaks 
the system again, sometimes it doesn't.  I had though the issue may have 
been garbage collection but we have moved from FB 2.0 super server to FB 
2.5.2 super classic and are still getting the problem.  I'm pretty sure 
garbage collection is supposed to be a low priority activity, right?

The system often enters 'slow more' straight after being rebooted.

The weird thing is that while the system is slow and the HDD shows at 
around 100% use in resource monitor, the actually data throughput is 
about 1 ro 5MB a sec.  This is can be much higher when the system runs 
normally.  This made me think the HDD might be faulty but all 
indications are that its not (according to a hardware technician) and of 
course the problem fixes itself when stopping Firebird.

System is
i7 quad core (8 cores in Windows)
10 GB Ram
Windows 7 64bit
16GB free hdd space

Firebird 2.5.2 64bit
DB size is 2.7 GB


Any suggestions would be greatly appreciated.  I know that there are 
monitoring functions built into FB 2.5.2, should I try those?  If so any 
suggestions as to what to do / look for, I have not used the monitoring 
tables before.



Thanks
Rob



[firebird-support] System performance issue

2012-12-12 Thread Robert martin

Hi

One of our clients has a machine where intermittently the system crawls 
to almost stop.  Launching programs (like paint) takes about 2 minutes 
to open.  The CPU usage is low (1-3 %) but HDD usage shows at between 97 
- 100%.  This situation can last 30 mins to 2 hrs before returning to 
normal.

I raise the issue here because we have traced the cause to Firebird. 
When the machine is on a go slow, stopping the Firebird service fixes 
the problem.  Sometimes starting the service again and connecting breaks 
the system again, sometimes it doesn't.  I had though the issue may have 
been garbage collection but we have moved from FB 2.0 super server to FB 
2.5.2 super classic and are still getting the problem.  I'm pretty sure 
garbage collection is supposed to be a low priority activity, right?

The system often enters 'slow more' straight after being rebooted.

The weird thing is that while the system is slow and the HDD shows at 
around 100% use in resource monitor, the actually data throughput is 
about 1 ro 5MB a sec.  This is can be much higher when the system runs 
normally.  This made me think the HDD might be faulty but all 
indications are that its not (according to a hardware technician) and of 
course the problem fixes itself when stopping Firebird.

System is
i7 quad core (8 cores in Windows)
10 GB Ram
Windows 7 64bit
16GB free hdd space

Firebird 2.5.2 64bit
DB size is 2.7 GB


Any suggestions would be greatly appreciated.  I know that there are 
monitoring functions built into FB 2.5.2, should I try those?  If so any 
suggestions as to what to do / look for, I have not used the monitoring 
tables before.



Thanks
Rob



[firebird-support] DB upgrade questions

2012-12-02 Thread Robert martin
Hi

We are looking to migrate our users from super server 2.0 to super 
classic 2.5.2.  We have been waiting for FB 3 but can't hold off any 
later.  I have a couple of questions...


1)  Is SuperClassic the best be, we want to improve multi user performance?
2)  Can 32bit ODBC connect to 64bit installs?  Are there any other pit 
falls moving from 32bit to 64bit server (our app is 32bit)

Thanks Rob





[firebird-support] Strange problem - 'cannot update erased record'

2012-09-04 Thread Robert martin
Hi

I have a process that is intermittently throwing the following error...


ISC ERROR CODE:335544382

ISC ERROR MESSAGE:
cannot update erased record


The code is processing in a small number of records, usually between 1 
and 300.  There is no deletion code in the process and as far as I can 
tell there is no deletion code anywhere that deletes from the related 
tables.  The source data is filled from another application but the 
loading of the 3 tables is done as part of a transaction so the data 
shouldn't be picked up before it is completely loaded.

I have checked for triggers on the related tables but there are few and 
I can't see any that are likely to be an issue (No cascading deletes, 
only triggers loading timestamps, primary keys or inserting into logging 
tables).

The error is happening in the wild with our users.  I have received a 
backup created before the failed processing was initiated and can 
process it fine here.  So it is not replicable.

Does anyone have any suggestions of where else to look?

p.s. My Logging is insufficient to track it to a specific line. That 
will have to wait until our next release!

Cheers
Rob



Re: [firebird-support] Re: The worst day i can have with firebird

2012-07-09 Thread Robert martin
Hi

Just following through this thread and I agree it is a programming error 
causing a waste of resources.  But I am confused as to why this is a 
problem for Firebird.  I thought that lots of short transactions was 
actually something to be encouraged over long running transactions.  Is 
there some limit to # of transactions / time period?

Clearly I need the transaction training video mentioned by Thomas :)

Cheers
Rob



Re: [firebird-support] Garbage collection performance issues ????

2012-03-22 Thread Robert martin
Wow.  Thanks for your extensive reply.

My code if very transaction centric in this particular app.  All 
transactions are manual and as short as possible so I hadn't really 
considered that to be the issue.  I have just checked the database which 
has been running for the last couple of days and get the following...


Database header page information:
 Flags0
 Checksum12345
 Generation895815
 Page size8192
 ODS version11.2
 Oldest transaction846877
 Oldest active846878
 Oldest snapshot846878
 Next transaction846888
 Bumped transaction1
 Sequence number0
 Next attachment ID48916
 Implementation ID16
 Shadow count0
 Page buffers200
 Next header page0
 Database dialect3
 Creation dateMar 21, 2012 15:00:43
 Attributesforce write

 Variable header data:
 Sweep interval:0


This looks pretty good to me, although I am far from expert!


Note that sweep is now 0.  I have a scheduled sweeps at 1am.  My 
database seems to be running ok at this point.


I expect that at times the gap between transactions is quite large as 
the system periodically starts a write transaction that is open while 
the system pumps data from another database into this one.  This might 
run for some minutes, most other transactions are however read 
transactions and would not be acting upon this data.

I really appreciate your email but I don't think it is transactions in 
this case.

p.s. sorry about posting this as a new email, for some reason I can post 
new emails but all my replies bounce back.

Cheers
Rob









[firebird-support] Garbage collection performance issues ????

2012-03-20 Thread Robert martin
Hi

We have noticed performance issues  on a machine running a web service 
connected to a FB 2.5 database.  On a brand new machine (to rule out 
computer problems) everything worked fine for the first few hours, 
however after deleting a large number of records our performance issues 
surfaced.  Instead of a process starting for each connection, running 
for a few seconds, then completing (closing) the transactions open and 
sit idle for a long period of time before processing.

Alter doing a backup and restore the database changed from 1.9GB to 
560MB.  Restarting the web server and everything is working great again.

My suspicion is that this is related to garbage collection.  Does this 
sound likely?

We are using the FB 2.5, superclasic with default garbage collection 
settings.  What changes would people recommend?

I am considering turning off garbage collection and scheduling it to be 
manually run late at night.  This would work fine for this system but 
may not suit other users.

Machine is Win7-64 Quad core I7 with 8GB RAM running Apache.


Any suggestions greatly appreciated.

Thanks
Rob