powered by simpleCommunicator - 2.0.61     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / Oracle [игнор отключен] [закрыт для гостей] / scheduler job не запускается?
7 сообщений из 7, страница 1 из 1
scheduler job не запускается?
    #39272444
receiver
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Здравствуйте!

На схеме создан scheduler job
Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
begin                                                       
    dbms_scheduler.create_job ( 
        job_name => 'HOUSEKEEPER',
        job_type => 'plsql_block',
        job_action => 'drop_old_partition;',
        start_date => to_timestamp_tz('2016-07-06 23:00:00 Europe/Berlin', 'yyyy-mm-dd hh24:mi:ss tzr'),
        repeat_interval => 'freq = daily',
        job_class => 'default_job_class',
        auto_drop => false,
	enabled => true,
	comments  => 'Procedure drops obsolete partition'
    );
end;

Но в логах на запуск - дырка от бублика...
Код: plaintext
1.
2.
3.
select * from USER_SCHEDULER_JOB_LOG where job_name = 'HOUSEKEEPER';

no rows selected

Не так задал интервал?
...
Рейтинг: 0 / 0
scheduler job не запускается?
    #39272464
Фотография Fogel
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
receiverЗдравствуйте!

На схеме создан scheduler job
Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
begin                                                       
    dbms_scheduler.create_job ( 
        job_name => 'HOUSEKEEPER',
        job_type => 'plsql_block',
        job_action => 'drop_old_partition;',
        start_date => to_timestamp_tz('2016-07-06 23:00:00 Europe/Berlin', 'yyyy-mm-dd hh24:mi:ss tzr'),
        repeat_interval => 'freq = daily',
        job_class => 'default_job_class',
        auto_drop => false,
	enabled => true,
	comments  => 'Procedure drops obsolete partition'
    );
end;

Но в логах на запуск - дырка от бублика...
Код: plaintext
1.
2.
3.
select * from USER_SCHEDULER_JOB_LOG where job_name = 'HOUSEKEEPER';

no rows selected

Не так задал интервал?

job_action => 'begin drop_old_partition; end;',
...
Рейтинг: 0 / 0
scheduler job не запускается?
    #39272472
receiver
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Спасибо!
...
Рейтинг: 0 / 0
scheduler job не запускается?
    #39272473
Фотография Fogel
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Либо

job_type => 'stored_procedure',
job_action => 'drop_old_partition',

По поводу временного интервала, надо указать время:

repeat_interval => 'freq = daily;byhour=23;byminute=00;bysecond=00',
...
Рейтинг: 0 / 0
scheduler job не запускается?
    #39272494
receiver
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Не, все равно не работает!
Пробую по-разному.
Один к одному с работающими job'ами.
Без результата.
Уже совсем просто
Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
OWNER	    TEST_SCHEMA
JOB_NAME	HOUSEKEEPER
JOB_CLASS	DEFAULT_JOB_CLASS
ENABLED	TRUE
JOB_TYPE	PLSQL_BLOCK
JOB_ACTION	begin drop_old_partition; end;
NUMBER_OF_ARGUMENTS	0
SCHEDULE_TYPE	CALENDAR
START_DATE	12.07.16 14:23:00,000000000 EUROPE/MOSCOW
REPEAT_INTERVAL	freq = minutely; interval = 1

не работает!


job_queue_processes = 100
...
Рейтинг: 0 / 0
scheduler job не запускается?
    #39272498
receiver
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Занятно, первый вариант моего поста,
Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
begin                                                       
    dbms_scheduler.create_job ( 
        job_name => 'HOUSEKEEPER',
        job_type => 'plsql_block',
        job_action => 'drop_old_partition;',
        start_date => to_timestamp_tz('2016-07-06 23:00:00 Europe/Berlin', 'yyyy-mm-dd hh24:mi:ss tzr'),
        repeat_interval => 'freq = daily',
        job_class => 'default_job_class',
        auto_drop => false,
	enabled => true,
	comments  => 'Procedure drops obsolete partition'
    );
end;

без всяких изменений,
оказывается, вполне работает на другом сервере

что еще может влиять на запуск job,
кроме job_queue_processes?
...
Рейтинг: 0 / 0
scheduler job не запускается?
    #39272524
landy
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
вот как-то нашел, м б поможет
Код: plsql
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
--1) job_queue_processes may be too low (this is the most common problem)
--The value of job_queue_processes limits the total number of dbms_scheduler
--and dbms_job jobs that can be running at a given time.
--To check whether this is the case check the current value of
--job_queue_processes with

select value from v$parameter where name='job_queue_processes';

--Then check the number of running jobs

select count(*) from dba_scheduler_running_jobs;
select count(*) from dba_jobs_running;

--If this is the problem you can increase the parameter using
alter system set job_queue_processes=200;

--2) max_job_slave_processes may be too low
--If this parameter is not NULL then it limits how many dbms_scheduler jobs can
--    be running at a time. To check whether this is the problem,  check the current
--    value using

select value from dba_scheduler_global_attribute
    where attribute_name='MAX_JOB_SLAVE_PROCESSES';

-- Then check the number of running jobs

select count(*) from dba_scheduler_running_jobs;

--If this is the problem you can increase the number or just NULL it out using

exec dbms_scheduler.set_scheduler_attribute('max_job_slave_processes', null)

--3) sessions may be too low
--This parameter limits the number of sessions at any time. Every Scheduler job
--requires 2 sessions. To check whether this is the problem,  check the current
--valule using

select value from v$parameter where name='sessions';

--Then check the current number of sessions using

select count(*) from v$session ;

--If the numbers are too close you can increase the maximum using
alter system set job_queue_processes=400;
--4) Have you recently applied a timezone update patch or upgraded the database
--to a version with newer timezone information ? If you skipped any steps when
--updating the timezone information,  jobs may not run. To check whether this
--is the case try doing

select * from sys.scheduler$_job;

--and

select * from sys.scheduler$_window;

--and make sure they finish without errors.
--If it throws a timezone warning,  reapply the upgrade or
--timezone patch making sure to follow all the steps.

--9) Has the Scheduler been disabled ? This is not a supported action
--but it is possible that someone has done it anyway. To check this do

select value from dba_scheduler_global_attribute where attribute_name='SCHEDULER_DISABLED'

--If this query returns TRUE then you can fix this using

 exec dbms_scheduler.set_scheduler_attribute('scheduler_disabled', 'false');

--6) If a simple run-once job doesn't run,  you can try restarting the scheduler as follows.
--- start here --------
exec dbms_scheduler.set_scheduler_attribute('SCHEDULER_DISABLED',  'TRUE');
alter system set job_queue_processes=0;
exec dbms_ijob.set_enabled(FALSE);

alter system flush shared_pool;
alter system flush shared_pool;

exec dbms_ijob.set_enabled(TRUE);
alter system set job_queue_processes=400;
exec dbms_scheduler.set_scheduler_attribute('SCHEDULER_DISABLED',  'FALSE');

----stop here --------
...
Рейтинг: 0 / 0
7 сообщений из 7, страница 1 из 1
Форумы / Oracle [игнор отключен] [закрыт для гостей] / scheduler job не запускается?
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]