Re: convert_dbms_job in 11.2

  • From: Kim Berg Hansen <kibeha@xxxxxxxxx>
  • To: patrice.boivin@xxxxxxxxx
  • Date: Wed, 16 Dec 2015 09:08:34 +0100

Hi, Patrice

A quick google for CONVERT_DBMS_JOB gets me as first result a link to
Morgans library.
The relevant section of the page:

http://www.morganslibrary.org/reference/pkgs/dbms_isched.html#ischd2

He states it is now in DBMS_ISCHED (undocumented.)
He also writes:

-- This might actually work if DBMS_JOB created jobs had VARCHAR2 names.
-- Unfortunately they do not so I can not puzzle this one out unless I
-- assume the information in the rdbms/admin file is incorrect.


I can confirm the procedure exists in DBMS_ISCHED even in version
12.1.0.2.0.

Unwrapping the procedure yields:

7729 PROCEDURE CONVERT_DBMS_JOB IS 7730 TRANSACTION_ID
VARCHAR2(40); 7731 BEGIN 7732 TRANSACTION_ID :=
DBMS_TRANSACTION.LOCAL_TRANSACTION_ID(TRUE); 7733 7734 7735
DBMS_ISCHED.REGISTER_CALLBACK(NULL, NULL, NULL, NULL); 7736 7737
7738 UPDATE JOB$ SET SCHEDULER_FLAGS = DBMS_IJOB.CREATE_FLAG, 7739
XID = TRANSACTION_ID; 7740 7741 COMMIT; 7742 END;


So it appears to be setting a flag as well as XID of *all* jobs in JOB$.
It *might* just *possibly *be a flag to tell a background process to do the
conversion of all jobs in the database??

But it is complete guesswork what the purpose is, so I personally would not
attempt to use this to convert jobs.
(Well, maybe if I was adventurous one day in a virtualbox machine I'd taken
a snapshot of just before ;-)


Regards


Kim Berg Hansen

http://www.kibeha.dk
kibeha@xxxxxxxxx
@kibeha <http://twitter.com/kibeha>


On Tue, Dec 15, 2015 at 9:21 PM, Patrice sur GMail <patrice.boivin@xxxxxxxxx

wrote:

I see a reference in psoug to a dbms_scheduler.convert_dbms_job procedure,
but when I look at the dbms_scheduler package in 11.2.0.4 it's not there.

A search in Oracle Support for convert_dbms_job returns nothing.

Did Oracle remove it at some point?

http://psoug.org/reference/dbms_scheduler.html


Did someone write a script to do this? Databases can contain hundreds of
jobs, I imagine someone must have decided to script this conversion.

-- Patrice
My profiles: [image: Facebook]
<http://www.facebook.com/home.php?#!/profile.php?id=100000206805521>[image:
LinkedIn] <http://ca.linkedin.com/pub/patrice-boivin/a/933/5a9>[image:
Twitter] <http://www.twitter.com/PatriceBoivin>

Other related posts: