Daily Baseline Template From SQLPLUS

If you want to create repeating baseline template from sqlplus you might struggle if you want to set the frequency to daily (every day in the week).
This is because in the documentation it is not specified what you should specify for the day_of_week parameter of the dbms_workload_repository.crete_baseline_template function.

What is specified is this:

Parameter: day_of_week
Description: Day of week that the baseline should repeat on. Specify one of the following values: SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY

If you want the baseline for specific day, then great just specify one of the available values.

But if you want day_of_week to be set to daily then you’ll have to specify ALL

hour_in_day => 10,
duration    => 6,
start_time  => next_day(sysdate,'MONDAY'),
end_time    => to_date('01012015','ddmmyyyy'),
baseline_name_prefix  => 'TEST_',
template_name => 'TEMPLATE_FOR_TESTING',
expiration   => NULL,
dbid         => null);
PL/SQL procedure successfully completed.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.