SQL> drop user osama cascade ;
User dropped.
SQL> create user osama identified by osama;
User created.
SQL> grant select any table to osama;
Grant succeeded.
SQL> grant select any dictionary to osama ;
Grant succeeded.
SQL> grant create session to osama;
Grant succeeded.
SQL> conn osama/osama ;
Connected.
SQL> EXEC DBMS_SQL_MONITOR.BEGIN_OPERATION (‘My_First_JOB’, forced_tracking => ‘Y’);
BEGIN DBMS_SQL_MONITOR.BEGIN_OPERATION (‘My_First_JOB’, forced_tracking => ‘Y’); END;
*
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00221: ‘BEGIN_OPERATION’ is not a procedure or is undefined
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
to avoid this error :
SQL> VAR myjob_id NUMBER;
SQL> EXEC :myjob_id := DBMS_SQL_MONITOR.BEGIN_OPERATION (‘My_First_JOB’, forced_tracking => ‘Y’)
PL/SQL procedure successfully completed.
Where
myjob_id : variable
My_first_Job : Job name.
if you check the second picture you will see if you don’t stop the sql_monitor the Job will still running
SQL> EXEC DBMS_SQL_MONITOR.END_OPERATION(‘My_First_JOB’, :myjob_id) ;
PL/SQL procedure successfully completed.