1. 程式人生 > >個人筆記:修改資料庫連線數

個人筆記:修改資料庫連線數

select count(*) from v$process; --當前的資料庫連線數
 
select value from v$parameter where name ='processes'; --資料庫允許的最大連線數
 
alter system set processes = 150 scope = spfile; --修改最大連線數:

SELECT osuser, a.username,cpu_time/executions/1000000||'s', b.sql_text,machine from v$session a, v$sqlarea b where 
a.sql_address =b.address;  --檢視當前有哪些使用者正在使用資料
 
select count(*) from v$session; --當前的session連線數
 
select count(*) from v$session where status='ACTIVE'; --併發連線數
shutdown immediate;關閉資料庫
startup;--重啟資料庫