Dear all,
happy new year ;o)
I have a question regarding db6.
Does anyone know where db2 stores information about the current log chain? Is there a file ?
Thanks a lot for your help.
Best Regards,
Andreas
Request clarification before answering.
Hi Andreas,
Happy 2013 to you too.
The DB2 transaction log files have consecutive names from S00000000.LOG to S99999999.LOG.
If a log file is full, DB2 creates a new log file with the next number.
In some special cases DB2 can create log files with the same name but different contents - stored in different directories identified by the chain number.
As you probably know, log file chains are created if the database is restored to a point in time.
If you understand a retore was done, then you should find the log chain info in the directories where the logs are stored.
regards,
Javier
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Good Morning Javier and Gaurav,
thanks for your responses.
I know why and when db2 creates log chains.
But do you know where db2 stores the information about log chains? Or how db2 calculates the next log chain? For example if I create a new database and restore the db content from an backup image the current log chain e.g. 06 is created and not 00. So I guess this information is stored in the backup image somewhere and maybe written into a file...
if yes do you know where?
Thanks again.
BR,
Andreas
Hello Andreas,
I guess you might be talking about log control file which is created under db2 database directory. Log control file contains information about active logs and the information is used during crash recovery.
You can refer to DB2 information center for more details.
Database directories and files
Regards,
Masako
In SAP, The default location for DB2 log files is/db2/<DB_SID>/log_dir
DB2 automatically adds database partition as NODE<nnnn> in the above logpath.
Log files starts with convention like S<nnnnnnn>.LOG
Now, there are two types of logging methods:
1) Circular Logging
2) Archival Loging
Circular Logging is used by default. Here DB2 handles logfiles in a circular fashion.
Circular fashion means if last logfile is full, then it writes to the first file and this process continues.
This type of logging is not recommended for Prod environments.
In Archival Logging, a log is stored at a Archiving Location as soon as logfile is full. Online backup can be taken for Database with this type of logging.
Recommended for Production usage.
You can use Parameters LOGARCHMETH1 and LOGARCHMETH2 to set logging type.
If both the abive parameters are set OFF then DB2 follows Circular Logging.
Regards
Gaurav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 10 | |
| 5 | |
| 5 | |
| 5 | |
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.