Forum Discussion

Varma_Chiluvuri's avatar
11 years ago
Solved

Command or script to list schedule window of rman policies

Can anyone give me command or script in unix to display only the schedule window of policies in unix

  • Just use (e)grep to strip out what you need.

    e.g.

    bppllist -U -allpolicies | egrep "Policy Name|Schedule|day" | egrep -v "Frequency|Retention"

     

7 Replies

  • Riaan 

    I have more than four hundred policies, do you have any command or script which gives only scheduled window, I have the list of policies and schedules in excel.

  • Just use (e)grep to strip out what you need.

    e.g.

    bppllist -U -allpolicies | egrep "Policy Name|Schedule|day" | egrep -v "Frequency|Retention"

     

  • bppllist -U -allpolicies | egrep 'Policy Name:|Schedule:|  Type:|Calendar sched:|Last|First|Every|Frequency:|Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday'|grep -v 'Data Mover'

  •  

    >>Can anyone give me command or script in unix to display only the schedule window of policies in unix


     

    bpplsched  POLICYNAME  -U  |  egrep "Schedule: |Sunday |Monday |Tuesday |Wednesday |Thursday |Friday |Saturday "

     

    Gives you all you need and nothing more smiley

     

     

  • and using that command in a script ...
     

    for POLICY in $(bppllist)

      do echo Policy:  $POLICY

      bpplsched  $POLICY  -U  |  egrep "Schedule: |Sunday |Monday |Tuesday |Wednesday |Thursday |Friday |Saturday "

      echo

    done

     

    shows Policy Name, Schedule Name, and related backup Windows

     

  • You can get schedules and its window by parsing CLASS, SCHED and SCHEDWIN lines from "bppllist -allpolicies -l". Please check Commands Reference Guide for more detail. SCHED and SCHEDWIN are detailed in bpplsched. Output format of schedule part in "bppllist -l" is same with bpplsched.