各位老师,请问在obclient 提示符下执行下面的语句:
BEGIN
DBMS_SCHEDULER.CREATE_JOB(
job_name => ‘create_cnt’,
job_type => ‘PLSQL_BLOCK’,
job_action => ‘begin create_table; end;’,
start_date => SYSTIMESTAMP,
repeat_interval => ‘FREQ=HOURLY; INTERVAL=1’,
end_date => NULL,
enabled => FALSE,
comments => ‘Schedule create_table to run hourly’);
COMMIT;
END
总是报下面的错误,
You have an error in your SQL syntax; check the manual that corresponds to your OceanBase version for the right syntax to use near ‘BEGIN’ at line 1
请问是什么问题呢?建立脚本去执行也不行,另外我执行官网https://www.oceanbase.com/docs/enterprise-oceanbase-database-cn-10000000000945870上的页面下面的语句,我放到脚本和提示符下都报错,这段语句要加了分界符也不行,为什么官网给的脚本也执行不了,我用的是demo单机部署,跟这个有关系么?
另外无论是在obclient提示符下,还是在外部用obclient调用sql脚本,还是把脚本创建成存储过程,总是到7分钟左右的时候就超时,我参数设置如下:
±--------------------±-----------------+
| Variable_name | Value |
±--------------------±-----------------+
| connect_timeout | 8640000 |
| interactive_timeout | 28800 |
| lock_wait_timeout | 8640000 |
| net_read_timeout | 8640000 |
| net_write_timeout | 8640000 |
| ob_pl_block_timeout | 3216672000000000 |
| ob_query_timeout | 8640000000000 |
| ob_trx_idle_timeout | 86400000000 |
| ob_trx_lock_timeout | 8640000000000 |
| ob_trx_timeout | 8640000000000 |
| wait_timeout | 8640000 |
±--------------------±-----------------+
还有就是net_read_timeout设过之后,过一会似乎还会变成60,真是有点被oceanbase整懵了,相关的资料也找不到。
1 个赞
https://www.oceanbase.com/docs/common-oceanbase-database-cn-10000000001699761
CREATE_JOB仅适用于 OceanBase 数据库企业版
1 个赞
net_read_timeout 有变化可能是因为生效范围没有指定为Global
1 个赞