Re: Odp: [firebird-support] Firebird 2.52 gbak fails to do a restore - error trigger (3)

2015-06-12 Thread Jack Mason jackma...@mindspring.com [firebird-support]
Thank you very much.  I will get a chance to try the -o switch this 
weekend when everyone goes home.


Jack

On 6/12/2015 2:25 PM, Ann Harrison aharri...@ibphoenix.com 
[firebird-support] wrote:


On 6/12/2015 2:11 PM, Jack Mason jackma...@mindspring.com 
[firebird-support] wrote:
Thank you very much.   I will try the  -o switch and the gfix 
suggestion as well.


Don't bother with gfix.  It does a physical database check - pointers 
point to what
they should, pages are the right type, etc.  Your problem is with the 
logic of the database,

specifically with one of the grants.

From a very historical point of view, InterBase was created with a 
security model that
everything was allowed unless prohibited.  SQL's model is that nothing 
is allowed
unless permitted.  Some odd things were done to convert from the 
InterBase model
to the SQL model and not all of them were done well.  You seem to have 
tripped over
one of those issues, probably something that worked OK with earlier 
versions of

Firebird, but which contemporary Firebird rejects.

Good luck,

Ann



--
"Our Constitution was made only for a moral and religious people. It is 
wholly inadequate to the government of any other." -- John Adams, Oct. 
11, 1798 "Where there is no vision, the people perish.." Prov 29:18


Re: Odp: [firebird-support] Firebird 2.52 gbak fails to do a restore - error trigger (3)

2015-06-12 Thread Ann Harrison aharri...@ibphoenix.com [firebird-support]
On 6/12/2015 2:11 PM, Jack Mason jackma...@mindspring.com 
[firebird-support] wrote:



Thank you very much.   I will try the  -o switch and the gfix 
suggestion as well.


Don't bother with gfix.  It does a physical database check - pointers 
point to what
they should, pages are the right type, etc.  Your problem is with the 
logic of the database,

specifically with one of the grants.

From a very historical point of view, InterBase was created with a 
security model that
everything was allowed unless prohibited.  SQL's model is that nothing 
is allowed
unless permitted.  Some odd things were done to convert from the 
InterBase model
to the SQL model and not all of them were done well.  You seem to have 
tripped over
one of those issues, probably something that worked OK with earlier 
versions of

Firebird, but which contemporary Firebird rejects.

Good luck,

Ann


Re: Odp: [firebird-support] Firebird 2.52 gbak fails to do a restore - error trigger (3)

2015-06-12 Thread Jack Mason jackma...@mindspring.com [firebird-support]
Thank you very much.   I will try the  -o switch and the gfix suggestion 
as well.


Jack

On 6/12/2015 2:08 PM, Ann Harrison aharri...@ibphoenix.com 
[firebird-support] wrote:


On 6/11/2015 11:05 AM, Jack Mason jackma...@mindspring.com 
[firebird-support] wrote:


However, that won't help us.  Our concern is that we have been 
backing up our databases for years and it has been a fruitless 
exercise.  We cannot restore them.  We did not have that problem with 
Interbase 6 but switched to Firebird because it was touted as being 
"modern, safer" etc.  Now we find it is virtually worthless unless we 
can restore a database it has backed up.


OK.  First, there's a -o switch that you should use on the restore if 
the normal restore gets an error.  That
switch tells gbak to commit after creating the metadata and after 
loading data for each table.  That will
get you through most problems in backup files.  In this case, it will 
get you all of your data, indexes, and

constraints.

Second, the problem is somewhere in the privileges you've defined ... 
I can't tell which from the

error message.

Third, IBSurgeon has tools that will allow you to fix most broken gbak 
backups.


Fourth, in the future, restore one out of ten backups to be sure that 
the backup procedure is actually working. That's a good precaution on 
any kind of backup.  Once in ancient history, we realized after a 
crash that we'd been backing up to /dev/null - great optimization, not 
so good for recovery.


Nbak has its strengths and weaknesses as well.

Good luck,

Ann



--
"Our Constitution was made only for a moral and religious people. It is 
wholly inadequate to the government of any other." -- John Adams, Oct. 
11, 1798 "Where there is no vision, the people perish.." Prov 29:18


Re: Odp: [firebird-support] Firebird 2.52 gbak fails to do a restore - error trigger (3)

2015-06-12 Thread Ann Harrison aharri...@ibphoenix.com [firebird-support]
On 6/11/2015 11:05 AM, Jack Mason jackma...@mindspring.com 
[firebird-support] wrote:




However, that won't help us.  Our concern is that we have been backing 
up our databases for years and it has been a fruitless exercise.  We 
cannot restore them.  We did not have that problem with Interbase 6 
but switched to Firebird because it was touted as being "modern, 
safer" etc.  Now we find it is virtually worthless unless we can 
restore a database it has backed up.


OK.  First, there's a -o switch that you should use on the restore if 
the normal restore gets an error.  That
switch tells gbak to commit after creating the metadata and after 
loading data for each table.  That will
get you through most problems in backup files.  In this case, it will 
get you all of your data, indexes, and

constraints.

Second, the problem is somewhere in the privileges you've defined ... I 
can't tell which from the

error message.

Third, IBSurgeon has tools that will allow you to fix most broken gbak 
backups.


Fourth, in the future, restore one out of ten backups to be sure that 
the backup procedure is actually working. That's a good precaution on 
any kind of backup.  Once in ancient history, we realized after a crash 
that we'd been backing up to /dev/null - great optimization, not so good 
for recovery.


Nbak has its strengths and weaknesses as well.

Good luck,

Ann


Re: Odp: [firebird-support] Firebird 2.52 gbak fails to do a restore - error trigger (3)

2015-06-11 Thread Jack Mason jackma...@mindspring.com [firebird-support]

Got it.  Here is what I got when I tried to execute it:

C:\backups\Buford>gbak -b -v -user SYSDBA -pas masterkey 
192.168.1.252:/bfl/smtb

db/customer customer.bak
The application has failed to start because its side-by-side 
configuration is in
correct. Please see the application event log or use the command-line 
sxstrace.e

xe tool for more detail.

What am I missing?

I tried for 3.0, but it would not even run... likely because it needs 
the 3.0 server running.


Jack

On 6/11/2015 12:09 PM, liviuslivius liviusliv...@poczta.onet.pl 
[firebird-support] wrote:

Hi,
no i mean go to
http://www.firebirdsql.org/en/snapshot-builds/
download e.g. Windows build
Firebird-2.5.5.26887
unzip it and get gbak.exe
and do backup and restore with it
regards,
Karol Bieniaszewski

Could not find gback file, but attached is a snapshot of the bin
directory for our download. Is that what you needed?

Jack

On 6/11/2015 11:35 AM, 'liviusliv...@poczta.onet.pl'
liviusliv...@poczta.onet.pl [firebird-support] wrote:
>
> Hi,
>
> Maybe another wrong direction,
> But download snapshot build of FB2.5
> And extract from there gback file. Do backup with them and try
to restore
>
> Regards,
> Karol Bieniaszewski




--
"Our Constitution was made only for a moral and religious people. It is 
wholly inadequate to the government of any other." -- John Adams, Oct. 
11, 1798 "Where there is no vision, the people perish.." Prov 29:18


Re: Re: Odp: [firebird-support] Firebird 2.52 gbak fails to do a restore - error trigger (3)

2015-06-11 Thread liviuslivius liviusliv...@poczta.onet.pl [firebird-support]
Hi,
 
no i mean go to
http://www.firebirdsql.org/en/snapshot-builds/
download e.g. Windows build
Firebird-2.5.5.26887
unzip it and get gbak.exe
and do backup and restore with it
 
regards,
Karol Bieniaszewski
 
 
Could not find gback file, but attached is a snapshot of the bin
directory for our download. Is that what you needed?
Jack
On 6/11/2015 11:35 AM, 'liviusliv...@poczta.onet.pl'
liviusliv...@poczta.onet.pl [firebird-support] wrote:
>
> Hi,
>
> Maybe another wrong direction,
> But download snapshot build of FB2.5
> And extract from there gback file. Do backup with them and try to restore
>
> Regards,
> Karol Bieniaszewski

Re: Odp: [firebird-support] Firebird 2.52 gbak fails to do a restore - error trigger (3)

2015-06-11 Thread Jack Mason jackma...@mindspring.com [firebird-support]
Could not find gback file, but attached is a snapshot of the bin 
directory for our download.  Is that what you needed?

Jack

On 6/11/2015 11:35 AM, 'liviusliv...@poczta.onet.pl' 
liviusliv...@poczta.onet.pl [firebird-support] wrote:
>
> Hi,
>
> Maybe another wrong direction,
> But download snapshot build of FB2.5
> And extract from there gback file. Do backup with them and try to restore
>
> Regards,
> Karol Bieniaszewski
>
> Wysłane z mojego HTC
>
> - Reply message -
> Od: "Tim Ward t...@telensa.com [firebird-support]" 
> 
> Do: 
> Temat: Odp: [firebird-support] Firebird 2.52 gbak fails to do a 
> restore - error trigger (3)
> Data: czw., cze 11, 2015 17:11
>
>
> On 11/06/2015 16:05, Jack Mason jackma...@mindspring.com 
> [firebird-support] wrote:
>>
>> Thanks,
>> However, that won't help us.  Our concern is that we have been 
>> backing up our databases for years and it has been a fruitless 
>> exercise.  We cannot restore them.
>>
>
> *Any* backup procedure for *any* system using *any* tools is pointless 
> if you don't do regular test restores.
>
> -- 
> Tim Ward
> 

-- 
"Our Constitution was made only for a moral and religious people. It is 
wholly inadequate to the government of any other." -- John Adams, Oct. 
11, 1798 "Where there is no vision, the people perish.." Prov 29:18


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



Odp: [firebird-support] Firebird 2.52 gbak fails to do a restore - error trigger (3)

2015-06-11 Thread 'liviusliv...@poczta.onet.pl' liviusliv...@poczta.onet.pl [firebird-support]
Hi,

Maybe another wrong direction,
But download snapshot build of FB2.5
And extract from there gback file. Do backup with them and try to restore

Regards,
Karol Bieniaszewski

Wysłane z mojego HTC

- Reply message -
Od: "Tim Ward t...@telensa.com [firebird-support]" 

Do: 
Temat: Odp: [firebird-support] Firebird 2.52 gbak fails to do a restore - error 
trigger (3)
Data: czw., cze 11, 2015 17:11
On 11/06/2015 16:05, Jack Mason
jackma...@mindspring.com [firebird-support] wrote:



 


Thanks,

However, that won't help us.  Our concern is that we have
been backing up our databases for years and it has been a
fruitless exercise.  We cannot restore them.








*Any* backup procedure for *any* system using *any* tools is
pointless if you don't do regular test restores.



-- 
Tim Ward










Re: Odp: [firebird-support] Firebird 2.52 gbak fails to do a restore - error trigger (3)

2015-06-11 Thread Jack Mason jackma...@mindspring.com [firebird-support]

Very true, Captain Obvious.  We fell prey to the "Firebird is great!" myth.



On 6/11/2015 11:11 AM, Tim Ward t...@telensa.com [firebird-support] wrote:


On 11/06/2015 16:05, Jack Mason jackma...@mindspring.com 
[firebird-support] wrote:


Thanks,
However, that won't help us.  Our concern is that we have been 
backing up our databases for years and it has been a fruitless 
exercise.  We cannot restore them.




*Any* backup procedure for *any* system using *any* tools is pointless 
if you don't do regular test restores.


--
Tim Ward



--
"Our Constitution was made only for a moral and religious people. It is 
wholly inadequate to the government of any other." -- John Adams, Oct. 
11, 1798 "Where there is no vision, the people perish.." Prov 29:18


Re: Odp: [firebird-support] Firebird 2.52 gbak fails to do a restore - error trigger (3)

2015-06-11 Thread Tim Ward t...@telensa.com [firebird-support]
On 11/06/2015 16:05, Jack Mason jackma...@mindspring.com 
[firebird-support] wrote:


Thanks,
However, that won't help us.  Our concern is that we have been backing 
up our databases for years and it has been a fruitless exercise.  We 
cannot restore them.




*Any* backup procedure for *any* system using *any* tools is pointless 
if you don't do regular test restores.


--
Tim Ward



Re: Odp: [firebird-support] Firebird 2.52 gbak fails to do a restore - error trigger (3)

2015-06-11 Thread Jack Mason jackma...@mindspring.com [firebird-support]

Thanks,
However, that won't help us.  Our concern is that we have been backing 
up our databases for years and it has been a fruitless exercise.  We 
cannot restore them.  We did not have that problem with Interbase 6 but 
switched to Firebird because it was touted as being "modern, safer" 
etc.  Now we find it is virtually worthless unless we can restore a 
database it has backed up.


Unless we can get this problem whipped such that the backups are usable, 
or find another way to back them up, there is no reason we should be 
using Firebird.  That is our concern.


There is apparently another backup program, nbackup, that we will try 
but at this point we are leery of anything other than a "professional" 
backup/restore capability for Firebird.


Hopefully, someone will come up with either a "fix" for this problem or 
a different way we should be doing backups.


Thanks again for your suggestion,

Jack

On 6/11/2015 10:46 AM, 'liviusliv...@poczta.onet.pl' 
liviusliv...@poczta.onet.pl [firebird-support] wrote:


Hi,

Maybe wrong direction
But set this restored with error database to be a readonly and try to 
connect to it


Regards,
Karol Bieniaszewski

- Reply message -
Od: "Jack Mason jackma...@mindspring.com [firebird-support]" 


Do: 
Temat: [firebird-support] Firebird 2.52 gbak fails to do a restore - 
error trigger (3)

Data: czw., cze 11, 2015 16:26


Here is the gstat - h:

Database "customer"
Database header page information:
Flags0
Checksum12345
Generation1175184
Page size4096
ODS version11.2
Oldest transaction119622
Oldest active1072065
Oldest snapshot1072058
Next transaction1072195
Bumped transaction1
Sequence number0
Next attachment ID275823
Implementation ID24
Shadow count0
Page buffers0
Next header page0
Database dialect3
Creation dateFeb 19, 2013 0:09:08
Attributesforce write

Variable header data:
Sweep interval:2
*END*

and here is the gstat everything else:

gstat version LI-V2.5.2.26508 Firebird 2.5

Database "customer"
Database header page information:
Flags0
Checksum12345
Generation1175182
Page size4096
ODS version11.2
Oldest transaction119622
Oldest active1072065
Oldest snapshot1072058
Next transaction1072193
Bumped transaction1
Sequence number0
Next attachment ID275822
Implementation ID24
Shadow count0
Page buffers0
Next header page0
Database dialect3
Creation dateFeb 19, 2013 0:09:08
Attributesforce write

Variable header data:
Sweep interval:2
*END*


Database file sequence:
File customer is the only file
Firebird/linux AMD64 (access method), version "LI-V2.5.2.26508
Firebird 2.5"
Firebird/linux AMD64 (remote server), version "LI-V2.5.2.26508
Firebird 2.5/tcp (lserver)/P12"
Firebird/linux AMD64 (remote interface), version "LI-V2.5.2.26508
Firebird 2.5/tcp (lserver)/P12"
on disk structure version 11.2

Analyzing database pages ...
CUSTOMERS (128)
Primary pointer page: 183, Index root page: 184
Average record length: 340.17, total records: 70105
Average version length: 26.60, total versions: 5, max versions: 2
Data pages: 6626, data page slots: 6646, average fill: 94%
Fill distribution:
 0 - 19% = 1
20 - 39% = 8
40 - 59% = 14
60 - 79% = 16
80 - 99% = 6587

Index FNAME (2)
Depth: 2, leaf buckets: 135, nodes: 70109
Average data length: 0.51, total dup: 57228, max dup: 584
Fill distribution:
 0 - 19% = 0
20 - 39% = 1
40 - 59% = 54
60 - 79% = 40
80 - 99% = 40

Index FULLNAME (6)
Depth: 3, leaf buckets: 330, nodes: 70105
Average data length: 4.83, total dup: 20467, max dup: 18169
Fill distribution:
 0 - 19% = 0
20 - 39% = 133
40 - 59% = 21
60 - 79% = 173
80 - 99% = 3

Index HOME (3)
Depth: 2, leaf buckets: 226, nodes: 70108
Average data length: 2.61, total dup: 9196, max dup: 2392
Fill distribution:
 0 - 19% = 0
20 - 39% = 2
40 - 59% = 101
60 - 79% = 86
80 - 99% = 37

Index LNAME (0)
Depth: 2, leaf buckets: 154, nodes: 70117
Average data length: 1.08, total dup: 46986, max dup: 758
Fill distribution:
 0 - 19% = 1
20 - 39% = 1
40 - 59% = 74
60 - 79% = 15
80 - 99% = 63

Index NEWID (4)
Depth: 2, leaf buckets: 121, nodes: 70105
Average data length: 1.04, total dup: 2, max dup: 1
Fill distribution:
 0 - 19% = 0
20 - 39% = 0
40 - 59% = 30
60 - 79% = 13
80 - 99% = 78

Index OFFICEPHONE (5)
Depth: 2,

Odp: [firebird-support] Firebird 2.52 gbak fails to do a restore - error trigger (3)

2015-06-11 Thread 'liviusliv...@poczta.onet.pl' liviusliv...@poczta.onet.pl [firebird-support]
Hi,

Maybe wrong direction
But set this restored with error database to be a readonly and try to connect 
to it

Regards,
Karol Bieniaszewski

- Reply message -
Od: "Jack Mason jackma...@mindspring.com [firebird-support]" 

Do: 
Temat: [firebird-support] Firebird 2.52 gbak fails to do a restore - error 
trigger (3)
Data: czw., cze 11, 2015 16:26


Here is the gstat - h:

Database "customer"
Database header page information:
 Flags0
 Checksum12345
 Generation1175184
 Page size4096
 ODS version11.2
 Oldest transaction119622
 Oldest active1072065
 Oldest snapshot1072058
 Next transaction1072195
 Bumped transaction1
 Sequence number0
 Next attachment ID275823
 Implementation ID24
 Shadow count0
 Page buffers0
 Next header page0
 Database dialect3
 Creation dateFeb 19, 2013 0:09:08
 Attributesforce write

 Variable header data:
 Sweep interval:2
 *END*

and here is the gstat everything else:

gstat version LI-V2.5.2.26508 Firebird 2.5

Database "customer"
Database header page information:
 Flags0
 Checksum12345
 Generation1175182
 Page size4096
 ODS version11.2
 Oldest transaction119622
 Oldest active1072065
 Oldest snapshot1072058
 Next transaction1072193
 Bumped transaction1
 Sequence number0
 Next attachment ID275822
 Implementation ID24
 Shadow count0
 Page buffers0
 Next header page0
 Database dialect3
 Creation dateFeb 19, 2013 0:09:08
 Attributesforce write

 Variable header data:
 Sweep interval:2
 *END*


Database file sequence:
File customer is the only file
 Firebird/linux AMD64 (access method), version "LI-V2.5.2.26508 
Firebird 2.5"
 Firebird/linux AMD64 (remote server), version "LI-V2.5.2.26508 
Firebird 2.5/tcp (lserver)/P12"
 Firebird/linux AMD64 (remote interface), version "LI-V2.5.2.26508 
Firebird 2.5/tcp (lserver)/P12"
 on disk structure version 11.2

Analyzing database pages ...
CUSTOMERS (128)
 Primary pointer page: 183, Index root page: 184
 Average record length: 340.17, total records: 70105
 Average version length: 26.60, total versions: 5, max versions: 2
 Data pages: 6626, data page slots: 6646, average fill: 94%
 Fill distribution:
  0 - 19% = 1
 20 - 39% = 8
 40 - 59% = 14
 60 - 79% = 16
 80 - 99% = 6587

 Index FNAME (2)
 Depth: 2, leaf buckets: 135, nodes: 70109
 Average data length: 0.51, total dup: 57228, max dup: 584
 Fill distribution:
  0 - 19% = 0
 20 - 39% = 1
 40 - 59% = 54
 60 - 79% = 40
 80 - 99% = 40

 Index FULLNAME (6)
 Depth: 3, leaf buckets: 330, nodes: 70105
 Average data length: 4.83, total dup: 20467, max dup: 18169
 Fill distribution:
  0 - 19% = 0
 20 - 39% = 133
 40 - 59% = 21
 60 - 79% = 173
 80 - 99% = 3

 Index HOME (3)
 Depth: 2, leaf buckets: 226, nodes: 70108
 Average data length: 2.61, total dup: 9196, max dup: 2392
 Fill distribution:
  0 - 19% = 0
 20 - 39% = 2
 40 - 59% = 101
 60 - 79% = 86
 80 - 99% = 37

 Index LNAME (0)
 Depth: 2, leaf buckets: 154, nodes: 70117
 Average data length: 1.08, total dup: 46986, max dup: 758
 Fill distribution:
  0 - 19% = 1
 20 - 39% = 1
 40 - 59% = 74
 60 - 79% = 15
 80 - 99% = 63

 Index NEWID (4)
 Depth: 2, leaf buckets: 121, nodes: 70105
 Average data length: 1.04, total dup: 2, max dup: 1
 Fill distribution:
  0 - 19% = 0
 20 - 39% = 0
 40 - 59% = 30
 60 - 79% = 13
 80 - 99% = 78

 Index OFFICEPHONE (5)
 Depth: 2, leaf buckets: 102, nodes: 70105
 Average data length: 0.20, total dup: 67213, max dup: 38383
 Fill distribution:
  0 - 19% = 0
 20 - 39% = 1
 40 - 59% = 32
 60 - 79% = 17
 80 - 99% = 52

 Index RDB$PRIMARY7 (1)
 Depth: 3, leaf buckets: 346, nodes: 70117
 Average data length: 7.64, total dup: 11, max dup: 3
 Fill distribution:
  0 - 19% = 0
 20 - 39% = 9
 40 - 59% = 171
 60 - 79% = 16
 80 - 99% = 150

INVOICES (132)
 Primary pointer page: 191, Index root page: 192
 Average record length: 27.41, total records: 27
 Average version length: 0.00, total versions: 0, max versions: 0
 Data pages: 2, data page slots: 19, average fill: 16%
 Fill distribution:
  0 - 19% = 1
 20 - 39% = 1
 40 - 59% = 0
 60 - 79% = 0
 80 - 99% = 0

 Index RDB$PRIMARY11 (0)
 Depth: 2, leaf bu