Dear Readers,

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.

Prerequisites:

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.

Actual program:

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:

Sample log files

bkp.py + bkp.txt

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.

Cheers

Regards,
Adityanath

Advertisements

10 responses to “RMAN backup report reading old logfiles using Python”

  1. Mayur Deshmukh Avatar
    Mayur Deshmukh

    Hi Aditya,

    Suoerb and useful! Thanks for sharing!!

  2. RMAN backup details using Python scripting – Adityanath's Oracle Blog Avatar

    […] You can find python program to create RMAN backup report by reading old logfiles can be found here. […]

  3. Reynaldo Voracek Avatar
    Reynaldo Voracek

    Greetings! Very helpful advice in this particular article! It’s the little changes that produce the most important changes. Many thanks for sharing!

  4. Jeffry Avatar
    Jeffry

    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.
    thank you

  5. Ethan Avatar
    Ethan

    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…

  6. Hannah Gordon Avatar
    Hannah Gordon

    I am so grateful for your blog.Really looking forward to read more. Great.

  7. Ottilie James Avatar
    Ottilie James

    Thanks a lot for the article post.Much thanks again. Awesome.Loading…

  8.  Avatar
    Anonymous

    Thank you ever so for you blog.Much thanks again. Keep writing.

  9. 球探網足球比分 Avatar
    球探網足球比分

    Really informative article post.Thanks Again. Much obliged.

Leave a comment

Advertisements
Blog Stats

562,669 hits

Advertisements
Advertisements