ORACLE查看允許的最大串連數和當前串連數等資訊

來源:互聯網
上載者:User

標籤:

 目前總結的語句,在查看資料的串連情況很有用 ,寫完程式一邊測試代碼一邊查看資料庫連接的釋放情況有助於分析最佳化出一個健壯的系統程式來。

1. Sql代碼

select count(*) from v$process  

select count(*) from v$process --當前的資料庫連接數

2. Sql代碼

select value from v$parameter where name = ‘processes‘ 

select value from v$parameter where name = ‘processes‘--資料庫允許的最大串連數

3. Sql代碼

alter system set processes = 300 scope = spfile; 

alter system set processes = 300 scope = spfile;--修改最大串連數:

4. Sql代碼

1.shutdown immediate;  

2.startup;  shutdown immediate; startup;--重啟資料庫

5. Sql代碼

 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 order by cpu_time/executions desc;  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 order by cpu_time/executions desc; --查看當前有哪些使用者正在使用資料

6. Sql代碼

 select count(*) from v$session  

 select count(*) from v$session   --當前的session串連數

7. Sql代碼

select count(*) from v$session where status=‘ACTIVE‘ 

select count(*) from v$session where status=‘ACTIVE‘ --並發串連數

8. Sql代碼

 show parameter processes   show parameter processes   --最大串連

9. Sql代碼

alter system set processes = value scope = spfile; 

ORACLE查看允許的最大串連數和當前串連數等資訊

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.