易截截图软件、单文件、免安装、纯绿色、仅160KB

Oracle job 管理(转载)


Oracle job 管理
 
 
SVRMGR> select * from dba_jobs;
初始化相关参数job_queue_processes
alter system set job_queue_processes=39 scope=spfile;//最大值不能超过1000  ;job_queue_interval = 10  //调度作业刷新频率秒为单位
DBA_JOBS describes all jobs in the database.
USER_JOBS describes all jobs owned by the current user
1  select job,what,to_char(last_date,'yyyy-mm-dd HH24:mi:ss'),to_char(next_date,'yyyy-mm-dd HH24:m),interval from dba_jobs where job in (325,295)
2 select job,what,last_date,next_date,interval from  dba_jobs where job in (1,3);
查询job的情况。
show paramter background_dump_dest.
看alter.log 和trace
SVRMGR> select * from dba_jobs;
初始化相关参数job_queue_processes
alter system set job_queue_processes=39 scope=spfile;//最大值不能超过1000
job_queue_interval = 10  //调度作业刷新频率秒为单位
DBA_JOBS describes all jobs in the database.
USER_JOBS describes all jobs owned by the current user
1  select job,what,to_char(last_date,'yyyy-mm-dd HH24:mi:ss'),to_char(next_date,'yyyy-mm-dd HH24:m),interval from dba_jobs where job in (325,295)
2 select job,what,last_date,next_date,interval from  dba_jobs where job in (1,3);
查询job的情况。
show paramter background_dump_dest.
看alter.log 和trace
请问我如何停止一个JOB
SQL> exec dbms_job.broken(1,true)
PL/SQL 过程已成功完成。
SQL>commit  //必须提交否则无效
启动作业
SQL> exec dbms_job.broken(1,false)
PL/SQL 过程已成功完成。
停其他用户的job
SQL>exec sys.dbms_ijob.broken(98,true);
SQL>commit;
============================
exec dbms_job.broken(:job) 停止
exec dbms_job.broken(186,true) //标记位broken
exec dbms_job.broken(186,false)//标记为非broken
exec dbms_job.broken(186,false,next_day(sysdate,'monday')) //标记为非broken,指定执行时间
exec dbms_job.remove(:job);删除
exec dbms_job.remove(186);
commit;
把一个broken job重新运行
三、查看相关job信息
1、相关视图
dba_jobs
all_jobs
user_jobs
dba_jobs_running 包含正在


相关文档:

Oracle 修改数据文件的路径和名称

Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有 1985-2001 Microsoft Corp.
C:\Documents and Settings\Admin>sqlplus "/ as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Nov 20 19:31:44 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g E ......

ORACLE 查看用户密码修改时间

SQL> show user
USER is "SYS"
SQL> create user t1 identified by t1;
create user t1 identified by t1
*
ERROR at line 1:
ORA-01920: user name 'T1' conflicts with another user or role name
SQL> drop user t1 cascade;
User dropped.
SQL> create user t1 identified by t1;
Us ......

ORACLE ORA

对于x$的情况
SQL> grant select on sys.x$bh to t1;
grant select on sys.x$bh to t1
ERROR at line 1:
ORA-02030: can only select from fixed tables/views
对于fixed tables/views只能select
如果想把x$bh的select权限grant给其他用户怎么办呢,可以变通一下
SQL> create view xbh as select * from sys.x$ ......

Windows下命令行启动Oracle 10g/Database Control

 
1.启动TNS监听
C:\Documents and Settings\Administrator>lsnrctl start
LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 13-7月 -2008 12:0
3:55
Copyright (c) 1991, 2005, Oracle. All rights reserved.
启动tnslsnr: 请稍候...
TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Pr ......

如何解除Oracle 帐号锁定(the account is locked)

解决办法:
1.使用Oracle用户登录系统,在CMD中启用SQLPLUS
2.sqlplus /nolog
3.SQL> connect /as sysdba
      Connected.
4.SQL> alter user system account unlock;
       User altered.
锁定账号方法:
1.SQL> alter user system account lock;
     & ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号