---
title: "如何查看Oracle的连接数"
author: "yaofeng911"
date: "2010-10-18T16:55:15Z"
tags: ["Oracle", "SQL"]
categories: ["数据库"]
slug: "oracle"
draft: false
lastmod: "2010-10-18T16:55:15Z"
id: 787646
url: "https://yaofeng911.iteye.com/blog/787646"
---

在数据库开发中，打开数据库连接是很慢的。怎样oracle当前的连接数呢？只需要用下面的SQL语句查询一下就可以了。  
select * from v$session where username is not null

查看不同用户的连接数  
select username,count(username) from v$session where username is not null group by username