修改oracle中processes值的方法:1、利用“alter system set processes=數(shù)值 scope=spfile;”語句修改processes的值;2、重新啟動(dòng)oracle數(shù)據(jù)庫后即可修改processes的值。
本教程操作環(huán)境:Windows10系統(tǒng)、Oracle 11g版、Dell G3電腦。
怎么修改oracle的processes值
alter system set processes=數(shù)值 scope=spfile;
可以用如下命令查看數(shù)據(jù)庫連接的消耗情況
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
在 oracle中,要經(jīng)常查看process: 查看ORACLE最大進(jìn)程數(shù): SQL> select count(*) from v$session #連接數(shù) SQL> Select count(*) from v$session where status='ACTIVE' #并發(fā)連接數(shù) SQL> show parameter processes #最大連接 SQL> alter system set processes = value scope = spfile;重啟數(shù)據(jù)庫 #修改連接 unix 1個(gè)用戶session 對應(yīng)一個(gè)操作系統(tǒng) process 而 windows體現(xiàn)在線程 ------------------------------------------------------------------------------ 修改ORACLE最大進(jìn)程數(shù): 使用sys,以sysdba權(quán)限登錄: 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; 系統(tǒng)已更改。 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; 文件已創(chuàng)建。 重啟數(shù)據(jù)庫, 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 記錄的是數(shù)據(jù)庫會(huì)話曾經(jīng)達(dá)到的最大值 查詢數(shù)據(jù)庫自啟動(dòng)以來最大的并發(fā)數(shù)量 select * from v$license
-查看當(dāng)前有哪些用戶正在使用數(shù)據(jù)
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;
推薦教程:《Oracle視頻教程》