Subject | Re: Fixing Database |
---|---|
Author | salisburyproject |
Post date | 2005-03-12T12:06:26Z |
Helen,
there is one big wrong assumption in your post: there was NOT power
outage in my case. Neither any error, returned by the application or
the DB engine. Just running the application second time I got this
message (after writing many, many records to the DB). Then checked
with isql - the same. The PC never went down, rebooted, crashed or
anything else like this. The DB connection was properly closed. I
said 'supposed' only to discuss such a case - I need to provide a
reliable application, so I explore all cases.
About open-source... I am involved in 3 open source projects, and,
no, this is not free beer. I guess (wrong again?) that open source
software is driven by the will of people to share and provide others
with the fruits of their experience and knowledge. But there is
something totally wrong behind the concept "get the software for
free, but you must pay for support". Of course, there is sometime
need for such support, but even for a DB maintenance?... DB
maintenance should be part of a DB software. From my point of view,
of course.
About Windows... Hey, there are CUSTOMERS and bosses out there - they
decide what to run the software on. If FB doesn't work well on
Windows... well, don't advertise it does so.
I was asking for help and advice. This is what forums and news groups
are for - support and collaboration. Between colleagues and
professionals. Anyway, may be this thread will be useful for me from
another perspective.
BTW: Is Force Writes enabled by default? I never changed this option.
Cheers (with a beer, yes! :) )
Kiril.
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>
wrote:
there is one big wrong assumption in your post: there was NOT power
outage in my case. Neither any error, returned by the application or
the DB engine. Just running the application second time I got this
message (after writing many, many records to the DB). Then checked
with isql - the same. The PC never went down, rebooted, crashed or
anything else like this. The DB connection was properly closed. I
said 'supposed' only to discuss such a case - I need to provide a
reliable application, so I explore all cases.
About open-source... I am involved in 3 open source projects, and,
no, this is not free beer. I guess (wrong again?) that open source
software is driven by the will of people to share and provide others
with the fruits of their experience and knowledge. But there is
something totally wrong behind the concept "get the software for
free, but you must pay for support". Of course, there is sometime
need for such support, but even for a DB maintenance?... DB
maintenance should be part of a DB software. From my point of view,
of course.
About Windows... Hey, there are CUSTOMERS and bosses out there - they
decide what to run the software on. If FB doesn't work well on
Windows... well, don't advertise it does so.
I was asking for help and advice. This is what forums and news groups
are for - support and collaboration. Between colleagues and
professionals. Anyway, may be this thread will be useful for me from
another perspective.
BTW: Is Force Writes enabled by default? I never changed this option.
Cheers (with a beer, yes! :) )
Kiril.
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>
wrote:
> At 01:08 AM 12/03/2005 +0000, you wrote:the
>
>
> >Well,
> >
> >thanks and.. excuse me for insisting on this:
> >Is it true that if I don't get the paid support from the site you
> >mention, there is no tool that can help me recover the database?..
>
> That is true. The IBFirstAid tool can be quite helpful in finding
> places affected by this type of corruption, though.full of
>
>
> >If so, the whole idea of open source and free DB solution is
> >meaningless..
>
> How do *you* define "open source"?
>
> What does "free" mean to you? Free beer for everyone? A world
> volunteers just waiting to rescue you, at no cost, from the messesthat you
> got yourself into by ignoring advice?to decide
>
>
> >Forced writes are may be secure and ensure data consistency in such
> >cases,
>
> Not "maybe" - disabling forced writes on any Windows platform is
> hari-kari. Data consistency happens as the result of writes to the
> database. If you insist on allowing the Windows operating system
> when or IF these writes occur, then you play Russian Roulette.You'd
> better be pretty darned sure that nobody is going to do anything towipe
> out that OS cache by disconnecting the power or corrupting theserver's memory.
>it
> If you keep FW on, then control of the database disk state is where
> should be: the server engine decides when it needs a page writtento
> disk. The worst that happens then, when a power abruption happens,is that
> a page that was being written to was lost. Gfix will find thiskind of
> corruption and will be able to restore your database to a usablestate.
>operation,
> >but you pay in performance.
>
> That's a delusion. Some tasks might go faster if FW are disabled
> temporarily; but all writes must happen eventually. For normal
> when hosting the server on Windows, there is no gain in performancethat
> could hope to outweigh the risk that, sooner or later, Windows OScaching
> is gonna burn you. In an environment as precarious as yours, itwill be
> sooner, rather than later.Basic
>
> >The DB should be capable to
> >recover valid records and inform what records/pages are lost..
> >requirement from a database, I guess...prevent
>
> You guess wrong. The DB cannot recover what it never had. If you
> data state changes from being written to the disk, or if youoverrule the
> database server's control over what gets written and when, thenwhat is
> there to recover if you kill the OS cache?is
>
>
> >The physical file is still there. So there MUST be some tool that
> >capable to 'walk' it, analyze and fix - for instance gfix does sostate'.
> >with the -i option. If the checksum is 'fake', then DBA must be
> >capable to decide to rollback the DB to the 'last known safe
> >Even for the price of loosing open transactions, but not the ENTIREfrom
> >data.
>
> Which is what *does* happen, if you have not prevented the engine
> doing what it's meant to do. The DBA doesn't have to "decide"anything,
> normally. Just flash up and go. Normal GC will take care ofuncommitted
> work. In the rare instance when some abruption caught the enginein the
> middle of a write operation, a page might end up out of whack andthe
> engine will report a corruption. This kind of corruption can bebypassed
> using gfix. But gfix can't detect or fix breakages caused by theOS
> failing to write to disk. (Nor can it repair a database where disksurface
> damage has occurred since the page was originally written - anothervery
> strong reason to protect the power supply!!)had
>
>
> >Am I wrong assuming that FB doesn't support this? (Hope I am!)
>
> You do seem to be making a lot of wrong assumptions....even if FB
> write-ahead logging (which it doesn't, since it relies on recordversioning
> technology to ensure a sound fallback state) you are dreaming ifyou
> believe that you can disable database writes AND somehow get logentries,
> state changes, or anything, written to disk.server with
>
> The most faulty of your assumptions is that running a database
> its disk-write capability switched off is a desirable mode forregular
> use. While FW-off is there for temporary use for the odd hugebatch job,
> it is not recommended for *any* environment that is not power-safe. Under
> these conditions, "Absolute power-off corrupts absolutely."you have
>
> If you have no choice but to run database servers on Windows, and
> an environment where there is no power backup and people areallowed to go
> around pulling plugs on servers, then FORGET about asynchronouswrites.
>flushes
> Why point the bone at Windows? Because, by default, Windows NEVER
> its cache until the database file is closed. Before Fb 1.5, a 24/7From Fb
> operation with FW off was a simply a disaster waiting to happen.
> 1.5 on, you can configure the frequency with which the OS cache isflushed
> and hope that it happens.to
>
> Even with this capability, myself, I would not trust a Windows OS
> perform flushes on schedule **until and unless** I had tested andproved
> beyond doubt that it would happen according to configuration AND inthe
> exact operational environment where my databases were beingaccessed. From
> my (often bitter) experience, there are just *too* many things inWindows
> that don't work as designed, because of undocumented sensitivitiesto other
> things happening in the OS.
>
> ./heLen