oracle关闭apex的jobs

2019-09-03

APEX_030200是APEX产品数据库用户。包含500多个tables。4001和4002 jobs。

1、conn /as sysdba
alter user APEX_030200 account unlock;
alter user APEX_030200 indentified by oracle;

2、删除apex用户
@?/apex/apxremov.sql
或者
start ?/apex/apxremov.sql
1)、@ 是调用脚本标识,相当于start或者mysql的source
2)、?问号是指你的oracle 安装路径 ,相当于$ORACLE_HOME
或者
SQL> SELECT username
2 FROM dba_users
3 WHERE (username LIKE 'FLOWS_%' OR username LIKE 'APEX_%')
4 AND username NOT IN (
5 SELECT 'FLOWS_FILES'
6 FROM dual
7 UNION
8 SELECT 'APEX_PUBLIC_USER' FROM dual
9 UNION
10 SELECT schema
11 FROM dba_registry
12 WHERE comp_id = 'APEX');

DROP USER APEX_030200 CASCADE;

3、select broken,count(*) from dba_jobs group by broken;

4、select s.sid,s.serial#,s.username,s.machine,s.program,p.spid from v$session s,v$process p where s.paddr=p.addr and s.schemaname='SYS' order by 4;

########################################################
show parameter job_queue_processes; 1000
alter system set job_queue_processes=0;

1、create jobs
variable jobno number;

dbms_job.submit(:jobno, —-job号

'your_procedure;',—-执行的存储过程, ';'不能省略

next_date, —-下次执行时间

'interval' —-每次间隔时间,interval以天为单位

);

2、删除job: dbms_job.remove(jobno);

3、修改要执行的操作: job:dbms_job.what(jobno, what);

4、修改下次执行时间:dbms_job.next_date(jobno, next_date);

5、修改间隔时间:dbms_job.interval(jobno, interval);

6、启动job: dbms_job.run(jobno);

7、停止job: dbms.broken(jobno, broken, nextdate); –broken为boolean值

分类:Linux数据库 | 标签: |

相关日志

评论被关闭!