Re: [firebird-support] High Availability Firebird

2016-12-13 Thread Alexey Kovyazin a...@ib-aid.com [firebird-support]

Hi,

Please take a look
http://www.slideshare.net/ibsurgeon/failsafe-cluster-for-firebirdsql-and-something-more

Regards,
Alexey Kovyazin
IBSurgeon


Hi Everyone,

First, I apologise if this isn't the correct group - please forgive me.

I'm trying to find some contemporary (ie from in the last 24 months /
Firebird 3.0+) info/documentation on using Firebird in a High
Availability configuration. What I'm thinking is using Firebird on a
pair of Centos7 Servers with Pacemaker and/or HAProxy.

Can anyone please point me in the right direction - thanks

Matt







Re: [firebird-support] [FB3] Inserting into a table with only an identity column

2016-12-13 Thread tvd...@ymail.com [firebird-support]
Missed that; dank je. :)

[firebird-support] [FB3] Inserting into a table with only an identity column

2016-12-13 Thread tvd...@ymail.com [firebird-support]
If I have a table like this:
 

 CREATE TABLE EXAMPLE (
 E_ID  BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY
 
 );
 

 How do I add a record to it, getting an automatically assigned ID?
 

 For example, in PostgreSQL, I'd write:
 

 INSERT INTO EXAMPLE(E_ID) VALUES (DEFAULT);
 

 I know such a table doesn't seem very useful, but still...
 

 Thanks!
 



Re: [firebird-support] Re: Data pages and data page slots

2016-12-13 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Thank you very much Vlad, that is what I was thinking but always is very
better to have the explanation of one expert.

Greetings.

Walter.

On Tue, Dec 13, 2016 at 11:25 AM, hv...@users.sourceforge.net
[firebird-support]  wrote:

>
>
> ---In firebird-support@yahoogroups.com, 
> wrote :
>
> > When I run GSTAT with the switch -data it shows me numbers after "data
> pages" and "data page slots".
> >
> > Usually these numbers are the same, but ... what happen when they are
> different?
>
>   Physical numbers of data pages stored at kind of array and data of this
> array are split over
> pointer pages. Every item of array also called "slot". Slot could be empty
> or contain data page
> number. When table grows, engine allocates new data pages and put its
> numbers into empty
> slots (allocating pointer pages when necessary). When data pages is freed,
> slots become empty
> but they are still present. Pointer pages freed only when table is
> dropped. Therefore number of
> "data page slots" could be much larger than number of "data pages".
>
> Hope it helps,
> Vlad
>
> 
>


[firebird-support] Re: Data pages and data page slots

2016-12-13 Thread hv...@users.sourceforge.net [firebird-support]
---In firebird-support@yahoogroups.com,  wrote :
 
 > When I run GSTAT with the switch -data it shows me numbers after "data 
 > pages" and "data page slots". >

 > Usually these numbers are the same, but ... what happen when they are 
 > different?

  Physical numbers of data pages stored at kind of array and data of this array 
are split over
pointer pages. Every item of array also called "slot". Slot could be empty or 
contain data page 
number. When table grows, engine allocates new data pages and put its numbers 
into empty 
slots (allocating pointer pages when necessary). When data pages is freed, 
slots become empty 
but they are still present. Pointer pages freed only when table is dropped. 
Therefore number of 
"data page slots" could be much larger than number of "data pages". 

Hope it helps,
Vlad





[firebird-support] simply CTE

2016-12-13 Thread 'Check_Mail' check_m...@satron.de [firebird-support]
Hello,

at the moment I get all material of a product with a recoursion, but in some
case, I get it manyfold and not grouped. (it gets all Material of the
material in each level)

How can I create a CTE (grouped)?

create or alter procedure P_GETMATERIALTEST (
TEILENR varchar(16),
ANZAHLT double precision,
I integer,
VTEILENR varchar(16),
VBSNR integer)
returns (
BSNR integer,
MATERIALNR varchar(16),
ANZAHLM double precision,
K integer,
TTEILENR varchar(16),
TBSNR integer)
AS
/**/BEGIN
 materialnr = teilenr;TTEILENR=vteilenr;TBSNR = VBSNR;
anzahlm = anzahlt; k=i+1; suspend;
for select bsnr, matteilenr, anzahl from tmaterial a
left join tteile b on(a.matteilenr = b.teilenr)
where a.teilenr = :teilenr order by a.bsnr
into :bsnr, :materialnr, :anzahlm do
begin anzahlm = anzahlm * anzahlt;vteilenr = teilenr;VBSNR = BSNR;
if (k < 800) then
for select materialnr, anzahlm, k,tteilenr,tbsnr from
P_GETMATERIALTEST(:materialnr, :anzahlm, :k, :vteilenr, :vbsnr)
into :materialnr, :anzahlm, :k,:TTEILENR,:TBSNR do suspend;
else
insert into terrorlog(tabelleproz, zeitstempel, wert, fehler) values
('P_GETMATERIAL3', 'now', :k, :teilenr || ' Wert Zhlervariable zu hoch!');
end

END



Re: [firebird-support] Data pages and data page slots

2016-12-13 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
13.12.2016 8:59, 'Walter R. Ojeda Valiente' wrote:
> Is there something wrong there?

   No.

> Is possible (and useful) make these numbers equals?

   Yes: fill database with useful data.

-- 
   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/