日期:2014-05-16  浏览次数:20455 次

修改Oracle数据库的连接数

?

  摘(一)

  1. 查看processes和sessions参数

  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;

  系统已更改。

  SQL> alter system set sessions=335 scope=spfile;

  系统已更改。

  3. 修改processes和sessions值必须重启oracle服务器才能生效

  ORACLE的连接数(sessions)与其参数文件中的进程数(process)有关,它们的关系如下:

  sessions=(1.1*process+5)

  摘(二)

  查询数据库当前进程的连接数: