如何检查与Oracle数据库的最大允许连接数? [英] How to check the maximum number of allowed connections to an Oracle database?

查看:99
本文介绍了如何检查与Oracle数据库的最大允许连接数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用SQL检查Oracle数据库允许的最大连接数的最佳方法是什么?最后,我想显示当前的会话数和允许的总数,例如目前,使用了80个连接中的23个."

What's the best way, using SQL, to check the maximum number of connections that is allowed for an Oracle database? In the end, I would like to show the current number of sessions and the total number allowed, e.g. "Currently, 23 out of 80 connections are used".

推荐答案

在确定Oracle数据库支持的连接数时可能会有一些不同的限制.最简单的方法是使用SESSIONS参数和V $ SESSION,即

There are a few different limits that might come in to play in determining the number of connections an Oracle database supports. The simplest approach would be to use the SESSIONS parameter and V$SESSION, i.e.

数据库被配置为允许的会话数

The number of sessions the database was configured to allow

SELECT name, value 
  FROM v$parameter
 WHERE name = 'sessions'

当前活动的会话数

SELECT COUNT(*)
  FROM v$session

但是,正如我所说,在数据库级别和操作系统级别,以及是否已配置共享服务器,都存在其他潜在限制.如果忽略共享服务器,则在达到SESSIONS参数的限制之前,您很可能会达到PROCESSES参数的限制.而且您可能会达到操作系统限制,因为每个会话都需要一定数量的RAM.

As I said, though, there are other potential limits both at the database level and at the operating system level and depending on whether shared server has been configured. If shared server is ignored, you may well hit the limit of the PROCESSES parameter before you hit the limit of the SESSIONS parameter. And you may hit operating system limits because each session requires a certain amount of RAM.

这篇关于如何检查与Oracle数据库的最大允许连接数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆