Home > Database > Oracle > How to modify the processes value of oracle

How to modify the processes value of oracle

WBOY
Release: 2022-04-12 18:58:36
Original
3452 people have browsed it

How to modify the value of processes in Oracle: 1. Use the "alter system set processes=numeric scope=spfile;" statement to modify the value of processes; 2. You can modify the value of processes after restarting the Oracle database.

How to modify the processes value of oracle

The operating environment of this tutorial: Windows 10 system, Oracle 11g version, Dell G3 computer.

How to modify the processes value of oracle

alter system set processes=数值 scope=spfile;
Copy after login

You can use the following command to check the consumption of database connections

select  b.MACHINE, b.PROGRAM, b.USERNAME, count(*) from v$process a, v$session b where a.ADDR = b.PADDR and  b.USERNAME is not null   
group by  b.MACHINE, b.PROGRAM, b.USERNAME order by count(*) desc
Copy after login

在 oracle中,要经常查看process:
查看ORACLE最大进程数:
SQL> select count(*) from v$session  #连接数
SQL> Select count(*) from v$session where status='ACTIVE' #并发连接数
SQL> show parameter processes  #最大连接
SQL> alter system set processes = value scope = spfile;重启数据库  #修改连接
unix 1个用户session 对应一个操作系统 process
而 windows体现在线程
------------------------------------------------------------------------------
修改ORACLE最大进程数:
使用sys,以sysdba权限登录:
SQL> show parameter processes;
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
aq_tm_processes                      integer     1
db_writer_processes                  integer     1
job_queue_processes                  integer     10
log_archive_max_processes            integer     1
processes                            integer     150
SQL> alter system set processes=300 scope = spfile;
系统已更改。
SQL> show parameter processes;
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
aq_tm_processes                      integer     1
db_writer_processes                  integer     1
job_queue_processes                  integer     10
log_archive_max_processes            integer     1
processes                            integer     150
SQL> create pfile from spfile;
文件已创建。
重启数据库,
 SQL> show parameter processes;
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
aq_tm_processes                      integer     1
db_writer_processes                  integer     1
job_queue_processes                  integer     10
log_archive_max_processes            integer     1
processes                            integer     300
还有可以查询

select sessions_highwater  from v$license;

sessions_highwater 记录的是数据库会话曾经达到的最大值

查询数据库自启动以来最大的并发数量

select * from v$license
Copy after login

-View the current Which users are using data

SELECT osuser, a.username,cpu_time/executions/1000000||'s', sql_fulltext,machine 
from v$session a, v$sqlarea b
where a.sql_address =b.address order by cpu_time/executions desc;
Copy after login

Recommended tutorial: "Oracle Video Tutorial"

The above is the detailed content of How to modify the processes value of oracle. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template