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;
This entry was posted in Oracle on by .
Unknown's avatar

About SandeepSingh

Hi, I am working in IT industry with having more than 15 year of experience, worked as an Oracle DBA with a Company and handling different databases like Oracle, SQL Server , DB2 etc Worked as a Development and Database Administrator.

Leave a Reply