-
a user have a job, this user was deleted, and the job stay in the database, when this job try to run a process into a database, it generate a error, it don't find the process in the user tha was deleted,
how can i delete a job with system from another user?
i try with
execute dbms_job.remove(job)
but ORA-23421: job number 1 is not a job in the job queue
SQL> EXECUTE DBMS_JOB.REMOVE (1);
BEGIN DBMS_JOB.REMOVE (1); END;
*
ERROR at line 1:
ORA-23421: job number 1 is not a job in the job queue
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 83
ORA-06512: at "SYS.DBMS_JOB", line 91
ORA-06512: at "SYS.DBMS_JOB", line 152
ORA-06512: at line 1
-
I don't think you can delete a job from job queue which not belong to you.
try to recreate user, then remove it.
-
Use DBMS_IJOB package, as SYSTEM or SYS
EXECUTE SYS.DBMS_IJOB.REMOVE (1);
-
You could try deleting from SYS.JOB$ directly - but that would be VERY much unsupported if things went bad....
hth
connor
Connor McDonald
http://www.oracledba.co.uk
-
try this :
Alter session set current_schema = other_user
then do whatever you want to other_users's job.
then alter session back to your own schema.
-
If you run that package as SYSTEM or SYS you should be able to... I remembered I did sometime ago and it worked for me.
Reddy,Sam
-
I can confirm that with "execute sys.dbms_ijob.remove(<job id>);" you can remove a job that belongs to another schema.
We had a job a user had created which was taking a good deal of resources so after investigation we decided to remove it. The only way that worked was with the dbms_ijob.remove.
-
Remove Job from another user : DBMS_IJOB.REMOVE
SQL> exec dbms_job.remove(40682);
BEGIN dbms_job.remove(40682); END;
*
ERROR at line 1:
ORA-23421: job number 40682 is not a job in the job queue
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
ORA-06512: at "SYS.DBMS_IJOB", line 687
ORA-06512: at "SYS.DBMS_JOB", line 174
ORA-06512: at line 1
SQL> EXECUTE SYS.DBMS_IJOB.REMOVE (40682);
PL/SQL procedure successfully completed.
SQL>
___________________
** Signature removed by site staff so it won't look like you're spammming. **
Last edited by Steve R Jones; 08-01-2011 at 04:26 AM.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|