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.
Coursera – Python for Everybody
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.
Categories: Administration, automation, backup & recovery, Monitoring, python, Scripts
Suoerb and useful! Thanks for sharing!!
Greetings! Very helpful advice in this particular article! It’s the little changes that produce the most important changes. Many thanks for sharing!
I really like your blog.. very nice colors & theme. Did you make this website yourself or did you hire
someone to do it for you? Plz respond as I’m looking to create my own blog and would like to know where u got this from.
I want to to thank you for this great read!!
I definitely enjoyed every little bit of it. I have you
book marked to check out new things you post…