2

After switching to Archive mode (from Circular mode to keeping archive logs on the disk) we had C0000000 folder where archive logs were copied. Now I noticed that folders C0000001, C0000002, C0000003 and C0000004 are created where C0000001 and C0000002 and C0000003 have only one LOG file. Archive logs keep coming to C0000004 sub folder.

Time when those folders are created are some random times (for example it is not the time when online backup was performed).

Why those C000000x folders are created and is this regular behavior or we should be concerned?

Thank you

6

This is completely normal. Each of these directories are for each unique log chain. If you are familiar with software version control, each log chain is like a branch.

A new log chain is created each time you restore a database and roll forward to a point in time other than end of logs.

Here is why: You have a database, SAMPLE. It has reached the log file S007500.LOG.

If you restore the database back to the point in time that corresponds to the log file S007000.LOG, what should DB2 do with the fact that you now have 2 sets of log files with the names S007001.LOG ... S007500.LOG? They represent 2 unique sets of transactions, and they are called log chains.

So, when you create a database, DB2 creates the first log chain, C0000001. If you restore the database, it creates C0000002, etc.

By preserving these log chains, DB2 gives you the ability to restore each unique series of transactions for a database.

0

In addition to Ian's answer: In a HADR setup, a new log chain is also created after switching primary and standby.

Jeroen.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.