Re: [firebird-support] error code 904 (firebird SS-2.1.5)

2013-07-16 Thread Mark Rotteveel
On Mon, 15 Jul 2013 23:27:57 -0700 (PDT), Behzad Assadpour
 wrote:
> Hi
> I've recently upgraded from firebird 2.0.7 to firebird 2.1.5.In the
> previous version I usually used to  receive error cod 902 on one of my
> databases and may application could not connect to database. But after
> restoring a backup, it's problem used to solve for just one day and it
> repeated again.I decided to upgrade to  version 2.1.5 and since then , I
> have not received that error . But It starts to receive error cod 904.
It
> surprisingly connects to database and can read its data but after a
while
> it receives error. The 

Errors with sqlcode -902 and -904 are not really specific. It is better to
refer to the actual errorcode and error message.
 
> details  of  the error is like this:
> 
> Error Code : 904
> implementation limit exceeded (imp-exc-335544381)
> Transaction count exceeded.perform backup and restore to make database
> operable again.(335544864)
> 
> Then when I restore the backup file, it works for a while and it repeats
> again.In addition, my database size is about 550 Mb and it seems small.I
> want to know how to over com the problem.
> I look forwarding hearing from you.

On the face of it, it looks like something is starting a lot of
transactions on your database. The limit of transactions in Firebird is
2^31. If this is about to be reached, you need to backup and restore, and
you are notified with this error message.

If you were using Firebird 2.5, I'd suggest to use the trace API to see if
this is actually occurring. For a quick check, I'd suggest to make
snapshots of the output of gstat -h to see if the transaction count
incresases quickly.

Mark


[firebird-support] Re: singleton table with many fields

2013-07-16 Thread mbabuskov
thp_pkmi wrote:
> I have a table that always contains 1 record and have 
> about 50 fields with various type. It's function is to 
> store system parameters and is accessed very frequent 
> from application and also from database triggers and 
> stored procedures. Is it wise to utilize a singleton 
> table like this, or is it better to implement a table 
> with many records storing parameter name, type, and 
> values ?

Both approaches have benefits and drawbacks:

1. single record

Since possible "parameters" are table column they are predefined and you can 
implement constraints easily (for example some parameter might be between 0 and 
100, it's easy to write CHECK PAR1 BETWEEN 0 AND 100). With multiple rows, you 
would have to implement triggers on UPDATE and INSERT and check if field name 
is PAR1 and then the value. Problem with single record is that any change has 
to be DDL, so users might have to logout and connect back to see the new 
setting. So it's harder if you roll out database changes dynamically while 
everyone is connected and working. 

I would choose this if there are multiple developers working on a project 
and/or parameters are not added frequently. 

2. multiple records

It's easy to add new parameters and remove old ones, just with simple 
INSERT/DELETE. OTOH you could have problems if a record is missing, so you need 
to make sure each SELECT from the table should be ready to get no rows 
returned. Ex. if you have a parameter which can be 1 or 0, it is not enough to 
check if first row returns 1:

select value from partable where parname = 'PAR2';

but you also need to check if there was a row at all.

OTOH if you wrap this into some nice code or a stored procedure, you could have 
less records in that table, and only store values that override defaults. So if 
you have many databases with different clients, clients with default setup 
would have an empty table, and those who are different would have only records 
for settings that are different than default.

I would not use this approach myself, as in projects I work on we often 
dump/copy databases around and if you forget to copy parameters table the 
application could behave differently and confuse users or cause damage. So we 
switched to approach 1. with a single row.

In short: don't worry about speed, you could access this table thousands of 
times per second and still not notice. Worry about your ability to maintain it.

HTH

-- 
Milan Babuskov

==
The easiest way to import XML, CSV 
and textual files into Firebird:
http://www.guacosoft.com/xmlwizard
==



[firebird-support] query refuses to die

2013-07-16 Thread Nick Upson
Hi,

(running 2.1.5 on centos) I tried to kill a exceptionally long-running
query (several hours) by deleting the row from MON$STATEMENT, no errors
but it didn't delete. I was connected via isql as sysdba, the query wasn't
using sysdba

select * from

MON$STATEMENTS where MON$STATEMENT_ID = 30;

showed the query, then I did

SQL> delete from

MON$STATEMENTS where MON$STATEMENT_ID = 30;
SQL> commit;

select * from

MON$STATEMENTS where MON$STATEMENT_ID = 30;

and it was still there, disconnected and connected again, still there.

Should I have done something different, how can I ensure this works in
future?


-- 
Nick Upson, Telensa Ltd


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



[firebird-support] Re: Help, tunning database

2013-07-16 Thread Aage Johansen
Anto wrote:
<<
I have Superserver Firebird 2.5.1 installed on Win7 pro 64 bit on I7 2600K.
When data grows, Firebird Server starting to slow down. I shutdown 
Firebird Server, starting again without changing anything and 
Firebird Server became smooth again.
Any ideas, what is the problem with this? Firebird.conf mostly on its 
default values except for cpuaffinity set to 15 and 
DefaultDbCachePages set to 4096.
 >>

And later:
 >>
I did a small test, here are the settings :
- FB Super Classic 2.5.1 64 bit
- Win7 pro 64 bit
 >>

Not related to your main problem, but if you are using SuperServer 
then "cpuaffinity set to 15" may not be an optimal setting.


-- 
Aage J.



[firebird-support] drop connection

2013-07-16 Thread Fabian Mario
I need help, I have a connection with Dataset and Linux/Firebird Server 
(Windows Client, Server 11 SP2 Suse Linux and Firebird 2.5) this connection 
work pefectly  but at some point disconnected from the server and then fails 
loss of connectivity to the server. 
I'm check the power Management is Balance Low Latency Computing.
Anyone know how I can do so that the server does not disable network cards or 
firebird demon disconnect?
Or how I can solve this problem?
Thank you.
Fabian Kruszelnicki