ORACLE查看并修改最大連接數(shù)的具體步驟
第一步,在cmd命令行,輸入sqlplus
第二步,根據(jù)提示輸入用戶名與密碼
1. 查看processes和sessions參數(shù)
SQL> show parameter processes
NAME TYPE VALUE
db_writer_processes integer 1
gcs_server_processes integer 0
job_queue_processes integer 10
log_archive_max_processes integer 2
processes integer 50
SQL> show parameter sessions
NAME TYPE VALUE
license_max_sessions integer 0
license_sessions_warning integer 0
logmnr_max_persistent_sessions integer 1
sessions integer 60
shared_server_sessions integer
2. 修改processes和sessions值
SQL> alter system set processes=300 scope=spfile;
系統(tǒng)已更改。
SQL> alter system set sessions=335 scope=spfile;
系統(tǒng)已更改。
3. 修改processes和sessions值必須重啟oracle服務(wù)器才能生效
ORACLE的連接數(shù)(sessions)與其參數(shù)文件中的進(jìn)程數(shù)(process)有關(guān),它們的關(guān)系如下:
sessions=(1.1*process+5)
摘(二)
查詢數(shù)據(jù)庫(kù)當(dāng)前進(jìn)程的連接數(shù):
select count(*) from v$process;
查看數(shù)據(jù)庫(kù)當(dāng)前會(huì)話的連接數(shù):
elect count(*) from v$session;
查看數(shù)據(jù)庫(kù)的并發(fā)連接數(shù):
select count(*) from v$session where status='ACTIVE';
查看當(dāng)前數(shù)據(jù)庫(kù)建立的會(huì)話情況:
select sid,serial#,username,program,machine,status from v$session;
查詢數(shù)據(jù)庫(kù)允許的最大連接數(shù):
select value from v$parameter where name = 'processes';
或者:show parameter processes;
修改數(shù)據(jù)庫(kù)允許的最大連接數(shù):
alter system set processes = 300 scope = spfile;
(需要重啟數(shù)據(jù)庫(kù)才能實(shí)現(xiàn)連接數(shù)的修改)
重啟數(shù)據(jù)庫(kù):
shutdown immediate;
startup;
查看當(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;
備注:UNIX 1個(gè)用戶session對(duì)應(yīng)一個(gè)操作系統(tǒng)process,而Windows體現(xiàn)在線程。
啟動(dòng)oracle
su - oracle sqlplus system/pwd as sysdba //進(jìn)入sql startup //啟動(dòng)數(shù)據(jù)庫(kù) lsnrctl start //啟動(dòng)監(jiān)聽(tīng) sqlplus "/as sysdba" shutdown immediate; startup mount; alter database open;
相關(guān)文章
oracle數(shù)據(jù)庫(kù)去除重復(fù)數(shù)據(jù)常用的方法總結(jié)
數(shù)據(jù)清理的時(shí)候常常會(huì)清除表中的重復(fù)的數(shù)據(jù),那么在oracle中怎么處理呢?下面這篇文章主要給大家介紹了關(guān)于oracle數(shù)據(jù)庫(kù)去除重復(fù)數(shù)據(jù)常用的方法,需要的朋友可以參考下2022-05-05Oracle11g r2 卸載干凈重裝的詳細(xì)教程(親測(cè)有效已重裝過(guò))
Oracle 的安裝和卸載相較于其他 mysql 要麻煩些,小編特此分享一篇教程關(guān)于Oracle11g 徹底卸載干凈并重新安裝,有需要的朋友可以參考下本文2021-06-06Oracle根據(jù)時(shí)間查詢的一些常見(jiàn)情況匯總
根據(jù)時(shí)間查詢是我們?nèi)粘i_(kāi)發(fā)中經(jīng)常會(huì)遇到的一個(gè)功能,下面這篇文章主要給大家介紹了關(guān)于Oracle根據(jù)時(shí)間查詢的一些常見(jiàn)情況,文中通過(guò)實(shí)例代碼介紹的非常詳細(xì),需要的朋友可以參考下2022-08-08oracle中動(dòng)態(tài)SQL使用詳細(xì)介紹
Oracle編譯PL/SQL程序塊分為兩個(gè)種:通常靜態(tài)SQL采用前一種編譯方式,而動(dòng)態(tài)SQL采用后一種編譯方式,需要了解的朋友可以參考下2012-11-11ORACLE數(shù)據(jù)庫(kù)日常維護(hù)知識(shí)點(diǎn)總結(jié)
這篇文章主要介紹了ORACLE數(shù)據(jù)庫(kù)日常維護(hù)知識(shí)點(diǎn)總結(jié),對(duì)于維護(hù)oracle數(shù)據(jù)庫(kù)的朋友可以參考下2016-06-06解決navicat 鏈接oracle時(shí)出現(xiàn)的各種問(wèn)題
這篇文章主要介紹了解決navicat 鏈接oracle時(shí)出現(xiàn)的各種問(wèn)題,非常不錯(cuò),具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2018-08-08Oracle數(shù)據(jù)庫(kù)兩表關(guān)聯(lián)更新的問(wèn)題
需要寫(xiě)一個(gè)更新語(yǔ)句,但是更新的判斷條件是兩個(gè)表關(guān)聯(lián)查詢出來(lái)的,本文通過(guò)實(shí)例代碼給大家講解Oracle數(shù)據(jù)庫(kù)兩表關(guān)聯(lián)更新的問(wèn)題及遇到的坑,感興趣的朋友一起看看吧2023-11-11Oracle如何設(shè)置表空間數(shù)據(jù)文件大小
這篇文章主要介紹了Oracle如何設(shè)置表空間數(shù)據(jù)文件大小,文中講解非常細(xì)致,幫助大家更好的理解和學(xué)習(xí),感興趣的朋友可以了解下2020-07-07