If you ever wondered if it is possible to rename a job, be advised that you can execute:
RENAME old_name TO new_name;
Apparently this is the only way to do it as there isn't an ALTER JOB command or a DBMS_SCHEDULER API for doing that and interestingly it's not mentioned in the documentation.
If you need to rename a job on an instance where only DBAs are allowed to execute such operations, you need to provide them with a simple script like this:
ALTER SESSION SET CURRENT_SCHEMA = job_schema;
RENAME old_name TO new_name;
I am not sure if you can rename a running job, probably not which makes sense to me, at any rate it's meaningful in case of recurring calendar jobs if the original name needs to be changed for some reason.
No comments:
Post a Comment