cancel
Showing results for 
Search instead for 
Did you mean: 

to clear db2 archive log after db2 database backup

Former Member
0 Kudos

After db2 backup archive log remains as it is.is there setting to remove archive logs after database backup.DAS is not installed.

DB2 9.1 FP 6

os HP unix

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Dear All,

Sorry but i have same question in HPUX 11.31 SAP DB2 9.5 Archive log not deleted automatically after the successful backup. Is there any parameter. Please guide. i am doing this activity manually. Please Guide.

Regards

Praveen

praveen_16july@yahoo.com

former_member182505
Contributor
0 Kudos

Hi

In db2 you have to delete it manually  . Or you can. Write can shell scrip and schedule it in crontab.

Thanks

Sadiq

Former Member
0 Kudos

Hi Sadiq,

Thanks for your update.

Can you guide me how to create this script or what is best good practice way to delete manually db2 archive-log through HPUX OS.

Thanks in advance

Regards,

Praveen Gupta

praveen_16july@yahoo.com

former_member182505
Contributor
0 Kudos

Hi praveen

Ask unix team to write script . I am deleting manually after taking backup copy/paste.

You can delete archive log any time.

Thanks

Sadiq

sunny_pahuja2
Active Contributor
0 Kudos

Hi,

In DB2, archive log does not delete automatically after backup as it happens in oracle. So, once archive log backup will complete then you need to delete those archive log manually.

Thanks

Sunny

Former Member
0 Kudos

Hi,

You can use database administration guide "SAP® on IBM DB2 for Linux, UNIX, and Windows", section "8.2.1.3 Deleting Archived Log Files".

In general, you can use one of the following commands:

u2022 u201CPRUNE HISTORY u2026 AND DELETEu201D

u2022 u201CPRUNE LOGFILE PRIOR TO u2026u201D

Best Regards,

Aleh

paul_power
Active Contributor
0 Kudos

Hello Anand,

If the archvied logs are not required, ie they are not required for restore

you can remove them.

You can check this is by running

db2 list history all for db <sid>

The above command will give you a detailed overview of the backup

history and what logs were archived and what logs were included or needed for restore of backups.

If they are no longer needed for a restore, then it is safe to remove them.

Kind regards,

Paul