SQL> define script="&1";
Enter value for 1:
SQL> set verify off;
SQL>
SQL> declare
2
3 n_run_number number;
4
5 begin
6 DBMS_PROFILER.start_profiler('&script'||' on '||to_char(SYSDATE, 'YYYYMMDD HH24MISS'),
7 ' ',
8 n_run_number);
9
10 DBMS_OUTPUT.PUT_LINE('DBMS_PROFILER run_number = '||to_char(n_run_number));
11 end;
12 /
SQL>
SQL>
SQL> execute DBMS_PROFILER.stop_profiler;
PL/SQL procedure successfully completed.
SQL> execute DBMS_PROFILER.flush_data;
PL/SQL procedure successfully completed.
SQL>
SQL> set verify on;
SQL>
SQL>