1,查看當(dāng)前會(huì)話數(shù)
創(chuàng)新互聯(lián)公司是一家專注于成都網(wǎng)站設(shè)計(jì)、成都網(wǎng)站制作與策劃設(shè)計(jì),雙橋網(wǎng)站建設(shè)哪家好?創(chuàng)新互聯(lián)公司做網(wǎng)站,專注于網(wǎng)站建設(shè)十多年,網(wǎng)設(shè)計(jì)領(lǐng)域的專業(yè)建站公司;建站業(yè)務(wù)涵蓋:雙橋等地區(qū)。雙橋做網(wǎng)站價(jià)格咨詢:18980820575
SQL?conn?/?as?sysdba
已連接。
SQL?select?count(*)?from?v$session;
COUNT(*)
----------
45
注:session值=processes值*1.1+5
2,查看數(shù)據(jù)庫最大進(jìn)程數(shù)
SQL?show?parameter?processes
NAME???????????????????????????????TYPE????????VALUE
----------------------------------?-----------?------------
aq_tm_processes????????????????????integer?????0
db_writer_processes????????????????integer?????1
gcs_server_processes???????????????integer?????0
job_queue_processes????????????????integer?????10
log_archive_max_processes??????????integer?????2
processes??????????????????????????integer?????50
3,查看數(shù)據(jù)庫最大會(huì)話數(shù)
SQL?show?parameter?sessions
NAME???????????????????????????????TYPE????????VALUE
----------------------------------?-----------?------------
java_max_sessionspace_size?????????integer?????0
java_soft_sessionspace_limit???????integer?????0
license_max_sessions???????????????integer?????0
license_sessions_warning???????????integer?????0
logmnr_max_persistent_sessions?????integer?????1
sessions???????????????????????????integer?????60
shared_server_sessions?????????????integer
4,修改processes和sessions值
SQL?alter?system?set?processes=300?scope=spfile;
系統(tǒng)已更改。
SQL?alter?system?set?sessions=300?scope=spfile;
系統(tǒng)已更改。
注:一般只執(zhí)行第一個(gè)命令就可以,session自動(dòng)更改
5,創(chuàng)建pfile
SQLcreate?pfile?from?spfile;
注:如果不做此步,可能會(huì)導(dǎo)致更改最大連接數(shù)之后數(shù)據(jù)庫不能啟動(dòng)現(xiàn)象
6,重啟數(shù)據(jù)庫,使更改生效
SQL?shutdown?immediate
SQL?startup
注:shutdown?normal正常關(guān)閉數(shù)據(jù)庫可能會(huì)相當(dāng)相當(dāng)?shù)穆?/p>
shutdown?abort?可能會(huì)導(dǎo)致啟動(dòng)數(shù)據(jù)庫時(shí)很慢。
7,查看進(jìn)程數(shù),會(huì)話數(shù),已經(jīng)修改過來了
SQL?show?parameter?processes
NAME?????????????????????????????????TYPE????????VALUE
------------------------------------?-----------?-----------
aq_tm_processes??????????????????????integer?????0
db_writer_processes??????????????????integer?????1
gcs_server_processes?????????????????integer?????0
job_queue_processes??????????????????integer?????10
log_archive_max_processes????????????integer?????2
processes????????????????????????????integer?????300
SQL?show?parameter?sessions
NAME?????????????????????????????????TYPE????????VALUE
------------------------------------?-----------?------------
java_max_sessionspace_size???????????integer?????0
java_soft_sessionspace_limit?????????integer?????0
license_max_sessions?????????????????integer?????0
license_sessions_warning?????????????integer?????0
logmnr_max_persistent_sessions???????integer?????1
sessions?????????????????????????????integer?????335
shared_server_sessions???????????????integer
用sql語句查看oracle當(dāng)前連接數(shù) 怎樣查看oracle當(dāng)前的連接數(shù)呢?只需要用下面的SQL語句查詢一下就可以了。
select * from v$session where username is not null
select username,count(username) from v$session where username is not null group by username #查看不同用戶的連接數(shù)
select count(*) from v$session #連接數(shù)
Select count(*) from v$session where status='ACTIVE' #并發(fā)連接數(shù)
show parameter processes #最大連接
SQL show parameter process
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
aq_tm_processes integer 0
db_writer_processes integer 1
gcs_server_processes integer 0
job_queue_processes integer 10
log_archive_max_processes integer 2
processes integer 1500
alter system set processes = value scope = spfile;重啟數(shù)據(jù)庫 #修改連接
/home/oracle9i/app/oracle9i/dbs/init.ora
/home/oracle9i/app/oracle9i/dbs/spfilexxx.ora ## open_cursor
當(dāng) 前的連接數(shù)
select count(*) from v$process;
設(shè)置的最大連接數(shù)(默認(rèn)值 為150)
select value from v$parameter where name = 'processes';
修改最大連接數(shù)
alter system set processes = 300 scope = spfile; 重新啟動(dòng)
當(dāng)數(shù)據(jù)庫最大連接數(shù)不夠時(shí)會(huì)出現(xiàn)客戶端連接間歇性失敗,報(bào)錯(cuò)ORA-12519
查看session:
select * from v$session where username is not null
select username,count(username) from v$session where username is not null group by username
當(dāng)前連接數(shù):
select count(*) from v$process
查看連接數(shù)參數(shù)的設(shè)置情況
select value from v$parameter where name = 'processes'
Select count(*) from v$session where status='ACTIVE' #并發(fā)連接數(shù)
SQL select count(*) from v$session #當(dāng)前的連接數(shù) SQL Select count(*) from v$session where status='ACTIVE' #并發(fā)連接數(shù) SQL select value from v$parameter where name = 'processes' --數(shù)據(jù)庫允許的最大連接數(shù) SQL show parameter processes #最大連接 SQL select username,count(username) from v$session where username is not null group by username; #查看不同用戶的連接數(shù) 希望能幫到你
sqlserver不清楚。但是oracle的各種操作如下,請(qǐng)參考。
1.
Sql代碼
1.select?count(*)?from?v$process??
select?count(*)?from?v$process?--當(dāng)前的數(shù)據(jù)庫連接數(shù)
2.
Sql代碼
1.select?value?from?v$parameter?where?name?=?'processes'?
select?value?from?v$parameter?where?name?=?'processes'--數(shù)據(jù)庫允許的最大連接數(shù)
3.
Sql代碼
1.alter?system?set?processes?=?300?scope?=?spfile;?
alter?system?set?processes?=?300?scope?=?spfile;--修改最大連接數(shù):
4.
Sql代碼
1.shutdown?immediate;??
2.startup;?
shutdown?immediate;
startup;--重啟數(shù)據(jù)庫
查看session:
select * from v$session where username is not null
select username,count(username) from v$session where username is not null group by username
當(dāng)前連接數(shù):
select count(*) from v$process
查看連接數(shù)參數(shù)的設(shè)置情況
select value from v$parameter where name = 'processes'
Select count(*) from v$session where status='ACTIVE' #并發(fā)連接數(shù)