Thanks for the question, Mohamed.
Asked: February 07, 2022 - 6:36 am UTC
Last updated: February 08, 2022 - 4:04 pm UTC
Version: 12c
Viewed 1000+ times
You Asked
Hi
Using DBMS_SCHEDULER.create_program I can create a reuseable program but how can I see what that programs code is after it's been created?
My use case is that someone created a program a while ago and I need to see what exactly it's doing but I can't find the code anywhere, it's definitely not in dba_source and I can't see anything in the schedule jobs that shows the code. I've searched the net endlessly but keep coming up empty.
Many thanks for your assistance,
Mohamed
and Chris said...
Check *_scheduler_programs and get the program_action:
begin
dbms_scheduler.create_program (
program_name => 'test_program',
program_type => 'PLSQL_BLOCK',
program_action => 'begin p(1); end;',
enabled => true);
end;
/
select program_name, program_action
from user_scheduler_programs;
PROGRAM_NAME PROGRAM_ACTION
---------------- ----------------
TEST_PROGRAM begin p(1); end;
Is this answer out of date? If it is, please let us know via a Comment