Query, that works in ide and i want to execute:
begin
sys.dbms_scheduler.create_schedule(schedule_name => 'U6_GB.SCHED_DAILY_7_30',
start_date => to_date(null),
repeat_interval => 'Freq=Daily;ByHour=7;ByMinute=30',
end_date => to_date(null),
comments => '');
end;
Procedure signature:
DBMS_SCHEDULER.CREATE_SCHEDULE (
schedule_name IN VARCHAR2,
start_date IN TIMESTAMP WITH TIMEZONE DEFAULT NULL,
repeat_interval IN VARCHAR2,
end_date IN TIMESTAMP WITH TIMEZONE DEFAULT NULL,
comments IN VARCHAR2 DEFAULT NULL);
I have try:
from django.db import connection
cursor = connection.cursor()
cursor.callproc('''
begin
sys.dbms_scheduler.create_schedule(schedule_name => 'U6_GB.SCHED_DAILY_7_30',
start_date => to_date(null),
repeat_interval => 'Freq=Daily;ByHour=7;ByMinute=30',
end_date => to_date(null),
comments => '');
end;
''')
And I got this:
return self.cursor.callproc(procname)
cx_Oracle.DatabaseError: ORA-06550: line 9, column 2:
PLS-00103: Encountered the symbol ")" when expecting one of the following:
Then i was try:
cursor.callproc('SYS.DBMS_SCHEDULER.CREATE_SCHEDULE', (
"U6_GB.SCHED_DAILY_7_30",
"to_date(null)",
"Freq=Daily;ByHour=7;ByMinute=30",
"to_date(null)",
"",
))
And I got that:
return self.cursor.callproc(procname, params)
cx_Oracle.DatabaseError: ORA-01858: a non-numeric character was found where a numeric was expected
ORA-06512: at line 1
What am I doing wrong?
Python 3.6.2 (v3.6.2:5fd33b5, Jul 8 2017, 04:14:34) [MSC v.1900 32 bit (Intel)] on win32
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0
cx-Oracle==6.0.3