|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。如果您注册时有任何问题请联系客服QQ: 83569622 。
您需要 登录 才可以下载或查看,没有帐号?注册
x
这几个语句是ERP解决问题时经常用到的。经常用到的人加我的qq 4036968 讨论下啊。我怎么找不到erp管理的板块呢??
看数据库什么的?
select vss.sid,vss.* from v$process vps ,v$session vss
where vps.spid='&spid'
and vss.PADDR=vps.ADDR
锁住的对象:
SELECT o.object_name,l.session_id,l.process,l.locked_mode FROM v$locked_object l , dba_objects o WHERE
o.object_id=l.object_id
谁在系统中:
SELECT p.pid oracleprocess,s.sid,s.serial#,s.status,s.lockwait,s.process,s.MODULE,s.action,a.user_name,a.user_form_name
FROM v$process p,v$session s,FND_SIGNON_AUDIT_VIEW a WHERE p.addr=s.paddr AND a.pid=p.pid
and s.sid='&sid'
and p.spid='&spid'
查找当前被用户锁定的表:
SELECT dob.OBJECT_NAME Table_Name,lo.SESSION_ID,vss.SERIAL#,vss.action Action,vss.osuser OSUSER,
vss.process AP_PID,VPS.SPID DB_PID
from v$locked_object lo, dba_objects dob, v$session vss, V$PROCESS VPS
where lo.OBJECT_ID = dob.OBJECT_ID
and lo.SESSION_ID = vss.SID
AND VSS.paddr = VPS.addr
order by 2,3,DOB.object_name
已知OS的appl<SID>属主的PID进程查APPS的用户:
select d.user_name "User Name", b.sid SID,b.serial# "Serial#", c.spid "srvPID", a.SPID "ClPID", to_char
(START_TIME,'DD-MON-YY HH:MM:SS') "STime" from fnd_logins a, v$session b, v$process c, fnd_user d
where b.paddr = c.addr and a.pid=c.pid and a.spid = b.process
and d.user_id = a.user_id and (d.user_name = 'USER_NAME' OR 1=1) and a.SPID = & ID |
|