Гость
Целевая тема:
Создать новую тему:
Автор:
Форумы / Oracle [игнор отключен] [закрыт для гостей] / scheduler job не запускается? / 7 сообщений из 7, страница 1 из 1
12.07.2016, 14:33:22
    #39272444
receiver
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
scheduler job не запускается?
Здравствуйте!

На схеме создан 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
12.07.2016, 14:54:16
    #39272464
Fogel
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
scheduler job не запускается?
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
12.07.2016, 15:05:01
    #39272472
receiver
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
scheduler job не запускается?
Спасибо!
...
Рейтинг: 0 / 0
12.07.2016, 15:05:14
    #39272473
Fogel
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
scheduler job не запускается?
Либо

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

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

repeat_interval => 'freq = daily;byhour=23;byminute=00;bysecond=00',
...
Рейтинг: 0 / 0
12.07.2016, 15:37:36
    #39272494
receiver
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
scheduler job не запускается?
Не, все равно не работает!
Пробую по-разному.
Один к одному с работающими 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
12.07.2016, 15:43:34
    #39272498
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;

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

что еще может влиять на запуск job,
кроме job_queue_processes?
...
Рейтинг: 0 / 0
12.07.2016, 16:13:43
    #39272524
landy
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
scheduler job не запускается?
вот как-то нашел, м б поможет
Код: 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
Форумы / Oracle [игнор отключен] [закрыт для гостей] / scheduler job не запускается? / 7 сообщений из 7, страница 1 из 1
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


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