RE: [firebird-support] Securing database against corruption on systems that suddenly get turned off

2015-09-24 Thread Glenn Thomas Hvidsten g...@vensafe.no [firebird-support]
Forced writes are on.
I have not been able to recreate this kind of corruption locally so I don’t 
know what kind of errors are appearing. The message about corruption comes from 
a service technician in the field.
They usually do have a backup of the database, though, so it’s fortunately not 
a huge data loss.

Glenn Thomas Hvidsten

From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com]
Sent: 23. september 2015 22:24
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Securing database against corruption on systems 
that suddenly get turned off


On Mon, Sep 21, 2015 at 4:53 AM, Glenn Thomas Hvidsten 
g...@vensafe.no<mailto:g...@vensafe.no> [firebird-support] 
<firebird-support@yahoogroups.com<mailto:firebird-support@yahoogroups.com>> 
wrote:


We have FirebirdSQL (2.1) running on a client computer (Windows). This client 
has some problems with his power grid which causes the PC to suddenly and 
unexpectedly shut down in infrequent intervals (usually once or twice per day). 
Most of the time this doesn’t cause any problems, but once in a while this 
causes the database to be corrupted.
I’m not at all surprised that the database gets corrupted like this (as turning 
off a computer without shutting everything down gracefully can have that 
effect).


If you have turned off forced writes, corruption is likely.  If forced write is 
on, what are the errors you're seeing when the database is corrupted?  I'm not 
suggesting that you disregard advice about adding a UPS and make backups - 
excellent suggestions - but the Firebird architecture should survive a power 
failure if writes are being forced to disk in the correct order.  So I'm 
curious...

Good luck,

Ann



  Denne epost har blitt kontrollert for virus av Comendo Norge AS
This e-mail has been scanned for viruses by http://www.comendo.no



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



Re: [firebird-support] Securing database against corruption on systems that suddenly get turned off

2015-09-23 Thread Ann Harrison aharri...@ibphoenix.com [firebird-support]
On Mon, Sep 21, 2015 at 4:53 AM, Glenn Thomas Hvidsten g...@vensafe.no
[firebird-support]  wrote:

>
>
>
> We have FirebirdSQL (2.1) running on a client computer (Windows). This
> client has some problems with his power grid which causes the PC to
> suddenly and unexpectedly shut down in infrequent intervals (usually once
> or twice per day). Most of the time this doesn’t cause any problems, but
> once in a while this causes the database to be corrupted.
>
> I’m not at all surprised that the database gets corrupted like this (as
> turning off a computer without shutting everything down gracefully can have
> that effect).
>
>
If you have turned off forced writes, corruption is likely.  If forced
write is on, what are the errors you're seeing when the database is
corrupted?  I'm not suggesting that you disregard advice about adding a UPS
and make backups - excellent suggestions - but the Firebird architecture
should survive a power failure if writes are being forced to disk in the
correct order.  So I'm curious...

Good luck,

Ann


RE: [firebird-support] Securing database against corruption on systems that suddenly get turned off

2015-09-22 Thread Glenn Thomas Hvidsten g...@vensafe.no [firebird-support]
Thanks for all the suggestions so far.
We have already put some of our clients computers on UPS. I'm still interested 
in other settings we can enable (or disable) to make the database server more 
robust without having to add a UPS.

Glenn Thomas Hvidsten

From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com]
Sent: 21. september 2015 22:13
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] Securing database against corruption on systems 
that suddenly get turned off



At 11:34 p.m. 21/09/2015, Glenn Thomas Hvidsten g...@vensafe.no 
[firebird-support] wrote:
>Thanks for the link.
>Without specifically setting a new value, how can I check what setting is 
>currently in use?

In Firebird's ..\bin directory, in a shell, do

gstat -h path\to\database
Look at the Attributes near the bottom. If "Force Write" is there, then it is 
on. If not, then it is off.

I echo the advice to put that server on a UPS. I consider I have problems if 
the power goes out once a month! which it does here, on average, due to the 
apparent inability of the council and telecoms workers to read a cable map 
before attacking the environment with digging machinery.

I have servers running all versions of Firebird on both Windows and Linux. I 
have an Eton 3S 700 UPS to which two desktop machines are connected; also my 
external backup drives and the shared monitor. I get more than enough time off 
this rather small UPS to shut everything down gracefully.

For the old versions and new betas I use a menagerie of old-but-good Thnkpad 
notebooks with good batteries. I run them off the mains and run them down on a 
monthly cycle to preserve the batteries. When the power goes out, I have 
several hours' coverage, more than I need. I also have one notebook acting as a 
replication target (see http://www.ibphoenix.com/products/software/ibreplicator 
), which gives me a "hot backup" in case the source database[s] get corrupted 
by a power cut. To date, I haven't had any corrupted databases of my own.

I have one TP T43 running Linux that is a brilliant machine but the power jack 
is broken so I have to run it off a port replicator attached to the mains. I 
also have an old T42 whose cooling system is dead. So I use the T42 to charge 
the batteries for the T43 so that she always has a charged battery on board. 
The total cost of both of those machines, bought as "refurbs", was less than 
$100.

I feel it is bad enough that your customer doesn't care enough about his data 
to have the best UPS money can buy. But doesn't he care about hardware damage, 
either?

Helen Borrie, Support Consultant, IBPhoenix (Pacific)
Author of "The Firebird Book" and "The Firebird Book Second Edition"
http://www.firebird-books.net
__




  Denne epost har blitt kontrollert for virus av Comendo Norge AS
This e-mail has been scanned for viruses by http://www.comendo.no



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



Re: [firebird-support] Securing database against corruption on systems that suddenly get turned off

2015-09-22 Thread Lester Caine les...@lsces.co.uk [firebird-support]
On 22/09/15 10:31, Glenn Thomas Hvidsten g...@vensafe.no
[firebird-support] wrote:
> Thanks for all the suggestions so far.
> We have already put some of our clients computers on UPS. I'm still 
> interested in other settings we can enable (or disable) to make the database 
> server more robust without having to add a UPS.

This brings back a few memories from 20 years ago. Has a site that kept
loosing the whole days data after working perfectly during the day, and
printing off the reports. This was back in Interbase days ;) It took a
couple of weeks and a bit of luck to spot the cleaner pulling the plug
marked 'do not remove' so she could plug in her vacuum! She just reached
around the corner without even looking and pulled the first plug she
felt. Pigging annoying, and a hard wired supply was arranged, but why
did ALL the data go you should be asking? Windows was caching the writes
to disk and did not ACTUALLY write anything until the program was
closed! EVEN with 'forced writes' switched on. Forget which version of
windows now but probably W3.1. We added some extra code and started
closing the program after a report run and things were then stable
enough that one could pull the plug during the day and restart without
only an occasional corruption.

We moved most sites onto XP early on in it's life, and that just ran and
ran even with the occasional power loss. Would I trust modern windows to
be as reliable ... NO ... since moving to W7 sites all have at least one
problem a month even with UPS's! I've had to repair a database more than
once and have lost data so I think at least on Windows one is stuck with
the risk ...

-- 
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk






++

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/



Re: [firebird-support] Securing database against corruption on systems that suddenly get turned off

2015-09-21 Thread Christian Gütter n...@guetter.org [firebird-support]
Hi,
 
> We have FirebirdSQL (2.1) running on a client computer (Windows).
> This client has some problems with his power grid which causes the
> PC to suddenly and unexpectedly shut down in infrequent intervals
> (usually once or twice  per day). Most of the time this doesn’t
> cause any problems, but once in a while this causes the database to be 
> corrupted.
>  
> I’m not at all surprised that the database gets corrupted like this
> (as turning off a computer without shutting everything down gracefully can 
> have that effect).

you should at least turn on forced writes so that changes are written to the 
disk immediately (just in case you have not already done that).



Cheers,
Christian



RE: [firebird-support] Securing database against corruption on systems that suddenly get turned off

2015-09-21 Thread Glenn Thomas Hvidsten g...@vensafe.no [firebird-support]
Where do I find that setting?

Glenn Thomas Hvidsten

From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com]
Sent: 21. september 2015 13:21
To: Glenn Thomas Hvidsten g...@vensafe.no [firebird-support] 
<firebird-support@yahoogroups.com>
Subject: Re: [firebird-support] Securing database against corruption on systems 
that suddenly get turned off



Hi,

> We have FirebirdSQL (2.1) running on a client computer (Windows).
> This client has some problems with his power grid which causes the
> PC to suddenly and unexpectedly shut down in infrequent intervals
> (usually once or twice per day). Most of the time this doesn’t
> cause any problems, but once in a while this causes the database to be 
> corrupted.
>
> I’m not at all surprised that the database gets corrupted like this
> (as turning off a computer without shutting everything down gracefully can 
> have that effect).

you should at least turn on forced writes so that changes are written to the 
disk immediately (just in case you have not already done that).

Cheers,
Christian



  Denne epost har blitt kontrollert for virus av Comendo Norge AS
This e-mail has been scanned for viruses by http://www.comendo.no



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



RE: [firebird-support] Securing database against corruption on systems that suddenly get turned off

2015-09-21 Thread Glenn Thomas Hvidsten g...@vensafe.no [firebird-support]
Thanks for the link.
Without specifically setting a new value, how can I check what setting is 
currently in use?

Glenn Thomas Hvidsten

From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com]
Sent: 21. september 2015 13:29
To: Glenn Thomas Hvidsten g...@vensafe.no [firebird-support] 
<firebird-support@yahoogroups.com>
Subject: Re: [firebird-support] Securing database against corruption on systems 
that suddenly get turned off



Hey,

>> you should at least turn on forced writes so that changes are
>> written to the disk immediately (just in case you have not already done 
>> that).

> Where do I find that setting?

If you do not know where to find the setting, forced writes are
probably on, as this is the default setting of Firebird IIRC.

If you want to find out, check this:
http://www.firebirdsql.org/manual/gfix-sync.html

Cheers,
Christian




  Denne epost har blitt kontrollert for virus av Comendo Norge AS
This e-mail has been scanned for viruses by http://www.comendo.no



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



Re: [firebird-support] Securing database against corruption on systems that suddenly get turned off

2015-09-21 Thread Alexey Kovyazin a...@ib-aid.com [firebird-support]

Hi,

In addition to FW On and UPS, I suggest to look at our tool FBDataGuard 
(http://ib-aid.com/en/fbdataguard), which is specifically designed to 
protect databases against corruptions (among other features).
FBDataGuard stores a copy of raw metadata in the repository outside 
database, and if corruption happens, this repository will be used to 
recover database with our recovery tool (FirstAID). In our experience 
such approach increases chances to recover up to 99%.


Regards,
Alexey Kovyazin
IBSurgeon





Hi,

We have FirebirdSQL (2.1) running on a client computer (Windows). This 
client has some problems with his power grid which causes the PC to 
suddenly and unexpectedly shut down in infrequent intervals (usually 
once or twice per day). Most of the time this doesn’t cause any 
problems, but once in a while this causes the database to be corrupted.


I’m not at all surprised that the database gets corrupted like this 
(as turning off a computer without shutting everything down gracefully 
can have that effect).


Are there any options available that can make a database more sturdy 
against these kinds of corruptions?


Cheers

Glenn Thomas


Denne epost har blitt kontrollert for virus av Comendo Norge AS 

This e-mail has been scanned for viruses by Comendo Norge AS 








Re: [firebird-support] Securing database against corruption on systems that suddenly get turned off

2015-09-21 Thread Christian Gütter n...@guetter.org [firebird-support]

Hey,

>> you should at least turn on forced writes so that changes are
>> written to the disk immediately (just in case you have not already done 
>> that).

> Where do I find that setting?

If  you  do  not  know  where  to  find the setting, forced writes are
probably on, as this is the default setting of Firebird IIRC.

If you want to find out, check this:
http://www.firebirdsql.org/manual/gfix-sync.html



Cheers,
Christian



Re: [firebird-support] Securing database against corruption on systems that suddenly get turned off

2015-09-21 Thread Kevin Meyers kevinjmey...@gmail.com [firebird-support]
Glenn,

My suggestion is to connect the computer in question to an Uninterruptable
Power Supply (UPS), which contains a battery as a power backup. When it
senses a complete power loss (blackout), an undervolt (brownout), or an
overvolt it immediately switches the source of power for your computer from
the wall outlet to the battery. One power is restored, the UPS switches
back to the wall outlet AC and recharges the battery.

Most units except for the smallest ones come with a USB cable and software
to connect to the computer so that if it using the battery and the battery
drains it instructs your computer to perform a Shutdown. This would give
you the "soft landing" to avoid the corruption you are encountering.

With mine I find that sometimes the momentary loss of power is so short
that I don't even notice it, but the UPS does as I hear it click on for few
seconds. I'm glad the UPS catches them, because I'm sure my PC notices them.

Hope this helps.

Regards,

Kevin Meyers

On Mon, Sep 21, 2015 at 4:53 AM, Glenn Thomas Hvidsten g...@vensafe.no
[firebird-support]  wrote:

>
>
> Hi,
>
>
>
> We have FirebirdSQL (2.1) running on a client computer (Windows). This
> client has some problems with his power grid which causes the PC to
> suddenly and unexpectedly shut down in infrequent intervals (usually once
> or twice per day). Most of the time this doesn’t cause any problems, but
> once in a while this causes the database to be corrupted.
>
> I’m not at all surprised that the database gets corrupted like this (as
> turning off a computer without shutting everything down gracefully can have
> that effect).
>
>
>
> Are there any options available that can make a database more sturdy
> against these kinds of corruptions?
>
>
>
>
>
> Cheers
>
>
>
> Glenn Thomas
> --
> Denne epost har blitt kontrollert for virus av Comendo Norge AS
> 
> This e-mail has been scanned for viruses by Comendo Norge AS
> 
> --
>
> 
>


[firebird-support] Securing database against corruption on systems that suddenly get turned off

2015-09-21 Thread Glenn Thomas Hvidsten g...@vensafe.no [firebird-support]
Hi,

We have FirebirdSQL (2.1) running on a client computer (Windows). This client 
has some problems with his power grid which causes the PC to suddenly and 
unexpectedly shut down in infrequent intervals (usually once or twice per day). 
Most of the time this doesn't cause any problems, but once in a while this 
causes the database to be corrupted.
I'm not at all surprised that the database gets corrupted like this (as turning 
off a computer without shutting everything down gracefully can have that 
effect).

Are there any options available that can make a database more sturdy against 
these kinds of corruptions?


Cheers

Glenn Thomas



  Denne epost har blitt kontrollert for virus av Comendo Norge AS
This e-mail has been scanned for viruses by http://www.comendo.no



RE: [firebird-support] Securing database against corruption on systems that suddenly get turned off

2015-09-21 Thread Helen Borrie hele...@iinet.net.au [firebird-support]
At 11:34 p.m. 21/09/2015, Glenn Thomas Hvidsten g...@vensafe.no 
[firebird-support] wrote:
>Thanks for the link.
>Without specifically setting a new value, how can I check what setting is 
>currently in use?

In Firebird's ..\bin directory, in a shell, do

gstat -h path\to\database
Look at the Attributes near the bottom.  If "Force Write" is there, then it is 
on.  If not, then it is off.

I echo the advice to put that server on a UPS.  I consider I have problems if 
the power goes out once a month!  which it does here, on average, due to the 
apparent inability of the council and telecoms workers to read a cable map 
before attacking the environment with digging machinery.

I have servers running all versions of Firebird on both Windows and Linux. I 
have an Eton 3S 700 UPS to which two desktop machines are connected; also my 
external backup drives and the shared monitor. I get more than enough time off 
this rather small UPS to shut everything down gracefully.

For the old versions and new betas I use a menagerie of old-but-good Thnkpad 
notebooks with good batteries.  I run them off the mains and run them down on a 
monthly cycle to preserve the batteries.  When the power goes out, I have 
several hours' coverage, more than I need.  I also have one notebook acting as 
a replication target (see 
http://www.ibphoenix.com/products/software/ibreplicator ), which gives me a 
"hot backup" in case the source database[s] get corrupted by a power cut.  To 
date, I haven't had any corrupted databases of my own.

I have one TP T43 running Linux that is a brilliant machine but the power jack 
is broken so I have to run it off a port replicator attached to the mains.  I 
also have an old T42 whose cooling system is dead.  So I use the T42 to charge 
the batteries for the T43 so that she always has a charged battery on board.  
The total cost of both of those machines, bought as "refurbs", was less than 
$100.

I feel it is bad enough that your customer doesn't care enough about his data 
to have the best UPS money can buy.  But doesn't he care about hardware damage, 
either?


Helen Borrie, Support Consultant, IBPhoenix (Pacific)
Author of "The Firebird Book" and "The Firebird Book Second Edition"
http://www.firebird-books.net
__