vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I am not sure how to deal with the following scenario. Let's suppose: A database SAMPLE is in archive log mode. All log files from S0000000.LOG to S0000010.LOG are stored in one path, S0000008.LOG to S0000010.LOG are active log files currently, the others are archive log files. We have a complete backup image. The database is offline due to suddenly power cut, after that, the database can not start again and we find some error info, such as "Log File cannot be used due to disk error". The file system is ok and just some of active log files become unavailable. My question is: In this case, I usually recover and rollforward database. How to find which log file is unavailable and identify the rollforward timestamp? Thanks in advance! James |
| |||
| i don't know exactly where to look for the timestamp, but the logfile name can get retrieved using db2 "get db cfg for <database>". The relevant entry may look like: First active log file = S0004310.LOG Maybe the db2diag.log may have some useful clues. regards, dotyet On Jun 13, 5:03 am, James <huyu...@gmail.com> wrote: > I am not sure how to deal with the following scenario. > > Let's suppose: > A database SAMPLE is in archive log mode. All log files from > S0000000.LOG to S0000010.LOG are stored in one path, S0000008.LOG to > S0000010.LOG are active log files currently, the others are archive > log files. We have a complete backup image. > > The database is offline due to suddenly power cut, after that, the > database can not start again and we find some error info, such as "Log > File cannot be used due to disk error". The file system is ok and just > some of active log files become unavailable. > > My question is: > In this case, I usually recover and rollforward database. How to find > which log file is unavailable and identify the rollforward timestamp? > > Thanks in advance! > > James |
| |||
| On Jun 14, 1:26 am, dotyet <dot...@yahoo.com> wrote: > i don't know exactly where to look for the timestamp, but the logfile > name can get retrieved using db2 "get db cfg for <database>". The > relevant entry may look like: > > First active log file = S0004310.LOG > > Maybe the db2diag.log may have some useful clues. > > regards, > dotyet > > On Jun 13, 5:03 am, James <huyu...@gmail.com> wrote: > > > I am not sure how to deal with the following scenario. > > > Let's suppose: > > A database SAMPLE is in archive log mode. All log files from > > S0000000.LOG to S0000010.LOG are stored in one path, S0000008.LOG to > > S0000010.LOG are active log files currently, the others are archive > > log files. We have a complete backup image. > > > The database is offline due to suddenly power cut, after that, the > > database can not start again and we find some error info, such as "Log > > File cannot be used due to disk error". The file system is ok and just > > some of active log files become unavailable. > > > My question is: > > In this case, I usually recover and rollforward database. How to find > > which log file is unavailable and identify the rollforward timestamp? > > > Thanks in advance! > > > James I mean if the active logs are deleted or unavailable and there is no backup image, how to recovery database except using RESTORE utility? Is there any tool that can do this function? How will you do if you meet this case? thanks so much James |
| |||
| well, in such a case you have 2 options: Go to IBM support and ask them to reset your SQL Log information in the core engine.... I have heard that they send you a utility of some sort which does that. Execute DB2DART and extract all the data from the database's pages. You can extract the data in formats like tab-delimited or hex etc. look at the manual for the same. DB2DART is the tool which is used to check the physical and logical structure of the database. (Unfortunately, I have never had an opportunity to use it in a fire ;P ) regards, dotyet On Jun 14, 8:51 pm, James <huyu...@gmail.com> wrote: > On Jun 14, 1:26 am, dotyet <dot...@yahoo.com> wrote: > > > > > i don't know exactly where to look for the timestamp, but the logfile > > name can get retrieved using db2 "get db cfg for <database>". The > > relevant entry may look like: > > > First active log file = S0004310.LOG > > > Maybe the db2diag.log may have some useful clues. > > > regards, > > dotyet > > > On Jun 13, 5:03 am, James <huyu...@gmail.com> wrote: > > > > I am not sure how to deal with the following scenario. > > > > Let's suppose: > > > A database SAMPLE is in archive log mode. All log files from > > > S0000000.LOG to S0000010.LOG are stored in one path, S0000008.LOG to > > > S0000010.LOG are active log files currently, the others are archive > > > log files. We have a complete backup image. > > > > The database is offline due to suddenly power cut, after that, the > > > database can not start again and we find some error info, such as "Log > > > File cannot be used due to disk error". The file system is ok and just > > > some of active log files become unavailable. > > > > My question is: > > > In this case, I usually recover and rollforward database. How to find > > > which log file is unavailable and identify the rollforward timestamp? > > > > Thanks in advance! > > > > James > > I mean if the active logs are deleted or unavailable and there is no > backup image, how to recovery database except using RESTORE utility? > Is there any tool that can do this function? How will you do if you > meet this case? > > thanks so much > > James |
| |||
| On Jun 15, 10:06 pm, dotyet <dot...@yahoo.com> wrote: > well, in such a case you have 2 options: > > Go to IBM support and ask them to reset your SQL Log information in > the core engine.... I have heard that they send you a utility of some > sort which does that. > > Execute DB2DART and extract all the data from the database's pages. > You can extract the data in formats like tab-delimited or hex etc. > look at the manual for the same. DB2DART is the tool which is used to > check the physical and logical structure of the database. > (Unfortunately, I have never had an opportunity to use it in a > fire ;P ) > > regards, > dotyet > > On Jun 14, 8:51 pm, James <huyu...@gmail.com> wrote: > > > On Jun 14, 1:26 am, dotyet <dot...@yahoo.com> wrote: > > > > i don't know exactly where to look for the timestamp, but the logfile > > > name can get retrieved using db2 "get db cfg for <database>". The > > > relevant entry may look like: > > > > First active log file = S0004310.LOG > > > > Maybe the db2diag.log may have some useful clues. > > > > regards, > > > dotyet > > > > On Jun 13, 5:03 am, James <huyu...@gmail.com> wrote: > > > > > I am not sure how to deal with the following scenario. > > > > > Let's suppose: > > > > A database SAMPLE is in archive log mode. All log files from > > > > S0000000.LOG to S0000010.LOG are stored in one path, S0000008.LOG to > > > > S0000010.LOG are active log files currently, the others are archive > > > > log files. We have a complete backup image. > > > > > The database is offline due to suddenly power cut, after that, the > > > > database can not start again and we find some error info, such as "Log > > > > File cannot be used due to disk error". The file system is ok and just > > > > some of active log files become unavailable. > > > > > My question is: > > > > In this case, I usually recover and rollforward database. How to find > > > > which log file is unavailable and identify the rollforward timestamp? > > > > > Thanks in advance! > > > > > James > > > I mean if the active logs are deleted or unavailable and there is no > > backup image, how to recovery database except using RESTORE utility? > > Is there any tool that can do this function? How will you do if you > > meet this case? > > > thanks so much > > > James Do you know the name of utility which can reset SQL Log information? Thanks. James |
| ||||
| On Jun 16, 6:02 am, James <huyu...@gmail.com> wrote: > On Jun 15, 10:06 pm, dotyet <dot...@yahoo.com> wrote: > > > > > > > well, in such a case you have 2 options: > > > Go to IBM support and ask them to reset your SQL Log information in > > the core engine.... I have heard that they send you a utility of some > > sort which does that. > > > Execute DB2DART and extract all the data from the database's pages. > > You can extract the data in formats like tab-delimited or hex etc. > > look at the manual for the same. DB2DART is the tool which is used to > > check the physical and logical structure of the database. > > (Unfortunately, I have never had an opportunity to use it in a > > fire ;P ) > > > regards, > > dotyet > > > On Jun 14, 8:51 pm, James <huyu...@gmail.com> wrote: > > > > On Jun 14, 1:26 am, dotyet <dot...@yahoo.com> wrote: > > > > > i don't know exactly where to look for the timestamp, but the logfile > > > > name can get retrieved using db2 "get db cfg for <database>". The > > > > relevant entry may look like: > > > > > First active log file = S0004310.LOG > > > > > Maybe the db2diag.log may have some useful clues. > > > > > regards, > > > > dotyet > > > > > On Jun 13, 5:03 am, James <huyu...@gmail.com> wrote: > > > > > > I am not sure how to deal with the following scenario. > > > > > > Let's suppose: > > > > > A database SAMPLE is in archive log mode. All log files from > > > > > S0000000.LOG to S0000010.LOG are stored in one path, S0000008.LOG to > > > > > S0000010.LOG are active log files currently, the others are archive > > > > > log files. We have a complete backup image. > > > > > > The database is offline due to suddenly power cut, after that, the > > > > > database can not start again and we find some error info, such as "Log > > > > > File cannot be used due to disk error". The file system is ok and just > > > > > some of active log files become unavailable. > > > > > > My question is: > > > > > In this case, I usually recover and rollforward database. How to find > > > > > which log file is unavailable and identify the rollforward timestamp? > > > > > > Thanks in advance! > > > > > > James > > > > I mean if the active logs are deleted or unavailable and there is no > > > backup image, how to recovery database except using RESTORE utility? > > > Is there any tool that can do this function? How will you do if you > > > meet this case? > > > > thanks so much > > > > James > > Do you know the name of utility which can reset SQL Log information? > Thanks. > James- Hide quoted text - > > - Show quoted text - db2 rollforward db <dbname> query status gives you the last committed transaction... with this u can know till which point u need to rollforward.. |