Archive Log get full

i having problem start my database because archive log get full. how to solve this problem? is there statement to remove old archive log file?
LVL 1
cyseng10Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

granbajoCommented:
Can you post the error message you are getting... also check the db2diag.log file.

There are a couple of reasons why this would happen, and the solutions depends basically on what's going on!
cyseng10Author Commented:
the reason database not able started cause archive log file get full. i can't remember error code. can i know how to clear archive log file when it get full
granbajoCommented:
cyseng10... it is not that simple...

It depends on whether you are using archival logging or circular, and whether you have enough space on the disks or enough files defined on the database configuration.

Post the error code, and if possible the lines related to logs from the database configuration... on UNIX, you could get this in unix by typing, on the db2 command line

db2 get db cfg for DATABASENAME |grep og
Announcing the Winners!

The results are in for the 15th Annual Expert Awards! Congratulations to the winners, and thank you to everyone who participated in the nominations. We are so grateful for the valuable contributions experts make on a daily basis. Click to read more about this year’s recipients!

ghp7000Commented:
did you get this message when backing up or restoring the database?
cyseng10Author Commented:
i using archive log  ...
the error return that archive log is full ...
granbajoCommented:
If you get the message number is more useful... anyway, here is what you can do... I am assuming that you are getting the error when starting the database, rather than when you run a particularly long query.  This means that you don't have enough space wherever the logs are, rather than not having enough space in the logs for a particular transaction

From the database configuration, get the location of the log files, and the first active log...

db2 get db cfg for DATABASENAME

the output should have the following lines somewhere

Log file size (4KB)                         (LOGFILSIZ) = 250
Number of primary log files                (LOGPRIMARY) = 3
Number of secondary log files               (LOGSECOND) = 2
Changed path to log files                  (NEWLOGPATH) =
Path to log files                                       = C:\DB2\NODE0000\SQL0001\SQLOGDIR\
First active log file                                   = S0001523.LOG

This basically means that any file with a sequence number lower than S0001523 can be deleted.  Bear in mind that if you have a backup strategy in place, and are taking online backups... rather than deleting the files, you need to archive them.  Just make sure that you don't delete anything with a timestamp newer than your latest on-line backup.

If you are using unix, you can fix this by increasing the size of the file system where the files are.

It is a good practice to have some housekeeping that gets rid of the logs that are not needed anymore.

*** WARNING **
Make sure that you don't delete any files that might still be active, otherwise your database will not start at all.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
DB2

From novice to tech pro — start learning today.