Check the definition of job in dbms_Jobs

Get the DDL of job in dbms_jobs

  1. Find the job id and owner of the job
col log_user for a10
col schema_user for a10
select job,log_user,schema_user from dba_jobs;

       JOB LOG_USER   SCHEMA_USE
---------- ---------- ----------
         1 HR         HR

2. Alter the session of Current schema with sys dba role.

alter session set current_schema=HR;

3. Get the DDL of the DBMS_JOBS

Note: Put the job number got from first query in user_export procedure, in my example its ONE, so i used One.

set serveroutput on
DECLARE
callstr VARCHAR2(500);
BEGIN
dbms_job.user_export(1, callstr);
dbms_output.put_line(callstr);
END;

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.