I recently completed Python programming course which was authorized by “University of Michigan” offered through Coursera. It was really good course & worth the time I invested in.
So here comes my first python program, which can be useful for Oracle DBA’s like me to get consolidated report on RMAN backup.
Of course we can always get this information from v$rman_backup_job_details but what if database is not available or you are looking for backup information older than your retention period. You need to go to backup location & read through all backup out/log files & capture the details you need
So I thought of writing a python program & see if we can get desired results in one shot.
Note: You cant just copy/paste this code & use in your environment. But you can definitely refer it & modify wherever needed.
1. You will create a file named bkp.txt. This file will contain all names of logfiles you need to read. I am using below file for my demo.
2. python binaries with version 3.
3. Program file, in this example bkp.py & bkp.txt should be copied to location which contains all logfiles.
How to execute:
Here comes the result:
Please find below the course link through which I was able to write my first program.
You can download sample files from below location:
Hope u will find this post very useful.
You can find python program to report RMAN backup details by querying v$rman_backup_job_details can be found here.