如何检查允许连接到 Oracle 数据库的最大数量?

How to check the maximum number of allowed connections to an Oracle database?(如何检查允许连接到 Oracle 数据库的最大数量?)
本文介绍了如何检查允许连接到 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 数据库的最大数量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Execute complex raw SQL query in EF6(在EF6中执行复杂的原始SQL查询)
Hibernate reactive No Vert.x context active in aws rds(AWS RDS中的休眠反应性非Vert.x上下文处于活动状态)
Bulk insert with mysql2 and NodeJs throws 500(使用mysql2和NodeJS的大容量插入抛出500)
Flask + PyMySQL giving error no attribute #39;settimeout#39;(FlASK+PyMySQL给出错误,没有属性#39;setTimeout#39;)
auto_increment column for a group of rows?(一组行的AUTO_INCREMENT列?)
Sort by ID DESC(按ID代码排序)