Hi db experts,
we can get list of invalid objects in database from user_objects where status = 'INVALID' . If scheduler job becomes failed , should i get that info in user_objects dictionary ?
We can get List of invalid job info in - User_scheduler_jobs.
I wanted to know that in which scenario scheduler/jobs become fail ?
what kind of user errors are the cause of scheduler job failed ?
You can query datadictionary views like dba|all_scheduler_job_log and/or dba|all_scheduler_job_run_details and so on for that.
Here's a list:
All available views can also be found in the documentation, example:
Suggest you explore the documentation for more details.
I'm not sure what you mean when you say 'manually invalid'.
Do you deliberatly want a job to fail?
You could kill the session that's running the job, or have the job call a (test)procedure that runs into a deliberatly programmed error, like assigning the value 'AA' to a variable that is defined as VARCHAR2(1),
i want to know all possible reasons of job fail.
It could be anything:
- a hardware error
- a code error
- a bug
You simply cannot foresee it all.
However, when a job fails, then you can expect a trace file in one of these directories listed when you query (on 11gR2) theat will contain detailed information as to why the job failed:
select * from v$diag_info;
(usually alert log and incident dir)