• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

oracle connection的相关信息

mysql 搞代码 4年前 (2022-01-09) 32次浏览 已收录 0个评论

oracle connection的相关信息

oracle connection的相关信息

查看有哪些用户连接

select s.osuser os_user_name, decode(sign(48 – command), 1, to_char(command),

  ’Action Code #’ || to_char(command) ) action, p.program oracle_process,

  status session_status, s.terminal terminal, s.program program,

  s.username user_name, &nbs

  p; s.fixed_

table_sequence activity_meter, ” query,

  0 memory, 0 max_memory, 0 cpu_usage, s.sid, s.serial# serial_num

  from v$session s, v$process p where s.paddr=p.addr and s.type = ‘USER’

  order by s.username, s.osuser

2)根据v.sid查看对应连接的资源占用等情况

select n.name,

  v.value,

  n.class,

  n.statistic#

  from v$statname n,

  v$sesstat v

  where v.sid = 71 and

  v.statistic# = n.statistic#

  order by n.class, n.statistic#
   

3)根据sid查看对应连接正在运行的sql
  

select /*+ PUSH_SUBQ */

  command_type,

  sql_text,

  sharable_mem,

  persistent_mem,

  runtime_mem,

  sorts,

  version_count,

  loaded_versions,

  open_versions,

  users_opening,

  executions,

  users_executin本文来源gaodai$ma#com搞$$代**码网g,

  loads,

  first_load_time,

  invalidations,

  parse_calls,

  disk_reads,

  buffer_gets,

  rows_processed,

  sysdate start_time,

  sysdate finish_time,

  ’>’ || address sql_address,

  ’N’ status

  from v$sqlarea

  where address = (select sql_address from v$session where sid = 71)


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:oracle connection的相关信息

喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址