删除非当前用户下的 JOB
上一篇 /
下一篇 2008-12-24 21:01:16
/ 个人分类:Oracle
- 文件版本: V1.0
- 开发商: 本站原创
- 文件来源: 本地
- 界面语言: 简体中文
- 授权方式: 免费
- 运行平台: Win9X/Win2000/WinXP
51Testing软件测试网c6`:d'}fMc
O 使用 dbms_job.remove 移除 job 时碰到了 ORA-23421 错误:51Testing软件测试网&VQhQ;l&k!DJ
ORA-23421: job number string is not a job in the job queue
^~3}}Y'\Or0Cause: There is no job visible to the caller with the given job number.
)\esHN0X`
a0Action: Choose the number of a job visible to the caller.51Testing软件测试网ah*f)K6cY
当时没想明白,明明该 job 存在为什么说不在 job queue 中。后经同事提醒才想起来不能使用 dbms_job 包对非当前用户下的 job 进行操作,即使是 sysdba 也不能。这和 oracle 对 job 的权限设置策略有关。
I"s P"k4_o(NxS0SQL> show user51Testing软件测试网/YB@4I'}Msl~'F
USER is "SKY"51Testing软件测试网VDO5N!cs p1W
SQL> declare n number;
Ccs
Ho#vHcn
o02 begin51Testing软件测试网\'r}$uvqf;W_.M-`
3 dbms_job.submit(n,'null;',sysdate,'sysdate+1');51Testing软件测试网Q#UX.E _Du?#Fu#l.\
4 commit;
(i*?w2NP$Q3BwR05 end;51Testing软件测试网"O3aP&V