Skip to main content

Posts

Showing posts from October, 2012

Changing DB2 Database logging methods

DB2 databases can be configured for different logging mechanisms like circular and archival logging. These mechanisms can be changed for a database at any point after the database is created. By default while creating a database in IBM DB2, db logging method is set to "Circular" logging which is generally not used in production environments. Archival logging is the recommend logging type for DB2 databases, since with this type of logging, one can recover/restore the database to a specific point in time or to the end of logs. How to change the logging type from circular to archival and vice-verse. From you DB2 server machine start the DB2 control center. (DB2CC). Step 1: Start -> All Programs -> IBM DB2 -> DB2COPY1 (or which ever is default) -> General Administration Tools -> Control Center Step 2: Now right click on the required database ( TC or TC2 ) for which the database logging mechanism needs to be changed. Step 3: After clicki

Database logging mechanisms

All databases have logs associated with them which keep a record of changes to the database. Lets consider IBM DB2 database for understanding the database logging techniques.  A database that uses archival logging can be backed up online. To reach a specified point in time, you can perform a rollforward recovery. A database that uses archival logging is therefore also called recoverable.There is another type of logging , Circular logging which keeps all restart data in a ring of log files. It starts logging in first file in the ring, then moves on to the next, and so on, until all the files are full. Circular logging overwrites and reuses the first log file after the data it contains has been written to the database. This continues as long as the product is in use, and has the advantage that you never run out of log files. In circular logging only full backups of the database are allowed while the database is offline. The database must be offline (inaccessible to users) when a