Published 21. May 2024
Updated October 2025
Introduction
Welcome back to the blog. In this post, we’ll walk you through how KeepTool 16.1 helps you migrate legacy dbms_job
jobs to the more powerful and flexible Oracle Scheduler. The Scheduler offers enhanced features, more control, and better long-term compatibility.
Legacy dbms_job
Overview
Many Oracle databases still rely on the older job system managed via the dbms_job
package. Before Oracle 10g, this was the only built-in way to schedule jobs. Though many systems were upgraded through the years, many projects still maintain dbms_job
-based jobs.
In KeepTool (Hora), you see an overview of traditional jobs, with context menus that wrap dbms_job
calls for managing them.

Each such job is identified by a job number. The What column contains a procedure or PL/SQL block defining the logic, and the Interval column holds an expression computing the next run time.
The Oracle Scheduler Alternative
Starting in Oracle 10g, the new approach is dbms_scheduler
. Scheduler jobs are identified by owner + job name (not just a number), and include fields like Creator, Action (superset of “What”), and Repeat Interval.

Because of those enhancements, many publications argue for migrating to Scheduler. In Oracle 19c, Oracle began implicitly converting dbms_job
jobs internally into scheduler jobs—jobs created by dbms_job
may now appear as scheduler jobs, with names like DBMS_JOB$_<jobnumber>. The dictionary view scheduler$_dbmsjob_map
helps track these mappings.
However, relying purely on automatic conversion can lead to issues—especially around ownership and execution context.
Pitfalls to Watch Out For
One particularly thorny issue: after an Oracle 19c import (e.g., via impdp
as SYS
), Scheduler jobs may show Creator = SYS even though the Owner is a different user (e.g., TEST). In effect, the job might execute with SYS privileges, potentially leading to unexpected behavior.

How KeepTool Simplifies the Migration
There are two main technical approaches to converting dbms_job
to dbms_scheduler
calls:
-
Use dbms_metadata
to derive PL/SQL definitions of the internal scheduler jobs that wrap dbms_job
.
-
Query dba_jobs
(or the legacy job tables) and build your own dbms_scheduler
scripts manually.
We opted for approach #2 in KeepTool’s implementation, for two reasons:
-
It supports older Oracle versions (pre-19c).
-
In some edge cases, dbms_metadata
fails (e.g. when the job’s creator is SYS
).
New Context Menu in KeepTool 16.1
In the Hora interface, we added a new context menu item under dbms_job
rows: “Convert to Scheduler Job” (multi-selectable).
This generates a PL/SQL script that:
-
Creates a new scheduler job (initially in disabled state), wrapping the original logic.
-
Optionally includes a dbms_job.remove()
call to delete the original dbms_job
.


This two-step process allows you to review and enable the scheduler jobs only after verifying correctness.
After conversion, scheduler jobs appear in the scheduler overview. In the interface, jobs created automatically (by Oracle) may be highlighted in red, while those you created via the wizard appear in green.

Finally, you can remove the old jobs — either via script or via the context menu in Hora. Removing also cleans up the automatically created scheduler jobs with names prefixed DBMS_JOB$_…
.
Summary
With KeepTool 16.1, migrating from dbms_job
to Oracle Scheduler is as easy as a few clicks. You can generate the right PL/SQL scripts, preview and enable them, and smoothly deprecate the old jobs. Even with large numbers of jobs, the process is safe, efficient, and reliable.
Stay ahead by migrating now—so you’re ready when dbms_job
is phased out.
➡️ Try KeepTool for free
KeepTool's Oracle tools are designed specifically for developers, DBAs, and support teams.
Based on over 25 years of experience, we continuously optimize our software to make your database analysis and documentation faster, more efficient, and clearer.