Discussion:
unavailable database
André Knappstein
2013-01-09 13:49:43 UTC
Permalink
In case somebody's just reading by and has a clue, don't hold back :-)

For the first time since working with Firebird I'm probably about
losing data.

Here's what I did to successfully break my precious:
- shutdown -f while 1 one user who told he's not working was in fact
still working with the database
- starting a backup which was expected to run some 7 minutes
- terminated the process after some 30 minutes (no CPU usage of
gBak.exe for more than 20 minutes)

Now an ODBC connection test works fine.
Connecting via Jiri's .net provider times out (CPU 50% for 2++ minutes)
Connecting via IBExpert times out (CPU 50% for 2++ minutes)
From 6 databases on that server, only 1 is making trouble.
I made a file copy of the offending file to C:\Current.fdb.

gfix -v -n C:\Current.fdb
results in "unavailable database" (user&pw supplied...)

gfix -v -n localhost:C:\Current.fdb
results in a new child process fb_inet_server.exe at 50% for a short
time (~2 seconds), a new blank line in the command window.

gbak -b -v C:\Current.fdb C:\Current.fbk
results in "unavailable database"

gbak -b -v localhost:C:\Current.fdb C:\Current.fbk
a new process gbak.exe with constantly 0%, a new file "C:\Current.fbk"
with 0 bytes, a new child process fb_inet_server.exe at 50% for a
loooooong time, some update to the database, because c:\current.fdb
gets a new file-timestamp.

ouput says:
"readied database... "
"creating file ... "
"starting transaction"

nothing more happens.

How would I best go about trying to fix this?

I have a good backup which is 4 hours old. There are worse things in
the world than having to revert back to that, but if possible I'd try
to restore this one.

FB 1.5 Classic Server on W2K3


TIA André



------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

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-***@yahoogroups.com
firebird-support-***@yahoogroups.com

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

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
André Knappstein
2013-01-09 14:19:43 UTC
Permalink
Post by André Knappstein
How would I best go about trying to fix this?
I forgot some things:
- of course I brought the database online again after backup first
failed.
- users are logging in with explicit usernames and roles. nobody and
no software is using SYSDBA besides me
- database only has 1 file (no limbo problems)

gfix -v -full reports "Number of record level errors: 1"

so does "gfix -m ... ", "gfix -m -i ...", "gfix -m -full -i ..."

after executing all possible combinations of "gfix -m", "gfix -v"
still reports "Number of record level errors: 1", and "gbak -b -g
-i -v ..." still does not get over "starting transaction".




------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

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-***@yahoogroups.com
firebird-support-***@yahoogroups.com

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

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
Mark Rotteveel
2013-01-09 14:23:26 UTC
Permalink
On Wed, 9 Jan 2013 15:19:43 +0100, André Knappstein
Post by André Knappstein
- database only has 1 file (no limbo problems)
A single database file can have limbo transactions, I assume you are
referring to shadow problems instead.

Mark
André Knappstein
2013-01-09 14:29:36 UTC
Permalink
Oh, I expressed that wrong, I think.
What I really meant was "(so, no problems with distributed files) and
also non with limbo transactions.

I am not using shadows nor 2-phase transactions.
Post by Mark Rotteveel
On Wed, 9 Jan 2013 15:19:43 +0100, André Knappstein
Post by André Knappstein
- database only has 1 file (no limbo problems)
A single database file can have limbo transactions, I assume you are
referring to shadow problems instead.
Mark
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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
mit freundlichen GrÌßen,

André Knappstein
EDV und Controlling
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
beta Eigenheim- und GrundstÃŒcksverwertungsgesellschaft mbH
Hafenweg 4
59192 Bergkamen-RÃŒnthe

Telefon: +49 2389 9240 140
Telefax: +49 2389 9240 150
e-mail: ***@beta-eigenheim.de

Amtsgericht Hamm Nr. B 420
GeschÀftsfÌhrer: Achim KrÀhling, Dirk Salewski und Matthias Steinhaus

USt-IDNr.: DE 125215402
André Knappstein
2013-01-09 15:22:07 UTC
Permalink
Post by André Knappstein
after executing all possible combinations of "gfix -m", "gfix -v"
still reports "Number of record level errors: 1", and "gbak -b -g
-i -v ..." still does not get over "starting transaction".
I don't have any idea what happened, but suddenly the backup *did*
work. This completely toils my understanding of why - after a clean
reboot of the server and all users disconnected - a command would at
first not work, but then suddenly would when just trying often enough.

So, I made a backup, restored that to a new database, and this one
seems to work so far. I hope there are no hidden surprises.





------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

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-***@yahoogroups.com
firebird-support-***@yahoogroups.com

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

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
Alexandre Benson Smith
2013-01-09 19:46:28 UTC
Permalink
Post by André Knappstein
Post by André Knappstein
after executing all possible combinations of "gfix -m", "gfix -v"
still reports "Number of record level errors: 1", and "gbak -b -g
-i -v ..." still does not get over "starting transaction".
I don't have any idea what happened, but suddenly the backup *did*
work. This completely toils my understanding of why - after a clean
reboot of the server and all users disconnected - a command would at
first not work, but then suddenly would when just trying often enough.
So, I made a backup, restored that to a new database, and this one
seems to work so far. I hope there are no hidden surprises.
Garbage Collection ?

When a database is broken, the first thing to try to make a back-up is
to use -g option, to avoid garbage collection, sometimes the problems
resides on versions that are not needed to complete the back-up.

see you !


------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

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-***@yahoogroups.com
firebird-support-***@yahoogroups.com

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

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
Ann Harrison
2013-01-09 16:28:00 UTC
Permalink
On Wed, Jan 9, 2013 at 9:19 AM, André Knappstein <
Post by André Knappstein
- database only has 1 file (no limbo problems)
Having nothing to do with your problem - which I'm thinking about - but to
clarify a misunderstanding. Limbo transactions are the result of an
incomplete two phase commit and have nothing to do with multi-file or even
shadowed databases. The application has to initiate a two phase commit
with a call to PREPARE. Normally that's done to coordinate updates in
different databases, but it can also be done to coordinate a database
commit with some other activity that does not have the ability to rollback.

Good luck,

Ann
[Non-text portions of this message have been removed]
Aage Johansen
2013-01-09 20:18:15 UTC
Permalink
Post by André Knappstein
In case somebody's just reading by and has a clue, don't hold back :-)
I'm reading, but have no clue!

Anyway, did you consider this: http://www.ib-aid.com/downloads/


Best of luck
Aage J.

Loading...