![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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. |
#3
| |||
| |||
|
|
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 |
#4
| |||
| |||
|
|
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. |
![]() |
| Thread Tools | |
| Display Modes | |
| |