Re: [firebird-support] secondary server attachments cannot validate databases during gfix

2016-03-09 Thread Alexey Kovyazin a...@ib-aid.com [firebird-support]

Hi Adam,

gfix does not validate databases online till 2.5.4.
Update 250 to 255 and try again, or perform recovery operations in 
exclusive mode.


Use these sequence to repair
https://ib-aid.com/en/articles/how-to-repair-a-corrupt-firebird-database/


Regards,
Alexey Kovyazin
IBSurgeon www.ib-aid.com


Hello Group,

I have a server running Firebird 2.5.0 in Classic mode on Windows.

There is a database that appears corrupted (internal Firebird 
consistency check ...).


I have got all users out and renamed the file and attempted:
gfix -v localhost:C:\data\corrupt.fdb -user sysdba -password masterke


It is failing with the following message:


bad parameters on attach or create database
-secondary server attachments cannot validate databases


Using Process Explorer, I can see that there are no other processes 
with a handle to this file. (It is also renamed, and the clients are 
pointing at the alias which doesn't presently exist)



I suspect that whatever the corruption is, it is confusing gfix into 
believing that there are other active connections. Is there a way 
around this?



Thanks

Adam






[firebird-support] secondary server attachments cannot validate databases during gfix

2016-03-09 Thread s3057...@yahoo.com [firebird-support]
Hello Group,

I have a server running Firebird 2.5.0 in Classic mode on Windows.

There is a database that appears corrupted (internal Firebird consistency check 
...).

I have got all users out and renamed the file and attempted:
gfix -v localhost:C:\data\corrupt.fdb -user sysdba -password masterke
 

 It is failing with the following message:
 

 bad parameters on attach or create database
-secondary server attachments cannot validate databases

 

 Using Process Explorer, I can see that there are no other processes with a 
handle to this file. (It is also renamed, and the clients are pointing at the 
alias which doesn't presently exist)
 

 I suspect that whatever the corruption is, it is confusing gfix into believing 
that there are other active connections. Is there a way around this?
 

 Thanks
 Adam



Re: [firebird-support] Re: UDF install in FB3.0 RC2

2016-03-09 Thread russ...@belding.co.nz [firebird-support]
Ah, I did not know that Karol. I'll try this after the UDF problem has been 
solved. Russell


Re: [firebird-support] FB3 RC2 error with Flamerobin

2016-03-09 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 9-3-2016 17:05, 'esdonisgarcia' esdonisgar...@sisconge.hol.es 
[firebird-support] wrote:
>> On 6-3-2016 17:55, 'esdonisgarcia' esdonisgar...@sisconge.hol.es
>> [firebird-support] wrote:
>>> You can use a Flamerobin with FB3 RC2?
>>
>> Yes you can, but you need to make sure that you either use the
>> libfbclient.so of Firebird 3, or that you set the encryption setting to
>> Enabled (or Disabled) instead of the default of Required.
>
> Property that must change?

See the Firebird 3 release notes section "Legacy Authentication" on page 
125, or better yet: just use the Firebird 3 fbclient.dll.

Mark
-- 
Mark Rotteveel


Re: AW: AW: [firebird-support] coalesce bug in fb 3.0 rc2?

2016-03-09 Thread 'Arno Brinkman' fbsupp...@abvisie.nl [firebird-support]
Hello,


> your are right. But in FB 3, it will be handled different.
> I need the left join tlager_sum, because I’d like to have all records too 
> there no records in tlager_sum.
> But in this case I get now in fb 3 the tteile.teilenr clean without the 
> amaount of tlager_sum (the a.minb is greater than the coalesce(b.menge,0) 
> and in this case, I get no referenced Record from tlager_sum), the one 
> from tteile now in every case (left join).
> Finally, I would get all records with a.minb > b.menge and all records, 
> where a.minb is present an there is no record from the teilenr in 
> tlager_sum.


Please, give some DDL with example data.
I've tried to reproduce your issue on FB3.0 RC2, but i could not reproduce 
it.


Kind Regards,
Arno Brinkman



Re: [firebird-support] AW: different behavior firebird 3.0 RC2

2016-03-09 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
09.03.2016 12:18, 'Checkmail' check_m...@satron.de [firebird-support] wrote:
> the trigger is required because the user can delete the one record, in this 
> case the
> trigger deletes the referenced too. But if I delete the entire Order, the 
> record will be
> delete twice. How can I solve this in fb 3?

   Put a ticket with testcase into tracker.

-- 
   WBR, SD.






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> 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] AW: different behavior firebird 3.0 RC2

2016-03-09 Thread 'Checkmail' check_m...@satron.de [firebird-support]
One hint,

 

the trigger is required because the user can delete the one record, in this
case the trigger deletes the referenced too. But if I delete the entire
Order, the record will be delete twice. How can I solve this in fb 3?

 

Von: Checkmail [mailto:check_m...@satron.de] 
Gesendet: Mittwoch, 9. März 2016 11:53
An: 'firebird-support@yahoogroups.com' (firebird-support@yahoogroups.com)

Betreff: different behavior firebird 3.0 RC2

 

Hello again,

 

now I have in FB3 a problem. A stored Procedure should delete some records.

 

ID some fields  ID_AUTOINSERT

123xxx null

234   xxx null

255   xxx 266

266   xxx null

 

Now there is a trigger after delete in this table who deletes:

 if(old.ap = 69) then

  begin

delete from tplan_kw_pos where id_autoinsert = old.id;

  end

 

In this case, FB will delete the record with ID 266 during deleting ID 255
and the other statement intends to delete the record 266 too.

 

Now in FB 3 RC 2 I get this error message:

 

can't format message 13:492 -- message file C:\WINDOWS\SYSTEM32\firebird.msg
not found.

no current record for fetch operation.

 

In FB 2.55, FB2.1 this was not a problem.

 

How can I fix?

 

Thanks

 



[firebird-support] different behavior firebird 3.0 RC2

2016-03-09 Thread 'Checkmail' check_m...@satron.de [firebird-support]
Hello again,

 

now I have in FB3 a problem. A stored Procedure should delete some records.

 

ID some fields  ID_AUTOINSERT

123xxx null

234   xxx null

255   xxx 266

266   xxx null

 

Now there is a trigger after delete in this table who deletes:

 if(old.ap = 69) then

  begin

delete from tplan_kw_pos where id_autoinsert = old.id;

  end

 

In this case, FB will delete the record with ID 266 during deleting ID 255
and the other statement intends to delete the record 266 too.

 

Now in FB 3 RC 2 I get this error message:

 

can't format message 13:492 -- message file C:\WINDOWS\SYSTEM32\firebird.msg
not found.

no current record for fetch operation.

 

In FB 2.55, FB2.1 this was not a problem.

 

How can I fix?

 

Thanks

 



AW: AW: [firebird-support] coalesce bug in fb 3.0 rc2?

2016-03-09 Thread 'Checkmail' check_m...@satron.de [firebird-support]
Hello,

 

your are right. But in FB 3, it will be handled different.

 

I need the left join tlager_sum, because I’d like to have all records too there 
no records in tlager_sum. But in this case I get now in fb 3 the tteile.teilenr 
clean without the amaount of tlager_sum (the a.minb is greater than the 
coalesce(b.menge,0) and in this case, I get no referenced Record from 
tlager_sum), the one from tteile now in every case (left join).

 

Finally, I would get all records with a.minb > b.menge and all records, where 
a.minb is present an there is no record from the teilenr in tlager_sum.

 

Thanks

 

Von: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] 
Gesendet: Mittwoch, 9. März 2016 09:04
An: firebird-support@yahoogroups.com
Betreff: Re: AW: [firebird-support] coalesce bug in fb 3.0 rc2?

 

  

Hello,

> sorry, outlook corrects me in German. At the moment, I have no sulution 
> for the problem. Anything ideas?

Query:

SELECT
a.teilenr, a.bezeichnung, a.minb, coalesce(b.menge,0) as m, a.typ
FROM
tteile a
left join tlager_sum b on (a.teilenr = b.teilenr)
WHERE
((a.minb > coalesce(b.menge,0)) and (a.typ = 1))
ORDER BY
a.teilenr

Result:

TEILENR BEZEICHNUNG MINB M TYP
PrSt110x44x3 Profilrohr E235,S2 110x44x3,0 mm gebeizt 5600mm 280 
420 1

I would say your TLAGER_SUM contains a record with:

TEILENR MENGE
PrSt110x44x3 420

So results are correct?

If not give sample records for tteile and tlager_sum with DDL

Kind Regards,
Arno Brinkman
ABVisie





Re: [firebird-support] Re: UDF install in FB3.0 RC2

2016-03-09 Thread liviuslivius liviusliv...@poczta.onet.pl [firebird-support]
 
 
>>However on this server I first installed FB3 RC2 (64) and saw my database 
>>managers were 32 bit so I uninstalled FB3 (64)
 
Russell
___
Hi,
 
you can use Firebird 64 bit with 32 bit applications - only fbclient.dll must 
be 32 bit then
 
regards,
Karol Bieniaszewski

Re: [firebird-support] How write a query with a progressive sum field

2016-03-09 Thread Luigi Siciliano luigi...@tiscalinet.it [firebird-support]
Hallo,

Il 08/03/2016 20.36, setysvar setys...@gmail.com [firebird-support] ha 
scritto:
> This will not work properly if more than one row of DC are joined to 
> the same DT (but then your ORDER BY isn't 100% deterministic). If you 
> change the ordering of your query, you also have to change the 
> subselect (e.g. if you add DESC you have to change from > to <). If 
> this doesn't fit, is too slow or too difficult to understand, I'd 
> recommend EXECUTE BLOCK (as Sean already wrote). HTH,

Thank You, the query suggested works but because of the primary index of 
DOC_TESTA the value calculated of SALDO is not compliant with the result 
of the rows of the query.

I solved by creating a stored procedure like this:

AS
BEGIN
   SALDO = 0;

   FOR SELECT
 DT.DATA,
 DT.DOCUMENTO_ID,
 DT.NUMERO,
 DT.SERIE,
 DC.CARICO,
 DC.SCARICO,
 DC.CARICO - DC.SCARICO + :SALDO,
   from
 DOC_TESTA DT
 JOIN DOC_CORPO DC on DT.ID = DC.DOC_TESTA_ID
   WHERE
 DC.ARTICOLO_ID = :ID
   ORDER BY
 DT.DATA,
 DT.DOCUMENTO_ID,
 DT.NUMERO,
 DT.SERIE
   INTO
 :DATADOCUMENTO,
 :DOCUMENTO_ID,
 :NUMERO,
 :SERIE,
 :CARICO,
 :SCARICO,
 :SALDO,

   DO SUSPEND;
END^

Thanks to all :)
-- 

Luigi Siciliano
--







++

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] Re: UDF install in FB3.0 RC2

2016-03-09 Thread russ...@belding.co.nz [firebird-support]
Thank you Dimitry for the hint. Using DatabaseWorkbench I instruct the server 
in which FB3 is installed to use fbclient.dll that comes with FB3. So I am 
using the this fbClient.dll with all databases I am testing with FB3. 

 The freeUDFLib.dll file is working fine with FB2.5.x on another server. I am 
using FB3(32) on a distinct server, having no other FB engine on the server 
with FB3(32) on it.
 

 However on this server I first installed FB3 RC2 (64) and saw my database 
managers were 32 bit so I uninstalled FB3 (64). After seeing the errors I am 
having I wondered if some residue was left from FB3(64)? I deleted the 
"Firebird" folder for "program files" where FB3(64) was installed. I looked in 
the registry for "firebird" and saw nothings suspicious, but I am not competent 
to assess this residue question.
 

 Russell
 



Re: AW: [firebird-support] coalesce bug in fb 3.0 rc2?

2016-03-09 Thread 'Arno Brinkman' fbsupp...@abvisie.nl [firebird-support]
Hello,


> sorry, outlook corrects me in German. At the moment, I have no sulution 
> for the problem. Anything ideas?

Query:

SELECT
  a.teilenr, a.bezeichnung, a.minb, coalesce(b.menge,0) as m, a.typ
FROM
  tteile a
  left join tlager_sum b on (a.teilenr = b.teilenr)
WHERE
  ((a.minb > coalesce(b.menge,0)) and (a.typ = 1))
ORDER BY
  a.teilenr


Result:

TEILENRBEZEICHNUNGMINB  M   TYP
PrSt110x44x3   Profilrohr E235,S2 110x44x3,0 mm gebeizt  5600mm280 
420   1


I would say your TLAGER_SUM contains a record with:

TEILENRMENGE
PrSt110x44x3420



So results are correct?

If not give sample records for tteile and tlager_sum with DDL


Kind Regards,
Arno Brinkman
ABVisie



Re: [firebird-support] Re: UDF install in FB3.0 RC2

2016-03-09 Thread liviuslivius liviusliv...@poczta.onet.pl [firebird-support]
Thanks for suggestions Karol.
I am using Win 10 (64) and FB3 (32). 
All DLLs are 32 bit, assessed by looking in the DLL files.
Russell

,___
I know that this is not so helpfull - byt you do not need to use external 
functions to extract year or others
it exists in firebird itself EXTRACT(YEAR FROM DATE_FIELD)
Look into README.builtin_functions.txt
 
To fix problems - look at Dmitry answer
 
 
regards,
Karol Bieniaszewski