查看一下数据库现有的进程数,是否已经达到参数processes的大小
-- select count(*) from v$process 取得数据库目前的进程数。
-- select value from v$parameter where name = 'processes'取得进程数的上限
(1)查看当前会话数、processes和sessions值,发现session数14和processes值150已经非常接近
SQL> select count(*) from v$sessionCOUNT(*)
----------
146
SQL> show parameter processes
NAME TYPE VALUE
------------------------------------ ------------------------------
aq_tm_processes integer 0
db_writer_processes integer 2
gcs_server_processes integer 0
job_queue_processes integer 10
log_archive_max_processes integer 2
processes integer 150
(2) Modify the two parameter(processes,sessions)
SQL> alter system set processes=300 scope=spfile
System altered.
SQL> alter system set sessions=335 scope=spfile
System altered.
(3) Let's shutdown and startup database in order to let the two parameter taken effect.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 1610612736 bytes
Fixed Size 2030456 bytes
Variable Size 989856904 bytes
Database Buffers 603979776 bytes
Redo Buffers 14745600 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
$ sqlplus /nolog
(4) test the result.
SQL*Plus: Release 10.2.0.3.0 - Production on 星期五 12月 9 09:53:13 2011
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
SQL> conn sys/oracle@orcl as sysdba
Connected.
SQL>
--the end.
查看ORACLE最大进程数:SQL>select count(*) from v$session #连接数
SQL>Select count(*) from v$session where status='ACTIVE' #并发连接数
SQL>show parameter processes #最大连接
SQL>alter system set processes = value scope = spfile重启数据库 #修改连接
unix 1个用户session 对应一个 *** 作系统 process
而 windows体现在线程
------------------------------------------------------------------------------
修改ORACLE最大进程数:
使用sys,以sysdba权限登录:
SQL>show parameter processes
NAME TYPEVALUE
------------------------------------ ----------- ------------------------------
aq_tm_processes integer 1
db_writer_processes integer 1
job_queue_processes integer 10
log_archive_max_processesinteger 1
processesinteger 150
SQL>alter system set processes=300 scope = spfile
系统已更改。
SQL>show parameter processes
NAME TYPEVALUE
------------------------------------ ----------- ------------------------------
aq_tm_processes integer 1
db_writer_processes integer 1
job_queue_processes integer 10
log_archive_max_processesinteger 1
processesinteger 150
SQL>create pfile from spfile
文件已创建。
重启数据库,
SQL>show parameter processes
NAME TYPEVALUE
------------------------------------ ----------- ------------------------------
aq_tm_processes integer 1
db_writer_processes integer 1
job_queue_processes integer 10
log_archive_max_processesinteger 1
processesinteger 300
在数据库服务器上运行 sqlplus system/password@xe (其中 system 是数据库用户无需改变;password 是数据库密码应指定为实际密码;xe 是数据库实例名称) ,然后执行:查看一下数据库现有的进程数,是否已经达到参数processes的大小。1.select count(*) from v$process取得数据库目前的进程数。2.select value from v$parameter where name = 'processes'取得进程数的上限。alter system set session_cached_cursors=200 scope=spfilealter system set session_max_open_files=200 scope=spfilealter system set sessions=20 scope=spfilealter system set license_max_sessions=200 scope=spfilealter system set license_sessions_warning=200 scope=spfilealter system set processes=200 scope=spfile执行后,重启 Oracle XE 数据库实例即可。要重启 Oracle XE 数据库实例:1. 如安装于 Windows 上,先运行 net stop oracleservicexe,再运行 net start oracleservicexe 即可。也可通过“服务”管理控制台重启 OracleServiceXE 服务。2. 如安装于 Linux 上,先运行 /etc/init.d/oracle-xe start,再运行 /etc/init.d/oracle-xe stop 即可。欢迎分享,转载请注明来源:内存溢出
评论列表(0条)