dbTalk Databases Forums  

Crash Recovery ?

comp.databases.ibm-db2 comp.databases.ibm-db2


Discuss Crash Recovery ? in the comp.databases.ibm-db2 forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
shorti
 
Posts: n/a

Default Crash Recovery ? - 02-17-2011 , 03:42 PM






Hello, DB2 V9.7

Is there a way to tell (db2 call) whether crash recovery is running or
is needed without trying to capture the data from the db2diag.log? I
want to automate a check in case it will take some time to start the
instance and connect to a database. Maybe something that can be
accessed in a system table that marks the database as needing
recovery. Of course, we would need to be able to get to it during
crash recovery so if it is also affected by the crash then it wont do
us any good.

Thanks.

Reply With Quote
  #2  
Old   
Helmut Tessarek
 
Posts: n/a

Default Re: Crash Recovery ? - 02-17-2011 , 07:37 PM






Quote:
Is there a way to tell (db2 call) whether crash recovery is running or
is needed without trying to capture the data from the db2diag.log? I
want to automate a check in case it will take some time to start the
instance and connect to a database. Maybe something that can be
accessed in a system table that marks the database as needing
recovery. Of course, we would need to be able to get to it during
crash recovery so if it is also affected by the crash then it wont do
us any good.
No, there is no db2 call to get this information.

During crash recovery you cannot connect to the database, since the engine is
rolling back and/or committing transactions to get to a consistent point
again. This is also true for the system tables.

As soon as the database requires crash recovery, a connect is not possible
anymore.

According to your statement, I assume that you are using AUTORESTART ON.
Otherwise you would get a message that crash recovery is needed, when you try
to connect.

You can use db2pd -db <dbname> -recovery to see the progress of the recovery
and which type of recovery is being performed. http://j.mp/icMce8

--
Helmut K. C. Tessarek
DB2 Performance and Development
IBM Toronto Lab

Reply With Quote
  #3  
Old   
Bruce
 
Posts: n/a

Default Re: Crash Recovery ? - 04-06-2011 , 06:52 AM



On Feb 17, 9:37*pm, Helmut Tessarek <tessa... (AT) evermeet (DOT) cx> wrote:
Quote:
Is there a way to tell (db2 call) whether crash recovery is running or
is needed without trying to capture the data from the db2diag.log? *I
want to automate a check in case it will take some time to start the
instance and connect to a database. *Maybe something that can be
accessed in a system table that marks the database as needing
recovery. *Of course, we would need to be able to get to it during
crash recovery so if it is also affected by the crash then it wont do
us any good.

No, there is no db2 call to get this information.

During crash recovery you cannot connect to the database, since the engine is
rolling back and/or committing transactions to get to a consistent point
again. This is also true for the system tables.

As soon as the database requires crash recovery, a connect is not possible
anymore.

According to your statement, I assume that you are using AUTORESTART ON.
Otherwise you would get a message that crash recovery is needed, when youtry
to connect.

You can use db2pd -db <dbname> -recovery to see the progress of the recovery
and which type of recovery is being performed.http://j.mp/icMce8

--
Helmut K. C. Tessarek
DB2 Performance and Development
IBM Toronto Lab
We just look at the db2diag.log file...we loop doing a 'sleep' until
it finishes...works really good too.

Reply With Quote
  #4  
Old   
Frederik Engelen
 
Posts: n/a

Default Re: Crash Recovery ? - 04-06-2011 , 12:39 PM



On Apr 6, 1:52*pm, Bruce <bwmille... (AT) gmail (DOT) com> wrote:
Quote:
On Feb 17, 9:37*pm, Helmut Tessarek <tessa... (AT) evermeet (DOT) cx> wrote:





Is there a way to tell (db2 call) whether crash recovery is running or
is needed without trying to capture the data from the db2diag.log? *I
want to automate a check in case it will take some time to start the
instance and connect to a database. *Maybe something that can be
accessed in a system table that marks the database as needing
recovery. *Of course, we would need to be able to get to it during
crash recovery so if it is also affected by the crash then it wont do
us any good.

No, there is no db2 call to get this information.

During crash recovery you cannot connect to the database, since the engine is
rolling back and/or committing transactions to get to a consistent point
again. This is also true for the system tables.

As soon as the database requires crash recovery, a connect is not possible
anymore.

According to your statement, I assume that you are using AUTORESTART ON..
Otherwise you would get a message that crash recovery is needed, when you try
to connect.

You can use db2pd -db <dbname> -recovery to see the progress of the recovery
and which type of recovery is being performed.http://j.mp/icMce8

--
Helmut K. C. Tessarek
DB2 Performance and Development
IBM Toronto Lab

We just look at the db2diag.log file...we loop doing a 'sleep' until
it finishes...works really good too.
"db2 list utilities show detail" works well too...

--
Frederik Engelen

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.