SQL> alter session set NLS_DATE_FORMAT= 'yyyy-mm-dd hh24:mi:ss';
创建单一基线模板:
SQL> exec dbms_workload_repository.create_baseline_template ( start_time => '2015-11-05 10:00:00', end_time => '2015-11-05 18:00:00', baseline_name => 'baseline_090402', template_name => 'template_090402', expiration => 8, dbid => 1725496767);
创建可重复基线模板:
SQL> exec dbms_workload_repository.create_baseline_template ( day_of_week => 'monday', hour_in_day => 17, duration => 3, expiration => 8, start_time => '2015-11-05 10:00:00', end_time => '2015-11-05 19:00:00', baseline_name_prefix => 'baseline_2015_mondays_', template_name => 'template_2015_mondays', dbid => 1725496767);
删除基线模板:
SQL> exec dbms_workload_repository.drop_baseline_template (template_name => 'template_090402',dbid => 1725496767);