Home » RDBMS Server » Server Administration » To drop a job (RDBMS 10.2.0.4 win2003 sp2)
To drop a job [message #424401] Fri, 02 October 2009 02:43 Go to next message
hristo
Messages: 258
Registered: May 2007
Senior Member
Hi!

We have jobs that we dont need any more and they are casuing som errors as well. I try this:


SQL> begin
  2  dbms_scheduler.drop_job(
  3  job_name=>'24594',
  4  force=>true);
  5  end;
  6  /
begin
*
ERROR at line 1:
ORA-00931: missing identifier
ORA-06512: at "SYS.DBMS_UTILITY", line 132
ORA-06512: at "SYS.DBMS_UTILITY", line 164
ORA-06512: at "SYS.DBMS_UTILITY", line 218
ORA-06512: at "SYS.DBMS_SCHEDULER", line 540
ORA-06512: at line 2



What identifier does it want? I guess it a very easy task, but its my first time.

Checked some more, the job only shows up under dba_jobs. Is there another way to drop the job then using the dbms_scheduler.drop_job?

Regards
Hristo

[Updated on: Fri, 02 October 2009 03:35]

Report message to a moderator

Re: To drop a job [message #424407 is a reply to message #424401] Fri, 02 October 2009 03:51 Go to previous messageGo to next message
hristo
Messages: 258
Registered: May 2007
Senior Member
Solved this one.

Onle needed to execute this as the rigth owner:


exec dbms_job.remove(24594)



Regards
Hristo
Re: To drop a job [message #424408 is a reply to message #424407] Fri, 02 October 2009 03:57 Go to previous messageGo to next message
Michel Cadot
Messages: 68665
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
Onle needed to execute this as the rigth owner:

Or rather only need to execute the right package.

Regards
Michel
Re: To drop a job [message #424439 is a reply to message #424408] Fri, 02 October 2009 07:18 Go to previous messageGo to next message
hristo
Messages: 258
Registered: May 2007
Senior Member
Hi!

I got this when trying to do it as SYS:


ERROR at line 1:
ORA-23421: job number 24594 is not a job in the job queue
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
ORA-06512: at "SYS.DBMS_IJOB", line 536
ORA-06512: at "SYS.DBMS_JOB", line 174
ORA-06512: at line 1



But as STRMADMIN it worked.

Regards
Hristo

[Updated on: Fri, 02 October 2009 07:58]

Report message to a moderator

Re: To drop a job [message #424511 is a reply to message #424439] Fri, 02 October 2009 19:27 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
hristo wrote on Fri, 02 October 2009 05:18

But as STRMADMIN it worked.


Because you went from failing with "dbms_scheduler.drop_job" to succeeding with "dbms_job.remove".
See the difference? Different package!
Re: To drop a job [message #424645 is a reply to message #424511] Mon, 05 October 2009 01:55 Go to previous messageGo to next message
hristo
Messages: 258
Registered: May 2007
Senior Member
Hi!

See below:

SQL> connect sys/bsbsbs@DB61 as sysdba
Ansluten.
SQL> exec dbms_job.remove(198587);
BEGIN dbms_job.remove(198587); END;

*
Fel pÕ rad 1:
ORA-23421: job number 198587 is not a job in the job queue
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
ORA-06512: at "SYS.DBMS_IJOB", line 536
ORA-06512: at "SYS.DBMS_JOB", line 174
ORA-06512: at line 1


SQL> connect strmadmin/bsbsbsbs@DB61
Ansluten.
SQL> exec dbms_job.remove(198587);

PL/SQL-procedur õr utf÷rd utan fel.

SQL> commit;

COMMIT õr utf÷rt.


Regards
Hristo
Re: To drop a job [message #424647 is a reply to message #424645] Mon, 05 October 2009 02:09 Go to previous messageGo to next message
Michel Cadot
Messages: 68665
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
And then? It does change that in the first post you didn't use the correct package.

Regards
Michel
Re: To drop a job [message #424654 is a reply to message #424647] Mon, 05 October 2009 03:23 Go to previous message
hristo
Messages: 258
Registered: May 2007
Senior Member
That is correct, sorry for that.

Regards
Hristo
Previous Topic: coredump by oracle
Next Topic: error for create temp table space in oracle 9
Goto Forum:
  


Current Time: Wed Jul 03 09:14:47 CDT 2024