我如何获得Oracle,看看正在运行什么程序? [英] How do I get Oracle, see what procedures are running?
本文介绍了我如何获得Oracle,看看正在运行什么程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
下午好.如何获得Oracle,看看正在运行什么程序?
Good afternoon. How do I get Oracle, see what procedures are running?
推荐答案
根据您的需要,这可能就足够了(但是依赖于对v $ session和dba_objects的访问):
Depending on your needs, this might suffice (but relies on access to v$session and dba_objects):
select 'CALLED PLSQL', vs.username, d_o.object_name -- whatever info you need
from dba_objects d_o
inner join
v$session vs
on d_o.object_id = vs.plsql_entry_object_id
union all
select 'CURRENT PLSQL', vs.username, d_o.object_name
from dba_objects d_o
inner join
v$session vs
on d_o.object_id = vs.plsql_object_id
根据文档:
PLSQL_ENTRY_OBJECT_ID-堆栈上最顶层的PL/SQL子程序的ID;如果堆栈上没有PL/SQL子程序,则为NULL
PLSQL_ENTRY_OBJECT_ID - ID of the top-most PL/SQL subprogram on the stack; NULL if there is no PL/SQL subprogram on the stack
PLSQL_OBJECT_ID-当前正在执行的PL/SQL子程序的对象ID;如果执行SQL,则为NULL
PLSQL_OBJECT_ID - Object ID of the currently executing PL/SQL subprogram; NULL if executing SQL
这篇关于我如何获得Oracle,看看正在运行什么程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文