---
title: "oracle 查看数据库连接"
author: "llhdf"
date: "2010-06-08T10:29:25Z"
tags: []
categories: ["数据库"]
slug: "oracle"
draft: false
lastmod: "2010-06-08T10:29:25Z"
id: 686702
url: "https://llhdf.iteye.com/blog/686702"
---

select count(*) from v$session where username is not null order by machine;   
select * from v$session where username is not null order by machine;   
select count(*) from v$session where username is not null and machine='test1' order by machine ;   
select count(*) from v$session where username is not null and machine='localhost.localdomain' order by machine ;   
select * from v$process where username is not null ;   
select * from V$SHARED_SERVER_MONITOR ;   
SELECT * FROM v$open_cursor;   
SELECT sql_text,COUNT(*) FROM v$sql s , v$session se WHERE se.prev_hash_value =s.hash_value GROUP BY sql_text;