[firebird-support] Unsuccessful metadata update,request depth exceeded

2012-09-13 Thread Josef Kokeš
Hi!

This is a first for me. When creating a new table on one Firebird 2.5 
installation, I am getting the following error:

ISC ERROR CODE:335544351

ISC ERROR MESSAGE:
unsuccessful metadata update
request depth exceeded. (Recursive definition?)

Statement: CREATE TABLE v9karty_log (
  v9_klic TID NOT NULL,
  v9_vytvoril TID,
  v9_vytvoril_kdy TDATETIME,
  v9_zmenil TID,
  v9_zmenil_kdy TDATETIME,
  v9_stav TSTAV,
  v9_zrusil TBOOLEAN,
  v9_typ TCHAR,
  v9_datum TDATETIME,
  v9_id_karty TID,
  v9_id_expedice TID,
  v9_osoba TID,
  v9_stanice TID,
  v9_pobocka TTEXT5,
  v9_zmena_bodu TCENA,
  v9_zmena_slevy TCENA,
  v9_poskytnuta_sleva TCENA,
  v9_body_bef TCENA,
  v9_sleva_bef TCENA,
  v9_body_aft TCENA,
  v9_sleva_aft TCENA,
  CONSTRAINT pk_v9kartylog PRIMARY KEY (v9_klic)
)

Search through Google revealed that this error might happen if

a) Too many metadata updates occured without a backup/restore cycle. 
This is unlikely in this case, but I will perform a backup/restore just 
to be certain.

b) There really is a recursive element in my query. But if this is the 
case, I just don't see it - there is certainly nothing in the CREATE 
TABLE itself, and as the database doesn't use foreign keys at all, I 
would also rule out recursive cascades.

c) CORE-3763. But I don't use computed_by indexes.

What else could possibly be the problem?

Thanks,

Josef




++

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/



Re: [firebird-support] Re: Get Installed Folder

2012-09-13 Thread Josef Kokeš
On 13.9.2012 12:59, Allan_Fernandes wrote:
>
> Can we also understand if Firebird is installed via this method.
> I too always install Firebird as Service.
> Could you also give me sample of Service Checking please.

function SvcList(List: TStringList): boolean;
var
   ServiceManager: SC_Handle;
   P, Status: PEnumServiceStatus;
   BufSize, BytesNeeded, ServicesReturned: DWORD;
   ResumeHandle: {$IFDEF DELPHIXE2_UP} DWORD {$ELSE} THandle {$ENDIF} ;
   OK: boolean;
begin
   Result := False;
   ServiceManager := OpenSCManager(nil, nil, SC_MANAGER_CONNECT or 
SC_MANAGER_ENUMERATE_SERVICE);
   if ServiceManager <> 0 then
 try
   ResumeHandle := 0;
   BufSize := 65536;
   GetMem(Status, BufSize);
   repeat
 OK := EnumServicesStatus(ServiceManager, SERVICE_WIN32, 
SERVICE_ACTIVE or SERVICE_INACTIVE, Status^, BufSize, BytesNeeded, 
ServicesReturned, ResumeHandle);
 if not OK then
   if GetLastError = ERROR_MORE_DATA then
 begin
 BufSize := BytesNeeded;
 ReallocMem(Status, BufSize);
 OK := EnumServicesStatus(ServiceManager, SERVICE_WIN32, 
SERVICE_ACTIVE or SERVICE_INACTIVE, Status^, BufSize, BytesNeeded, 
ServicesReturned, ResumeHandle);
 end;
 if OK then
   begin
   P := Status;
   while ServicesReturned > 0 do
 begin
 List.Add(string(P^.lpServiceName));
 Inc(P);
 Dec(ServicesReturned);
 end;
   end;
   until (not OK) or (ResumeHandle = 0);
   Result := True;
 finally
   CloseServiceHandle(ServiceManager);
   end;
end;

You can read more info from P^.

Josef





++

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/



Re: [firebird-support] Problems with default values...

2012-09-13 Thread Helen Borrie
At 01:17 AM 14/09/2012, Ann Harrison wrote:

> you're using an ancient version of
>Firebird which doesn't support the function EXTRACT at all.  

Actually, Ann, we got EXTRACT() with IB 6.0, albeit with support for fewer 
time-parts than it has today.  

Cheers,
Helen



Re: Re-6: [firebird-support] Restore fails due to "duplicate Value in unique Index"

2012-09-13 Thread Alexey Kovyazin
Hello Maik,

 >database, stopped the default instance and made a copy to a different 
volume, so i have a database i can Analyse. Currently, i made another 
copy, that i use >to Analyse it with IBFirstAid 2.6.

This is a database corruption, but our IBFirstAID will not help in this 
case, since it's a system index problem.
You can contact support at ib-aid.com to get professional recovery 
support through remote desktop.

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


>
>
> database, stopped the default instance and made a copy to a different 
> volume, so i have a database i can Analyse. Currently, i made another 
> copy, that i use to Analyse it with IBFirstAid 2.6.
>
> I think this is a very weird issue
>
> Mit freundlichen Grüßen aus der Lutherstadt
> Maik Sommer
> IT-Systemadministrator
>
> processed by David.fx
> Subject: Re: Re-4: [firebird-support] Restore fails due to "duplicate 
> Value in unique Index" (13-Sep-2012 14:29)
> From: Thomas Steinmaurer  >
> To: firebird-support@yahoogroups.com 
> 
>
> > The Result is:
> >
> > RDB$RELATION_NAMERDB$FIELD_NAME
> > RDB$COLLATIONSRDB$COLLATION_NAME
>
> Thought so and that's weird. And you have executed both queries in the
> database the faulty backup is based on?
>
> Regards,
> Thomas
>
> > Regards
> > Maik Sommer
> > IT-Systemadministrator
> >
> >
> >
> > processed by David.fx
> > Subject: Re: Re-2: [firebird-support] Restore fails due to 
> "duplicate Value in unique Index" (13-Sep-2012 14:13)
> > From: Thomas Steinmaurer  >
> > To: firebird-support@yahoogroups.com 
> 
> >
> >
> >
> >> Thanks for your quick response.
> >> The query
> >> "select
> >> rdb$collation_name
> >> from
> >> rdb$collations
> >> group by
> >> rdb$collation_name
> >> having
> >> count(*) > 1"
> >>
> >> results in:
> >>
> >> RDB$COLLATION_NAME
> >> 
> >
> > And what's the result of:
> >
> > select
> > i.rdb$relation_name
> > , s.rdb$field_name
> > from
> > rdb$indices i join rdb$index_segments s on (i.rdb$index_name =
> > s.rdb$index_name)
> > where
> > i.rdb$index_name = 'RDB$INDEX_20'
> >
> > Regards,
> > Thomas
> >
> >> Greetings from Lutherstadt Wittenberg :-)
> >> Maik Sommer
> >> IT-Systemadministrator
> >>
> >>
> >>
> >> processed by David.fx
> >> Subject: Re: [firebird-support] Restore fails due to "duplicate 
> Value in unique Index" (13-Sep-2012 14:03)
> >> From: Thomas Steinmaurer  >
> >> To: firebird-support@yahoogroups.com 
> 
> >>
> >>
> >>
> >>> i have a problem with my 27Gb FB2.5 Database. Doing a backup is 
> workíng fine. Doing a restore is failing due to the following error:
> >>>
> >>> gbak: ERROR:attempt to store duplicate value (visible to active 
> transactions) in
> >>> unique index "RDB$INDEX_20"
> >>> gbak:Exiting before completion due to errors
> >>>
> >>> Here`s the clue: The database is working fine. There are no 
> duplicated roles, no duplicated datasets, index-reorg is working fine, 
> gfix could`t find ANY errors.
> >>>
> >>> I tried to find out, which relation "RDB$INDEX_20" has. It refers 
> to a table named "Abrechnung", Column named "RUECKBUCHUNG". But there 
> are no duplicated values. In fact, Column "RUECKBUCHUNG" is always 
> empty (IS NULL).
> >>>
> >>> Any Ideas?
> >>
> >> IMHO, RDB$INDEX_20 is an index on the RDB$COLLATIONS system table. This
> >> can be proved by:
> >>
> >> select
> >> i.rdb$relation_name
> >> , s.rdb$field_name
> >> from
> >> rdb$indices i join rdb$index_segments s on (i.rdb$index_name =
> >> s.rdb$index_name)
> >> where
> >> i.rdb$index_name = 'RDB$INDEX_20'
> >>
> >> So, basically this means, there are duplicate values in
> >> RDB$COLLATIONS.RDB$COLLATION_NAME. What do you get by executing the
> >> following query?
> >>
> >> select
> >> rdb$collation_name
> >> from
> >> rdb$collations
> >> group by
> >> rdb$collation_name
> >> having
> >> count(*) > 1
> >>
> >> Greetings from Austria (lost 1:2 unlucky). ;-)
> >>
> >> Regards,
> >> Thomas
> >>
> >>
> >>
> >>
> >> [Non-text portions of this message have been removed]
> >>
> >>
> >>
> >> 
> >>
> >> ++
> >>
> >> 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
> >>
> >>
> >>
> >
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
> > 
> >
> > ++
> >
> > Visit http://www.firebirdsql.org and click the Resources item
> > on the main (top) menu. Try Knowledgebase and FAQ links 

[firebird-support] Re: Problems with default values...

2012-09-13 Thread fidel_filio
Hello Ann and Hellen,

Thank you so much for your time and help. Our first approach indeed it was the 
before insert/before update trigger to give this column a default value but in 
some cases the trigger does not do its duty (it seems to have a mind of its 
own) and we don´t know why null values ended up being saved in this field even 
with the trigger on. That´s why we resorted to make this column not nullable.

We agree that we are using a very old FB version but right now an upgrade is 
not an option due to the many legacy systems we have to keep running and 
support.

Thanks for putting us back in the right track.

Best regards,

-Fidel







--- In firebird-support@yahoogroups.com, Ann Harrison  wrote:
>
> On Wed, Sep 12, 2012 at 8:56 PM, fidel_filio  wrote:
> 
> > ...
> > add hor_uactu varchar(2) default extract(hour from cast('now' as date))
> > not null
> >
> > I get this error:
> 
> Invalid token.
> > SQL error code = -104.
> > Token unknown - line 3, char 34.
> > extract.
> >
> > Note:
> > I am using Firebird 1.5.6
> 
> 
> In addition to Helen's comments about using a varchar to hold a number and
> using a function in a default value, you're using an ancient version of
> Firebird which doesn't support the function EXTRACT at all.  You might be
> able to get time by declaring the field to be of type time and assigning
> 'now' to it.
> 
> Do yourself a favor and use a version of Firebird that's less than 10 years
> old.
> 
> Good luck,
> 
> Ann
> 
> >
> 
> 
> [Non-text portions of this message have been removed]
>




Re-10: [firebird-support] Restore fails due to "duplicate Value in unique Index"

2012-09-13 Thread Maik Sommer - Finas GmbH
We`ve got a CRM-System here, therefore is the database. Within this software, 
you`re abled to do a check of the database structure, optional with 
reorganisation of the indexes. 

Mit freundlichen Grüßen aus der Lutherstadt
Maik Sommer  
IT-Systemadministrator



processed by David.fx 
Subject: Re: Re-8: [firebird-support] Restore fails due to "duplicate Value in 
unique Index" (13-Sep-2012 15:55)
From:Thomas Steinmaurer 
To:  firebird-support@yahoogroups.com


  
> the Result is 
>
> Question: An index-reorg should fix this, right? Because i`ve done so tuesday 
> night...

How did you do that?

Regards,
Thomas




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



Re: [firebird-support] RE: Stored Proc optimisation advice

2012-09-13 Thread Ann Harrison
On Thu, Sep 13, 2012 at 9:50 AM, Maya Opperman wrote:

>
> >Get the statistics on the various runs of the sub-procedure- reads,
> writes, fetches, and marks.
> No writes. 47 000 indexed reads.
>

Lets try that one again.  I'd like both reads and fetches, with statistics
for a run of the subquery that's fast and one that's slow.   Did you mean
that computing one account balance involved forty-seven thousand indexed
reads?   That's some account!

>
> > There may be other statistics available now describing your cache hit
> rate.  You should also check the depth of indexes (gstat).
> I'm not 100% sure you mean here...
>

Gstat will tell you how deep your indexes are.  Firebird indexes are very
broad based triangles, with a single page at the top, lots of pages on the
next level down, and enormous numbers of pages on the level below that.
 The taller (or deeper) the triangle, the slower it is.  The height and
width are determined by page size and key size.  An index with four or more
levels is an indication that you should increase the page size for your
database.  Run gstat and search for the indexes used by this sub-procedure.

I'm sure you mentioned it somewhere, but what is the database page size?
 And the cache size?

>
> > Which type of garbage collection are you using separate thread,
> > cooperative, or blended?
> Using 2.5 classic, so after googling, I take it, it must be cooperative
> (By the way, I haven't changed any oconfig settings when installing either)
>

Just looking for something that might push a lot of pages out of cache.
 Probably not garbage collection.

>
> >How many tables and indexes are you touching in
> >computing an account balance?
> Just one.
> Er, no actually two.
> Having another look now at the main procedure, it's actually calculating 3
> balances using table A, and then one using table B.
> Excet the order is:
> TableA's balance
> TableB's balance
> Table A's other balance
> Table A's third balance with different criteria.
>
> I changed the order to work with the three balances from table A first,
> then table B, and voila - the whole thing went from well over a minute down
> to 12 seconds ;-) I am guessing what's happening, is there is now a lot
> less swapping out of data between buffer and disk.
>

That's good.

>
> I'm not sure if that is a sign something is wrong with my setup, or
> whether I just need to be careful of that kind of thing when writing stored
> procedures?


Preserving locality of reference is always a good thing.  I would also try
a large cache size and possibly a large page size, but would first look for
differences in the number of reads on fast and slow runs of the
sub-procedure and index depth.

Good luck,

Ann

>


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



Re: Re-8: [firebird-support] Restore fails due to "duplicate Value in unique Index"

2012-09-13 Thread Thomas Steinmaurer
> the Result is 
>
> Question: An index-reorg should fix this, right? Because i`ve done so tuesday 
> night...

How did you do that?


Regards,
Thomas


Re-8: [firebird-support] Restore fails due to "duplicate Value in unique Index"

2012-09-13 Thread Maik Sommer - Finas GmbH
Hi,

the Result is 

Question: An index-reorg should fix this, right? Because i`ve done so tuesday 
night...

Mit freundlichen Grüßen aus der Lutherstadt
Maik Sommer
IT-Systemadministrator



processed by David.fx 
Subject: Re: Re-6: [firebird-support] Restore fails due to "duplicate Value in 
unique Index" (13-Sep-2012 15:20)
From:Thomas Steinmaurer 
To:  firebird-support@yahoogroups.com


  
> the querys are executed in a copy of that db. On tuesday, i recognized the 
> issue (that came without any reason). After a gbak, i stopped programs that 
> were using the database, stopped the default instance and made a copy to a 
> different volume, so i have a database i can Analyse. Currently, i made 
> another copy, that i use to Analyse it with IBFirstAid 2.6.
>
> I think this is a very weird issue

I wonder if index RDB$INDEX_20 is corrupt. What's the result of:

select
rdb$collation_name || ''
from
rdb$collations
group by
rdb$collation_name || ''
having
count(*) > 1

Regards,
Thomas

> Mit freundlichen Grüßen aus der Lutherstadt
> Maik Sommer
> IT-Systemadministrator
>
>
>
> processed by David.fx
> Subject: Re: Re-4: [firebird-support] Restore fails due to "duplicate Value 
> in unique Index" (13-Sep-2012 14:29)
> From: Thomas Steinmaurer 
> To: firebird-support@yahoogroups.com
>
>
>
>> The Result is:
>>
>> RDB$RELATION_NAMERDB$FIELD_NAME
>> RDB$COLLATIONSRDB$COLLATION_NAME
>
> Thought so and that's weird. And you have executed both queries in the
> database the faulty backup is based on?
>
> Regards,
> Thomas
>
>> Regards
>> Maik Sommer
>> IT-Systemadministrator
>>
>>
>>
>> processed by David.fx
>> Subject: Re: Re-2: [firebird-support] Restore fails due to "duplicate Value 
>> in unique Index" (13-Sep-2012 14:13)
>> From: Thomas Steinmaurer 
>> To: firebird-support@yahoogroups.com
>>
>>
>>
>>> Thanks for your quick response.
>>> The query
>>> "select
>>> rdb$collation_name
>>> from
>>> rdb$collations
>>> group by
>>> rdb$collation_name
>>> having
>>> count(*) > 1"
>>>
>>> results in:
>>>
>>> RDB$COLLATION_NAME
>>> 
>>
>> And what's the result of:
>>
>> select
>> i.rdb$relation_name
>> , s.rdb$field_name
>> from
>> rdb$indices i join rdb$index_segments s on (i.rdb$index_name =
>> s.rdb$index_name)
>> where
>> i.rdb$index_name = 'RDB$INDEX_20'
>>
>> Regards,
>> Thomas
>>
>>> Greetings from Lutherstadt Wittenberg :-)
>>> Maik Sommer
>>> IT-Systemadministrator
>>>
>>>
>>>
>>> processed by David.fx
>>> Subject: Re: [firebird-support] Restore fails due to "duplicate Value in 
>>> unique Index" (13-Sep-2012 14:03)
>>> From: Thomas Steinmaurer 
>>> To: firebird-support@yahoogroups.com
>>>
>>>
>>>
 i have a problem with my 27Gb FB2.5 Database. Doing a backup is workíng 
 fine. Doing a restore is failing due to the following error:

 gbak: ERROR:attempt to store duplicate value (visible to active 
 transactions) in
 unique index "RDB$INDEX_20"
 gbak:Exiting before completion due to errors

 Here`s the clue: The database is working fine. There are no duplicated 
 roles, no duplicated datasets, index-reorg is working fine, gfix could`t 
 find ANY errors.

 I tried to find out, which relation "RDB$INDEX_20" has. It refers to a 
 table named "Abrechnung", Column named "RUECKBUCHUNG". But there are no 
 duplicated values. In fact, Column "RUECKBUCHUNG" is always empty (IS 
 NULL).

 Any Ideas?
>>>
>>> IMHO, RDB$INDEX_20 is an index on the RDB$COLLATIONS system table. This
>>> can be proved by:
>>>
>>> select
>>> i.rdb$relation_name
>>> , s.rdb$field_name
>>> from
>>> rdb$indices i join rdb$index_segments s on (i.rdb$index_name =
>>> s.rdb$index_name)
>>> where
>>> i.rdb$index_name = 'RDB$INDEX_20'
>>>
>>> So, basically this means, there are duplicate values in
>>> RDB$COLLATIONS.RDB$COLLATION_NAME. What do you get by executing the
>>> following query?
>>>
>>> select
>>> rdb$collation_name
>>> from
>>> rdb$collations
>>> group by
>>> rdb$collation_name
>>> having
>>> count(*) > 1
>>>
>>> Greetings from Austria (lost 1:2 unlucky). ;-)
>>>
>>> Regards,
>>> Thomas
>>>
>>>
>>>
>>>
>>> [Non-text portions of this message have been removed]
>>>
>>>
>>>
>>> 
>>>
>>> ++
>>>
>>> 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
>>>
>>>
>>>
>>
>>
>>
>>
>>
>> [Non-text portions of this message have been removed]
>>
>>
>>
>> 
>>
>> ++
>>
>> 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.

RE: [firebird-support] RE: Stored Proc optimisation advice

2012-09-13 Thread Maya Opperman
>> If I run the sub proc to get the balance one by one though, it runs 
>> at
>> 1-2 seconds.  So, using IBExpert, I manually worked my way through 
>> the list, and on the 5th account - 22 seconds to execute.  I try the 
>> very same account again, and it takes 1 seconds.  I need to carry on 
>> down the list and do a few more, before I can get it to go slow again.
>>
>> Any ideas what to try?


>Get the statistics on the various runs of the sub-procedure- reads, writes, 
>fetches, and marks. 
No writes. 47 000 indexed reads.

> There may be other statistics available now describing your cache hit rate.  
> You should also check the depth of indexes (gstat).
I'm not 100% sure you mean here... 

> Which type of garbage collection are you using separate thread,
> cooperative, or blended?   
Using 2.5 classic, so after googling, I take it, it must be cooperative
(By the way, I haven't changed any oconfig settings when installing either)

How many tables and indexes are you touching in
>computing an account balance?
Just one. 
Er, no actually two.
Having another look now at the main procedure, it's actually calculating 3 
balances using table A, and then one using table B.
Excet the order is:
TableA's balance
TableB's balance
Table A's other balance
Table A's third balance with different criteria.

I changed the order to work with the three balances from table A first, then 
table B, and voila - the whole thing went from well over a minute down to 12 
seconds ;-) I am guessing what's happening, is there is now a lot less swapping 
out of data between buffer and disk.

I'm not sure if that is a sign something is wrong with my setup, or whether I 
just need to be careful of that kind of thing when writing stored procedures?

Thanks
Maya


Re: Re-6: [firebird-support] Restore fails due to "duplicate Value in unique Index"

2012-09-13 Thread Thomas Steinmaurer
> the querys are executed in a copy of that db. On tuesday, i recognized the 
> issue (that came without any reason). After a gbak, i stopped programs that 
> were using the database, stopped the default instance and made a copy to a 
> different volume, so i have a database i can Analyse. Currently, i made 
> another copy, that i use to Analyse it with IBFirstAid 2.6.
>
> I think this is a very weird issue

I wonder if index RDB$INDEX_20 is corrupt. What's the result of:

select
   rdb$collation_name || ''
from
   rdb$collations
group by
   rdb$collation_name || ''
having
   count(*) > 1


Regards,
Thomas


> Mit freundlichen Grüßen aus der Lutherstadt
> Maik Sommer
> IT-Systemadministrator
>
>
>
>  processed by David.fx
> Subject: Re: Re-4: [firebird-support] Restore fails due to "duplicate Value 
> in unique Index" (13-Sep-2012 14:29)
> From:Thomas Steinmaurer 
> To:  firebird-support@yahoogroups.com
>
>
>
>> The Result is:
>>
>> RDB$RELATION_NAMERDB$FIELD_NAME
>> RDB$COLLATIONSRDB$COLLATION_NAME
>
> Thought so and that's weird. And you have executed both queries in the
> database the faulty backup is based on?
>
> Regards,
> Thomas
>
>> Regards
>> Maik Sommer
>> IT-Systemadministrator
>>
>>
>>
>> processed by David.fx
>> Subject: Re: Re-2: [firebird-support] Restore fails due to "duplicate Value 
>> in unique Index" (13-Sep-2012 14:13)
>> From: Thomas Steinmaurer 
>> To: firebird-support@yahoogroups.com
>>
>>
>>
>>> Thanks for your quick response.
>>> The query
>>> "select
>>> rdb$collation_name
>>> from
>>> rdb$collations
>>> group by
>>> rdb$collation_name
>>> having
>>> count(*) > 1"
>>>
>>> results in:
>>>
>>> RDB$COLLATION_NAME
>>> 
>>
>> And what's the result of:
>>
>> select
>> i.rdb$relation_name
>> , s.rdb$field_name
>> from
>> rdb$indices i join rdb$index_segments s on (i.rdb$index_name =
>> s.rdb$index_name)
>> where
>> i.rdb$index_name = 'RDB$INDEX_20'
>>
>> Regards,
>> Thomas
>>
>>> Greetings from Lutherstadt Wittenberg :-)
>>> Maik Sommer
>>> IT-Systemadministrator
>>>
>>>
>>>
>>> processed by David.fx
>>> Subject: Re: [firebird-support] Restore fails due to "duplicate Value in 
>>> unique Index" (13-Sep-2012 14:03)
>>> From: Thomas Steinmaurer 
>>> To: firebird-support@yahoogroups.com
>>>
>>>
>>>
 i have a problem with my 27Gb FB2.5 Database. Doing a backup is workíng 
 fine. Doing a restore is failing due to the following error:

 gbak: ERROR:attempt to store duplicate value (visible to active 
 transactions) in
 unique index "RDB$INDEX_20"
 gbak:Exiting before completion due to errors

 Here`s the clue: The database is working fine. There are no duplicated 
 roles, no duplicated datasets, index-reorg is working fine, gfix could`t 
 find ANY errors.

 I tried to find out, which relation "RDB$INDEX_20" has. It refers to a 
 table named "Abrechnung", Column named "RUECKBUCHUNG". But there are no 
 duplicated values. In fact, Column "RUECKBUCHUNG" is always empty (IS 
 NULL).

 Any Ideas?
>>>
>>> IMHO, RDB$INDEX_20 is an index on the RDB$COLLATIONS system table. This
>>> can be proved by:
>>>
>>> select
>>> i.rdb$relation_name
>>> , s.rdb$field_name
>>> from
>>> rdb$indices i join rdb$index_segments s on (i.rdb$index_name =
>>> s.rdb$index_name)
>>> where
>>> i.rdb$index_name = 'RDB$INDEX_20'
>>>
>>> So, basically this means, there are duplicate values in
>>> RDB$COLLATIONS.RDB$COLLATION_NAME. What do you get by executing the
>>> following query?
>>>
>>> select
>>> rdb$collation_name
>>> from
>>> rdb$collations
>>> group by
>>> rdb$collation_name
>>> having
>>> count(*) > 1
>>>
>>> Greetings from Austria (lost 1:2 unlucky). ;-)
>>>
>>> Regards,
>>> Thomas
>>>
>>>
>>>
>>>
>>> [Non-text portions of this message have been removed]
>>>
>>>
>>>
>>> 
>>>
>>> ++
>>>
>>> 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
>>>
>>>
>>>
>>
>>
>>
>>
>>
>> [Non-text portions of this message have been removed]
>>
>>
>>
>> 
>>
>> ++
>>
>> 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
>>
>>
>>
>
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> 
>
> ++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (to

Re: [firebird-support] Problems with default values...

2012-09-13 Thread Ann Harrison
On Wed, Sep 12, 2012 at 8:56 PM, fidel_filio  wrote:

> ...
> add hor_uactu varchar(2) default extract(hour from cast('now' as date))
> not null
>
> I get this error:

Invalid token.
> SQL error code = -104.
> Token unknown - line 3, char 34.
> extract.
>
> Note:
> I am using Firebird 1.5.6


In addition to Helen's comments about using a varchar to hold a number and
using a function in a default value, you're using an ancient version of
Firebird which doesn't support the function EXTRACT at all.  You might be
able to get time by declaring the field to be of type time and assigning
'now' to it.

Do yourself a favor and use a version of Firebird that's less than 10 years
old.

Good luck,

Ann

>


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



Re-6: [firebird-support] Restore fails due to "duplicate Value in unique Index"

2012-09-13 Thread Maik Sommer - Finas GmbH
Hello Thomas,

the querys are executed in a copy of that db. On tuesday, i recognized the 
issue (that came without any reason). After a gbak, i stopped programs that 
were using the database, stopped the default instance and made a copy to a 
different volume, so i have a database i can Analyse. Currently, i made another 
copy, that i use to Analyse it with IBFirstAid 2.6.

I think this is a very weird issue

Mit freundlichen Grüßen aus der Lutherstadt
Maik Sommer
IT-Systemadministrator



processed by David.fx 
Subject: Re: Re-4: [firebird-support] Restore fails due to "duplicate Value in 
unique Index" (13-Sep-2012 14:29)
From:Thomas Steinmaurer 
To:  firebird-support@yahoogroups.com


  
> The Result is:
>
> RDB$RELATION_NAMERDB$FIELD_NAME
> RDB$COLLATIONSRDB$COLLATION_NAME

Thought so and that's weird. And you have executed both queries in the 
database the faulty backup is based on?

Regards,
Thomas

> Regards
> Maik Sommer
> IT-Systemadministrator
>
>
>
> processed by David.fx
> Subject: Re: Re-2: [firebird-support] Restore fails due to "duplicate Value 
> in unique Index" (13-Sep-2012 14:13)
> From: Thomas Steinmaurer 
> To: firebird-support@yahoogroups.com
>
>
>
>> Thanks for your quick response.
>> The query
>> "select
>> rdb$collation_name
>> from
>> rdb$collations
>> group by
>> rdb$collation_name
>> having
>> count(*) > 1"
>>
>> results in:
>>
>> RDB$COLLATION_NAME
>> 
>
> And what's the result of:
>
> select
> i.rdb$relation_name
> , s.rdb$field_name
> from
> rdb$indices i join rdb$index_segments s on (i.rdb$index_name =
> s.rdb$index_name)
> where
> i.rdb$index_name = 'RDB$INDEX_20'
>
> Regards,
> Thomas
>
>> Greetings from Lutherstadt Wittenberg :-)
>> Maik Sommer
>> IT-Systemadministrator
>>
>>
>>
>> processed by David.fx
>> Subject: Re: [firebird-support] Restore fails due to "duplicate Value in 
>> unique Index" (13-Sep-2012 14:03)
>> From: Thomas Steinmaurer 
>> To: firebird-support@yahoogroups.com
>>
>>
>>
>>> i have a problem with my 27Gb FB2.5 Database. Doing a backup is workíng 
>>> fine. Doing a restore is failing due to the following error:
>>>
>>> gbak: ERROR:attempt to store duplicate value (visible to active 
>>> transactions) in
>>> unique index "RDB$INDEX_20"
>>> gbak:Exiting before completion due to errors
>>>
>>> Here`s the clue: The database is working fine. There are no duplicated 
>>> roles, no duplicated datasets, index-reorg is working fine, gfix could`t 
>>> find ANY errors.
>>>
>>> I tried to find out, which relation "RDB$INDEX_20" has. It refers to a 
>>> table named "Abrechnung", Column named "RUECKBUCHUNG". But there are no 
>>> duplicated values. In fact, Column "RUECKBUCHUNG" is always empty (IS NULL).
>>>
>>> Any Ideas?
>>
>> IMHO, RDB$INDEX_20 is an index on the RDB$COLLATIONS system table. This
>> can be proved by:
>>
>> select
>> i.rdb$relation_name
>> , s.rdb$field_name
>> from
>> rdb$indices i join rdb$index_segments s on (i.rdb$index_name =
>> s.rdb$index_name)
>> where
>> i.rdb$index_name = 'RDB$INDEX_20'
>>
>> So, basically this means, there are duplicate values in
>> RDB$COLLATIONS.RDB$COLLATION_NAME. What do you get by executing the
>> following query?
>>
>> select
>> rdb$collation_name
>> from
>> rdb$collations
>> group by
>> rdb$collation_name
>> having
>> count(*) > 1
>>
>> Greetings from Austria (lost 1:2 unlucky). ;-)
>>
>> Regards,
>> Thomas
>>
>>
>>
>>
>> [Non-text portions of this message have been removed]
>>
>>
>>
>> 
>>
>> ++
>>
>> 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
>>
>>
>>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> 
>
> ++
>
> 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
>
>
>




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



Re: [firebird-support] Re: Establishing a database with Firebird

2012-09-13 Thread Alexey Kovyazin
Hello,
 >
>
> > My name is Jason and I am a Medical Physicist in Canberra, 
> Australia. I am also a beginner of firebird.
>
> Radiation records? Such as might possibly form evidence in a court 
> case or scientific studies?
> Shouldn't your organization look for a person who has experience with 
> Firebird to work on this migration project?
>


I tried to keep silence, but I can't :)
Just imagine that in medical forum someone would write:

Hello All,
My name is Jason, I am software developer, also I am interested in 
medicine.
I'm going to cut appendicitis from my dear aunt Sally and need your 
expert advice in choosing the scalpel...

:)

Regards,
Alexey Kovyazin
www.ib-aid.com



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



Re: Re-4: [firebird-support] Restore fails due to "duplicate Value in unique Index"

2012-09-13 Thread Thomas Steinmaurer
> The Result is:
>
> RDB$RELATION_NAMERDB$FIELD_NAME
> RDB$COLLATIONSRDB$COLLATION_NAME

Thought so and that's weird. And you have executed both queries in the 
database the faulty backup is based on?

Regards,
Thomas



> Regards
> Maik Sommer
> IT-Systemadministrator
>
>
>
>  processed by David.fx
> Subject: Re: Re-2: [firebird-support] Restore fails due to "duplicate Value 
> in unique Index" (13-Sep-2012 14:13)
> From:Thomas Steinmaurer 
> To:  firebird-support@yahoogroups.com
>
>
>
>> Thanks for your quick response.
>> The query
>> "select
>> rdb$collation_name
>> from
>> rdb$collations
>> group by
>> rdb$collation_name
>> having
>> count(*) > 1"
>>
>> results in:
>>
>> RDB$COLLATION_NAME
>> 
>
> And what's the result of:
>
> select
> i.rdb$relation_name
> , s.rdb$field_name
> from
> rdb$indices i join rdb$index_segments s on (i.rdb$index_name =
> s.rdb$index_name)
> where
> i.rdb$index_name = 'RDB$INDEX_20'
>
> Regards,
> Thomas
>
>> Greetings from Lutherstadt Wittenberg :-)
>> Maik Sommer
>> IT-Systemadministrator
>>
>>
>>
>> processed by David.fx
>> Subject: Re: [firebird-support] Restore fails due to "duplicate Value in 
>> unique Index" (13-Sep-2012 14:03)
>> From: Thomas Steinmaurer 
>> To: firebird-support@yahoogroups.com
>>
>>
>>
>>> i have a problem with my 27Gb FB2.5 Database. Doing a backup is workíng 
>>> fine. Doing a restore is failing due to the following error:
>>>
>>> gbak: ERROR:attempt to store duplicate value (visible to active 
>>> transactions) in
>>> unique index "RDB$INDEX_20"
>>> gbak:Exiting before completion due to errors
>>>
>>> Here`s the clue: The database is working fine. There are no duplicated 
>>> roles, no duplicated datasets, index-reorg is working fine, gfix could`t 
>>> find ANY errors.
>>>
>>> I tried to find out, which relation "RDB$INDEX_20" has. It refers to a 
>>> table named "Abrechnung", Column named "RUECKBUCHUNG". But there are no 
>>> duplicated values. In fact, Column "RUECKBUCHUNG" is always empty (IS NULL).
>>>
>>> Any Ideas?
>>
>> IMHO, RDB$INDEX_20 is an index on the RDB$COLLATIONS system table. This
>> can be proved by:
>>
>> select
>> i.rdb$relation_name
>> , s.rdb$field_name
>> from
>> rdb$indices i join rdb$index_segments s on (i.rdb$index_name =
>> s.rdb$index_name)
>> where
>> i.rdb$index_name = 'RDB$INDEX_20'
>>
>> So, basically this means, there are duplicate values in
>> RDB$COLLATIONS.RDB$COLLATION_NAME. What do you get by executing the
>> following query?
>>
>> select
>> rdb$collation_name
>> from
>> rdb$collations
>> group by
>> rdb$collation_name
>> having
>> count(*) > 1
>>
>> Greetings from Austria (lost 1:2 unlucky). ;-)
>>
>> Regards,
>> Thomas
>>
>>
>>
>>
>> [Non-text portions of this message have been removed]
>>
>>
>>
>> 
>>
>> ++
>>
>> 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
>>
>>
>>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> 
>
> ++
>
> 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
>
>
>


Re-4: [firebird-support] Restore fails due to "duplicate Value in unique Index"

2012-09-13 Thread Maik Sommer - Finas GmbH
The Result is:
 
RDB$RELATION_NAMERDB$FIELD_NAME
RDB$COLLATIONSRDB$COLLATION_NAME


Regards
Maik Sommer
IT-Systemadministrator



processed by David.fx 
Subject: Re: Re-2: [firebird-support] Restore fails due to "duplicate Value in 
unique Index" (13-Sep-2012 14:13)
From:Thomas Steinmaurer 
To:  firebird-support@yahoogroups.com


  
> Thanks for your quick response.
> The query
> "select
> rdb$collation_name
> from
> rdb$collations
> group by
> rdb$collation_name
> having
> count(*) > 1"
>
> results in:
>
> RDB$COLLATION_NAME
> 

And what's the result of:

select
i.rdb$relation_name
, s.rdb$field_name
from
rdb$indices i join rdb$index_segments s on (i.rdb$index_name = 
s.rdb$index_name)
where
i.rdb$index_name = 'RDB$INDEX_20'

Regards,
Thomas

> Greetings from Lutherstadt Wittenberg :-)
> Maik Sommer
> IT-Systemadministrator
>
>
>
> processed by David.fx
> Subject: Re: [firebird-support] Restore fails due to "duplicate Value in 
> unique Index" (13-Sep-2012 14:03)
> From: Thomas Steinmaurer 
> To: firebird-support@yahoogroups.com
>
>
>
>> i have a problem with my 27Gb FB2.5 Database. Doing a backup is workíng 
>> fine. Doing a restore is failing due to the following error:
>>
>> gbak: ERROR:attempt to store duplicate value (visible to active 
>> transactions) in
>> unique index "RDB$INDEX_20"
>> gbak:Exiting before completion due to errors
>>
>> Here`s the clue: The database is working fine. There are no duplicated 
>> roles, no duplicated datasets, index-reorg is working fine, gfix could`t 
>> find ANY errors.
>>
>> I tried to find out, which relation "RDB$INDEX_20" has. It refers to a table 
>> named "Abrechnung", Column named "RUECKBUCHUNG". But there are no duplicated 
>> values. In fact, Column "RUECKBUCHUNG" is always empty (IS NULL).
>>
>> Any Ideas?
>
> IMHO, RDB$INDEX_20 is an index on the RDB$COLLATIONS system table. This
> can be proved by:
>
> select
> i.rdb$relation_name
> , s.rdb$field_name
> from
> rdb$indices i join rdb$index_segments s on (i.rdb$index_name =
> s.rdb$index_name)
> where
> i.rdb$index_name = 'RDB$INDEX_20'
>
> So, basically this means, there are duplicate values in
> RDB$COLLATIONS.RDB$COLLATION_NAME. What do you get by executing the
> following query?
>
> select
> rdb$collation_name
> from
> rdb$collations
> group by
> rdb$collation_name
> having
> count(*) > 1
>
> Greetings from Austria (lost 1:2 unlucky). ;-)
>
> Regards,
> Thomas
>
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> 
>
> ++
>
> 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
>
>
>





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



Re: Re-2: [firebird-support] Restore fails due to "duplicate Value in unique Index"

2012-09-13 Thread Thomas Steinmaurer
> Thanks for your quick response.
> The query
> "select
> rdb$collation_name
> from
> rdb$collations
> group by
> rdb$collation_name
> having
> count(*) > 1"
>
> results in:
>
> RDB$COLLATION_NAME
> 

And what's the result of:

select
   i.rdb$relation_name
   , s.rdb$field_name
from
   rdb$indices i join rdb$index_segments s on (i.rdb$index_name = 
s.rdb$index_name)
where
   i.rdb$index_name = 'RDB$INDEX_20'


Regards,
Thomas



> Greetings from Lutherstadt Wittenberg :-)
> Maik Sommer
> IT-Systemadministrator
>
>
>
>  processed by David.fx
> Subject: Re: [firebird-support] Restore fails due to "duplicate Value in 
> unique Index" (13-Sep-2012 14:03)
> From:Thomas Steinmaurer 
> To:  firebird-support@yahoogroups.com
>
>
>
>> i have a problem with my 27Gb FB2.5 Database. Doing a backup is workíng 
>> fine. Doing a restore is failing due to the following error:
>>
>> gbak: ERROR:attempt to store duplicate value (visible to active 
>> transactions) in
>> unique index "RDB$INDEX_20"
>> gbak:Exiting before completion due to errors
>>
>> Here`s the clue: The database is working fine. There are no duplicated 
>> roles, no duplicated datasets, index-reorg is working fine, gfix could`t 
>> find ANY errors.
>>
>> I tried to find out, which relation "RDB$INDEX_20" has. It refers to a table 
>> named "Abrechnung", Column named "RUECKBUCHUNG". But there are no duplicated 
>> values. In fact, Column "RUECKBUCHUNG" is always empty (IS NULL).
>>
>> Any Ideas?
>
> IMHO, RDB$INDEX_20 is an index on the RDB$COLLATIONS system table. This
> can be proved by:
>
> select
> i.rdb$relation_name
> , s.rdb$field_name
> from
> rdb$indices i join rdb$index_segments s on (i.rdb$index_name =
> s.rdb$index_name)
> where
> i.rdb$index_name = 'RDB$INDEX_20'
>
> So, basically this means, there are duplicate values in
> RDB$COLLATIONS.RDB$COLLATION_NAME. What do you get by executing the
> following query?
>
> select
> rdb$collation_name
> from
> rdb$collations
> group by
> rdb$collation_name
> having
> count(*) > 1
>
> Greetings from Austria (lost 1:2 unlucky). ;-)
>
> Regards,
> Thomas
>
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> 
>
> ++
>
> 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
>
>
>



Re-2: [firebird-support] Restore fails due to "duplicate Value in unique Index"

2012-09-13 Thread Maik Sommer - Finas GmbH
Hello there!

Thanks for your quick response. 
The query 
"select
rdb$collation_name
from
rdb$collations
group by
rdb$collation_name
having
count(*) > 1"

results in:

RDB$COLLATION_NAME


Greetings from Lutherstadt Wittenberg :-)
Maik Sommer
IT-Systemadministrator



processed by David.fx 
Subject: Re: [firebird-support] Restore fails due to "duplicate Value in unique 
Index" (13-Sep-2012 14:03)
From:Thomas Steinmaurer 
To:  firebird-support@yahoogroups.com


  
> i have a problem with my 27Gb FB2.5 Database. Doing a backup is workíng fine. 
> Doing a restore is failing due to the following error:
>
> gbak: ERROR:attempt to store duplicate value (visible to active transactions) 
> in
> unique index "RDB$INDEX_20"
> gbak:Exiting before completion due to errors
>
> Here`s the clue: The database is working fine. There are no duplicated roles, 
> no duplicated datasets, index-reorg is working fine, gfix could`t find ANY 
> errors.
>
> I tried to find out, which relation "RDB$INDEX_20" has. It refers to a table 
> named "Abrechnung", Column named "RUECKBUCHUNG". But there are no duplicated 
> values. In fact, Column "RUECKBUCHUNG" is always empty (IS NULL).
>
> Any Ideas?

IMHO, RDB$INDEX_20 is an index on the RDB$COLLATIONS system table. This 
can be proved by:

select
i.rdb$relation_name
, s.rdb$field_name
from
rdb$indices i join rdb$index_segments s on (i.rdb$index_name = 
s.rdb$index_name)
where
i.rdb$index_name = 'RDB$INDEX_20'

So, basically this means, there are duplicate values in 
RDB$COLLATIONS.RDB$COLLATION_NAME. What do you get by executing the 
following query?

select
rdb$collation_name
from
rdb$collations
group by
rdb$collation_name
having
count(*) > 1

Greetings from Austria (lost 1:2 unlucky). ;-)

Regards,
Thomas




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



Re: [firebird-support] Restore fails due to "duplicate Value in unique Index"

2012-09-13 Thread Thomas Steinmaurer
> i have a problem with my 27Gb FB2.5 Database. Doing a backup is workíng fine. 
> Doing a restore is failing due to the following error:
>
> gbak: ERROR:attempt to store duplicate value (visible to active transactions) 
> in
>   unique index "RDB$INDEX_20"
> gbak:Exiting before completion due to errors
>
> Here`s the clue: The database is working fine. There are no duplicated roles, 
> no duplicated datasets, index-reorg is working fine, gfix could`t find ANY 
> errors.
>
> I tried to find out, which relation "RDB$INDEX_20" has. It refers to a table 
> named "Abrechnung", Column named "RUECKBUCHUNG". But there are no duplicated 
> values. In fact, Column "RUECKBUCHUNG" is always empty (IS NULL).
>
> Any Ideas?

IMHO, RDB$INDEX_20 is an index on the RDB$COLLATIONS system table. This 
can be proved by:

select
   i.rdb$relation_name
   , s.rdb$field_name
from
   rdb$indices i join rdb$index_segments s on (i.rdb$index_name = 
s.rdb$index_name)
where
   i.rdb$index_name = 'RDB$INDEX_20'


So, basically this means, there are duplicate values in 
RDB$COLLATIONS.RDB$COLLATION_NAME. What do you get by executing the 
following query?

select
   rdb$collation_name
from
   rdb$collations
group by
   rdb$collation_name
having
   count(*) > 1


Greetings from Austria (lost 1:2 unlucky). ;-)

Regards,
Thomas


[firebird-support] Restore fails due to "duplicate Value in unique Index"

2012-09-13 Thread Maik Sommer - Finas GmbH
Hello there,

i have a problem with my 27Gb FB2.5 Database. Doing a backup is workíng fine. 
Doing a restore is failing due to the following error:

gbak: ERROR:attempt to store duplicate value (visible to active transactions) in
 unique index "RDB$INDEX_20"
gbak:Exiting before completion due to errors

Here`s the clue: The database is working fine. There are no duplicated roles, 
no duplicated datasets, index-reorg is working fine, gfix could`t find ANY 
errors.

I tried to find out, which relation "RDB$INDEX_20" has. It refers to a table 
named "Abrechnung", Column named "RUECKBUCHUNG". But there are no duplicated 
values. In fact, Column "RUECKBUCHUNG" is always empty (IS NULL).

Any Ideas?


Kind regards from Germany (and please excuse my bad english!)
Maik Sommer
IT-Systemadministrator


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



[firebird-support] Re: Get Installed Folder

2012-09-13 Thread Allan_Fernandes

Can we also understand if Firebird is installed via this method.
I too always install Firebird as Service.
Could you also give me sample of Service Checking please.

Regards
Allan



--- In firebird-support@yahoogroups.com, Josef Kokeš  wrote:
>
> >  >>How can I get the folder where FireBird is installed.
> >  >>I use Delphi and I want to copy the UDF folder after a silent
> > installation.
> >
> > Not sure if this is the best method, but I read the DefaultInstance
> > registry key. It work for me for FB 1.5, 2.1 and 2.5:
> >
> > RootKey := HKEY_LOCAL_MACHINE;
> > Found := MyRegistry.OpenKeyReadOnly('\SOFTWARE\Firebird Project\Firebird
> > Server\Instances');
> > if not Found then
> > Found := MyRegistry.OpenKeyReadOnly('\SOFTWARE\Wow6432Node\Firebird
> > Project\Firebird Server\Instances');
> >
> > If Found then
> > Result := MyRegistry.ReadString('DefaultInstance');
> >
> > Regards
> > Maya
> 
> As I only run Firebird as a service, I run through a list of all 
> installed services and take the binary path of all services whose 
> service name (not DisplayName!) begins with "FirebirdServer". Seems to 
> work OK for me, updates my UDF for all installed Firebirds - regardless 
> of whether they have a key in registry or not.
> 
> Josef
>




RE: [firebird-support] RE: Stored Proc optimisation advice

2012-09-13 Thread Maya Opperman
>> If I run the sub proc to get the balance one by one though, it runs at
>> 1-2 seconds.  So, using IBExpert, I manually worked my way through the 
>> list, and on the 5th account - 22 seconds to execute.  I try the very 
>> same account again, and it takes 1 seconds.  I need to carry on down 
>> the list and do a few more, before I can get it to go slow again.
>>
>> Any ideas what to try?


>Get the statistics on the various runs of the sub-procedure- reads, writes, 
>fetches, and marks. 
> There may be other statistics available now describing your cache hit rate.  
> You should also check the depth of indexes (gstat).
> Which type of garbage collection are you using separate thread,
> cooperative, or blended?   How many tables and indexes are you touching in
>computing an account balance?

Thanks, Ann! 

I'll poke around in IBExpert, and the monitoring tables and see if I can figure 
out how to do all this - it'll be a learning curve for me ;-)



Re: [firebird-support] Get Installed Folder

2012-09-13 Thread Josef Kokeš
>  >>How can I get the folder where FireBird is installed.
>  >>I use Delphi and I want to copy the UDF folder after a silent
> installation.
>
> Not sure if this is the best method, but I read the DefaultInstance
> registry key. It work for me for FB 1.5, 2.1 and 2.5:
>
> RootKey := HKEY_LOCAL_MACHINE;
> Found := MyRegistry.OpenKeyReadOnly('\SOFTWARE\Firebird Project\Firebird
> Server\Instances');
> if not Found then
> Found := MyRegistry.OpenKeyReadOnly('\SOFTWARE\Wow6432Node\Firebird
> Project\Firebird Server\Instances');
>
> If Found then
> Result := MyRegistry.ReadString('DefaultInstance');
>
> Regards
> Maya

As I only run Firebird as a service, I run through a list of all 
installed services and take the binary path of all services whose 
service name (not DisplayName!) begins with "FirebirdServer". Seems to 
work OK for me, updates my UDF for all installed Firebirds - regardless 
of whether they have a key in registry or not.

Josef




++

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/



RE: [firebird-support] Get Installed Folder

2012-09-13 Thread Maya Opperman
>>How can I get the folder where FireBird is installed.
>>I use Delphi and I want to copy the UDF folder after a silent installation.

Not sure if this is the best method, but I read the DefaultInstance registry 
key. It work for me for FB 1.5, 2.1 and 2.5:

  RootKey := HKEY_LOCAL_MACHINE;
  Found := MyRegistry.OpenKeyReadOnly('\SOFTWARE\Firebird Project\Firebird 
Server\Instances');
  if not Found then
Found := MyRegistry.OpenKeyReadOnly('\SOFTWARE\Wow6432Node\Firebird 
Project\Firebird Server\Instances');

If Found then
  Result := MyRegistry.ReadString('DefaultInstance');


Regards
Maya


PS. Pardon the lack of object creation, etc, I have a few sub procs hat I 
merged this together from, so you get the gist