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服務器才能生效
ORACLE的連接數(shù)(sessions)與其參數(shù)文件中的進程數(shù)(process)有關(guān),它們的關(guān)系如下:
sessions=(1.1*process+5)
摘(二)
查詢數(shù)據(jù)庫當前進程的連接數(shù):
select count(*) from v$process;
查看數(shù)據(jù)庫當前會話的連接數(shù):
elect count(*) from v$session;
查看數(shù)據(jù)庫的并發(fā)連接數(shù):
select count(*) from v$session where status='ACTIVE';
查看當前數(shù)據(jù)庫建立的會話情況:
select sid,serial#,username,program,machine,status from v$session;
查詢數(shù)據(jù)庫允許的最大連接數(shù):
select value from v$parameter where name = 'processes';
或者:show parameter processes;
修改數(shù)據(jù)庫允許的最大連接數(shù):
alter system set processes = 300 scope = spfile;
(需要重啟數(shù)據(jù)庫才能實現(xiàn)連接數(shù)的修改)
重啟數(shù)據(jù)庫:
shutdown immediate;
startup;
查看當前有哪些用戶正在使用數(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個用戶session對應一個操作系統(tǒng)process,而Windows體現(xiàn)在線程。
啟動oracle
su - oracle sqlplus system/pwd as sysdba //進入sql startup //啟動數(shù)據(jù)庫 lsnrctl start //啟動監(jiān)聽 sqlplus "/as sysdba" shutdown immediate; startup mount; alter database open;
相關(guān)文章
oracle數(shù)據(jù)庫去除重復數(shù)據(jù)常用的方法總結(jié)
數(shù)據(jù)清理的時候常常會清除表中的重復的數(shù)據(jù),那么在oracle中怎么處理呢?下面這篇文章主要給大家介紹了關(guān)于oracle數(shù)據(jù)庫去除重復數(shù)據(jù)常用的方法,需要的朋友可以參考下2022-05-05Oracle11g r2 卸載干凈重裝的詳細教程(親測有效已重裝過)
Oracle 的安裝和卸載相較于其他 mysql 要麻煩些,小編特此分享一篇教程關(guān)于Oracle11g 徹底卸載干凈并重新安裝,有需要的朋友可以參考下本文2021-06-06ORACLE數(shù)據(jù)庫日常維護知識點總結(jié)
這篇文章主要介紹了ORACLE數(shù)據(jù)庫日常維護知識點總結(jié),對于維護oracle數(shù)據(jù)庫的朋友可以參考下2016-06-06解決navicat 鏈接oracle時出現(xiàn)的各種問題
這篇文章主要介紹了解決navicat 鏈接oracle時出現(xiàn)的各種問題,非常不錯,具有一定的參考借鑒價值,需要的朋友可以參考下2018-08-08Oracle數(shù)據(jù)庫兩表關(guān)聯(lián)更新的問題
需要寫一個更新語句,但是更新的判斷條件是兩個表關(guān)聯(lián)查詢出來的,本文通過實例代碼給大家講解Oracle數(shù)據(jù)庫兩表關(guān)聯(lián)更新的問題及遇到的坑,感興趣的朋友一起看看吧2023-11-11