Oracle 最大串連數 Session Process

來源:互聯網
上載者:User

Oracle 最大串連數 Session Process

Oracle 最大串連數 Session Process

1. 查看processes和sessions參數
SQL> show parameter processes
processes                          integer    50

SQL> show parameter sessions
sessions                            integer    60

2. 修改processes和sessions值
SQL> alter system set processes=300 scope=spfile;
SQL> alter system set sessions=335 scope=spfile;

註:

<1>.修改processes和sessions值必須重啟oracle服務才會生效
<2>.Oracle的串連數(sessions)與其參數檔案中的進程數(process)有關,sessions=(1.1*process+5)

3.查詢
查詢資料庫當前進程的串連數:
SQL> select count(*) from v$process;

查看資料庫當前會話的串連數:
SQL> select count(*) from v$session;

查看資料庫的並發串連數:
SQL> select count(*) from v$session where status='ACTIVE';

查看當前資料庫建立的會話情況:
SQL> select sid,serial#,username,program,machine,status from v$session;

查詢資料庫允許的最大串連數:
SQL> select value from v$parameter where name = 'processes';
SQL> show parameter processes;

查看當前有哪些使用者正在使用資料:
SQL> 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對應一個作業系統process,而Windows體現線上程。

相關文章

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.