Trying to create this job:
1
2
3
4
5
6
7
8
9
10
11
12
13
|
begin -- Test statements here
DBMS_SCHEDULER.CREATE_JOB (
job_name => 'JOB_1',
job_type => 'STORED_PROCEDURE',
job_action => 'BEGIN USER.PROCEDURE; END;',
start_date => sysdate,
repeat_interval => 'FREQ=MINUTELY; INTERVAL=5;',
-- end_date => NULL,
enabled => TRUE,
comments => 'Get data from api');
commit;
end; |
But i got this error: ORA-27452: %s is an invalid name for a database object
Found out that:
1) the action you are defineing, must be valid (duh)
2) if you are using the action as i am, the type is NOT STORED_PROCEDURE, its PLSQL_BLOCK
so changed it to:
1
2
3
4
5
6
7
8
9
10
11
12
13
|
begin -- Test statements here
DBMS_SCHEDULER.CREATE_JOB (
job_name => 'JOB_1',
job_type => 'PLSQL_BLOCK',
job_action => 'BEGIN USER.PROCEDURE; END;',
start_date => sysdate,
repeat_interval => 'FREQ=MINUTELY; INTERVAL=5;',
-- end_date => NULL,
enabled => TRUE,
comments => 'Get data from api');
commit;
end; |
相关推荐
#### ORA-00024: Object is in invalid state - **解释**: 对象处于无效状态。 - **解决方案**: 确认对象状态,必要时重建或修复该对象。 #### ORA-00025: Not implemented - **解释**: 请求的功能未实现。 - **...
#### ORA-00055: DML on a dictionary managed table/view is not supported - **描述**:不支持对字典管理的表/视图进行DML操作。 - **解决方法**:使用本地管理的表空间或禁用字典管理。 #### ORA-00056: '.' not...
- **命令**: `$ select owner, object_name, object_type, status from dba_objects where status='INVALID';` - **解释**: 查找所有状态为无效的对象。 - **注意事项**: 应当修复或删除所有无效对象以保持数据库...
- `SQL> SELECT distinct object_name FROM dba_objects WHERE status='INVALID';` #### 3. 调整 SGA 大小 在升级过程中,可能需要调整 SGA (Shared Global Area) 的大小,以确保数据库能够高效运行: - **检查...
WHERE A.TABLESPACE_NAME=B.TABLESPACE_NAME AND A.TABLESPACE_NAME=C.TABLESPACE_NAME; 7、查看数据库库对象 select owner, object_type, status, count(*) count# from all_objects group by owner, object_...
SELECT owner, object_name, object_type FROM dba_objects WHERE status= 'INVALID'; ``` ##### 1.6 检查所有回滚段状态 ```sql select segment_name, status from dba_rollback_segs; ``` - **segment_name**: ...
SELECT f.tablespace_name, a.total, f.free, round((f.free/a.total)*100) "%Free" FROM (SELECT tablespace_name, SUM(bytes/(1024*1024)) total FROM dba_data_files GROUP BY tablespace_name) a, (SELECT ...
SELECT owner, object_name, object_type FROM dba_objects WHERE status = 'INVALID'; ``` 5. **索引优化**:对索引进行定期分析以保持其高效性,例如: - 使用 `ANALYZE TABLE` 命令估算统计信息,例如:`...
ORACLE数据库系统是美国ORACLE公司(甲骨文)提供的以分布式数据库为核心的一组软件产品,是目前最流行的客户/服务器(CLIENT/SERVER)或B/S体系结构的数据库之一。 拉里•埃里森 就业前景 从就业与择业的...