欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

ORACLE查看并修改最大連接數(shù)的具體步驟

 更新時(shí)間:2014年07月31日 15:02:04   投稿:whsnow  
本節(jié)主要介紹了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服務(wù)器才能生效

  ORACLE的連接數(shù)(sessions)與其參數(shù)文件中的進(jìn)程數(shù)(process)有關(guān),它們的關(guān)系如下:

  sessions=(1.1*process+5)

摘(二)

  查詢數(shù)據(jù)庫(kù)當(dāng)前進(jìn)程的連接數(shù):

  select count(*) from v$process;

  查看數(shù)據(jù)庫(kù)當(dāng)前會(huì)話的連接數(shù):

  elect count(*) from v$session;

  查看數(shù)據(jù)庫(kù)的并發(fā)連接數(shù):

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

  查看當(dāng)前數(shù)據(jù)庫(kù)建立的會(huì)話情況:

  select sid,serial#,username,program,machine,status from v$session;

  查詢數(shù)據(jù)庫(kù)允許的最大連接數(shù):

  select value from v$parameter where name = 'processes';

  或者:show parameter processes;

  修改數(shù)據(jù)庫(kù)允許的最大連接數(shù):

  alter system set processes = 300 scope = spfile;

  (需要重啟數(shù)據(jù)庫(kù)才能實(shí)現(xiàn)連接數(shù)的修改)

  重啟數(shù)據(jù)庫(kù):

  shutdown immediate;

  startup;

  查看當(dāng)前有哪些用戶正在使用數(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個(gè)用戶session對(duì)應(yīng)一個(gè)操作系統(tǒng)process,而Windows體現(xiàn)在線程。

  啟動(dòng)oracle

su - oracle

  sqlplus system/pwd as sysdba //進(jìn)入sql

  startup                   //啟動(dòng)數(shù)據(jù)庫(kù)

  lsnrctl start               //啟動(dòng)監(jiān)聽(tīng)

  sqlplus "/as sysdba"

  shutdown immediate;

  startup mount;

  alter database open;

相關(guān)文章

最新評(píng)論