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 [firebird-support] 
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-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-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] 

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

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] Firebird Embedded on web hosting

2015-09-21 Thread Glenn Thomas Hvidsten g...@vensafe.no [firebird-support]
If the computer loses power (and is turned off) when Firebird is writing to the 
database, the database may become corrupt.
Are there any firebird settings that can make it so that there is a smaller 
chance of database corruption?

Glenn Thomas Hvidsten

From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com]
Sent: 21. september 2015 11:57
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Firebird Embedded on web hosting



sorry but i didn't understand your point ... can you explain more please ?


anyway, since i cannot control where fbembedded put it's lock and trace files, 
my only option now is to build firebird from source and change the directory by 
hand .



  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]



[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



SV: [firebird-support] Re: Database shutdown leaves connections

2015-02-10 Thread Glenn Thomas Hvidsten g...@vensafe.no [firebird-support]
> > And by using the following command the database seems to be shut down:
> >
> > gfix -user SYSDBA -pas masterkey -shut full -force 0 C:\Database\MyDB.fdb
> >
> >
> > Why isn’t this command working properly and what can I do to shut down
> > the database so that I can rename it (in order to restore a backup).
> >
> Prior ro v2.5, database shutdown is not expected to "unlock" the
> database at the filesystem level. It just interrupts any activity but
> user sessions may remain connected.


Any tips on what I can do instead of this command, like SQL or other commands, 
to ensure the database is shut down so that I can move/rename the database file?

I know I can shut everything down by stopping the Windows service, but I'd 
rather not do that to the other databases running.


Glenn Thomas Hvidsten

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







++

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

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

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



[firebird-support] Database shutdown leaves connections

2015-02-10 Thread Glenn Thomas Hvidsten g...@vensafe.no [firebird-support]
I'm having problems shutting down a databases on the server.

I have followed the instructions in the documentation: 
http://www.firebirdsql.org/manual/gfix-dbstartstop.html

And by using the following command the database seems to be shut down:

gfix -user SYSDBA -pas masterkey -shut full -force 0 C:\Database\MyDB.fdb

This works to some degree as I can't connect to the database (using DB 
Workbench), but the shutdown still leaves "something" hanging as the file is 
still in use and I can neither move nor rename it.
Why isn't this command working properly and what can I do to shut down the 
database so that I can rename it (in order to restore a backup).

This is Firebird 2.1 on a Windows server with the default installation 
parameters.


Sincerely

Glenn Thomas Hvidsten



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