Customize the performance profile schedule
To customize the time period for profiling the collected performance data, take the following steps.
On the Portal server, go to the database procedures directory.
Windows: C:\opt\oracle\database\stored_procedures\srm
Linux: /opt/aptare/database/stored_procedures/srm
Edit the script: .
Note the parameters shown in red and modify them accordingly.
jobName := dba_package.getSchedulerJobName('recalIntPerformanceProfile'); IF (jobName IS NOT NULL AND LOWER(jobName) <> LOWER('recalIntPerformanceProfile')) THEN DBMS_OUTPUT.PUT_LINE('recalIntPerformanceProfile exists with default name '|| jobName ||' hence will be removed and recreated.'); DBMS_SCHEDULER.DROP_JOB(job_name => jobName); jobName := NULL; END IF; IF jobName IS NULL THEN DBMS_SCHEDULER.CREATE_JOB( job_name => 'recalIntPerformanceProfile', job_type => 'PLSQL_BLOCK', job_action => 'srm_array_perf_report_pkg.recalIntPerformanceProfile (dateRangeType(null,null,null,SYSDATE-2/24, SYSDATE, null, 0));', -- What to run start_date => SYSDATE + (3/24), -- First run is 3 hour after upgrade or install repeat_interval => 'TRUNC(SYSDATE+1,''DD'') + (10/24)', -- Next run is 10am each subsequent day enabled => TRUE); ELSE DBMS_OUTPUT.PUT_LINE('recalIntPerformanceProfile exists and will be altered with updated version.'); DBMS_SCHEDULER.SET_ATTRIBUTE( name => jobName, attribute => 'job_type', value => 'PLSQL_BLOCK' ); DBMS_SCHEDULER.SET_ATTRIBUTE( name => jobName, attribute => 'job_action', value => 'srm_array_perf_report_pkg.recalIntPerformanceProfile (dateRangeType(null,null,null,SYSDATE-2/24, SYSDATE, null, 0));' -- What to run ); DBMS_SCHEDULER.SET_ATTRIBUTE( name => jobName, attribute => 'repeat_interval', value => 'TRUNC(SYSDATE+1,''DD'') + (10/24)' -- Next run is 10am each subsequent day ); END IF; DBMS_OUTPUT.put_line('recalIntPerformanceProfile set to run on daily at 10am');Three hours after a Portal Installation or Upgrade, this job runs for the first time. See the parameter: (SYSDATE + (3/24))
After the first run, this job will run at 10:00 a.m. every day. See the parameter: (TRUNC(SYSDATE+1, "DD ") + (10/24)
This Performance Profiler will calculate the last two hours of statistics. See the parameter: SYSDATE-2/24
Execute the following command to activate your new schedule:
su - aptare sqlplus portal/portal@//localhost:1521/scdb @setup_srm_jobs.plb