DBAsupport.com Forums - Powered by vBulletin
Results 1 to 9 of 9

Thread: how can i remove a job from another user

  1. #1
    Join Date
    Jan 2001
    Posts
    32
    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



  2. #2
    Join Date
    Nov 2000
    Posts
    245

    I don't think you can delete a job from job queue which not belong to you.

    try to recreate user, then remove it.


  3. #3
    Join Date
    Jul 2000
    Posts
    296
    Use DBMS_IJOB package, as SYSTEM or SYS

    EXECUTE SYS.DBMS_IJOB.REMOVE (1);

  4. #4
    Join Date
    Mar 2001
    Posts
    3
    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

  5. #5
    Join Date
    Nov 2000
    Posts
    344
    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.

  6. #6
    Join Date
    Feb 2000
    Location
    Washington DC
    Posts
    1,843
    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

  7. #7
    Join Date
    Feb 2011
    Location
    Norwich, UK
    Posts
    5
    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.

  8. #8
    Join Date
    Jul 2011
    Posts
    1
    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.

  9. #9
    Join Date
    Sep 2023
    Posts
    1
    Try to recreate user....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width