查看所有job
select from dba_jobs;
查看正在运行的job
select from dba_jobs_running;
select job,log_user,priv_user,schema_user,BROKEN from dba_jobs where job=545;
查看数据库建立的回话情况
select sid,serial#,username,program,machine,status
from v$session;
查看对应sid的sql_id
select * from v$session where sid=2272 or sid=327;
知道sql_id后查看sql语句
select SQL_TEXT from v$sql where sql_id='3f18ygbqg41mw';
给MESPRD赋权
grant execute on DBMS_WORKLOAD_REPOSITORY to MESPRD;
kill会话
alter system kill session 'sid,serial#';
alter system kill session '327,8133';
查看进程的spid
select spid, program from v$process
where program!= 'PSEUDO'
and addr not in (select paddr from v$session)
and addr not in (select paddr from v$bgprocess)
and addr not in (select paddr from v$shared_server);
!ps -ef|grep spid|grep -v grep;
查看进程的spid
SELECT s.username,s.status,
x.ADDR,x.KSLLAPSC,x.KSLLAPSN,x.KSLLASPO,x.KSLLID1R,x.KSLLRTYP,
decode(bitand (x.ksuprflg,2),0,null,1)
FROM x$ksupr x,v$session s
WHERE s.paddr(+)=x.addr
and bitand(ksspaflg,1)!=0;
查看进程的spid
select spid,program from v$process where pid in(327,2272);
成都创新互联主要从事网站制作、成都网站设计、网页设计、企业做网站、公司建网站等业务。立足成都服务平川,十多年网站建设经验,价格优惠、服务专业,欢迎来电咨询建站服务:028-86922220
本文题目:查看oracle数据库job及会话信息
转载注明:https://www.cdcxhl.com/article16/jdhpdg.html
成都网站建设公司_创新互联,为您提供App开发、网站营销、ChatGPT、微信公众号、网站内链、网站设计公司
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联