ITPub博客

首页 > Linux操作系统 > Linux操作系统 > oracle中修改process

oracle中修改process

原创 Linux操作系统 作者:奋奋熊 时间:2011-09-05 09:26:31 16777215 删除 编辑

在 oracle中,要经常查看process:

查看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 TYPE VALUE
------------------------------------ ----------- ------------------------------
aq_tm_processes integer 1
db_writer_processes integer 1
job_queue_processes integer 10
log_archive_max_processes integer 1
processes integer 150

SQL> alter system set processes=300 scope = spfile;

系统已更改。

SQL> show parameter processes;

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
aq_tm_processes integer 1
db_writer_processes integer 1
job_queue_processes integer 10
log_archive_max_processes integer 1
processes integer 150

SQL> create pfile from spfile;

文件已创建。


重启数据库,

SQL> show parameter processes;

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
aq_tm_processes integer 1
db_writer_processes integer 1
job_queue_processes integer 10
log_archive_max_processes integer 1
processes integer 300

--查看当前有哪些用户正在使用数据
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;

还有可以查询

select sessions_highwater from v$license;

sessions_highwater 记录的是数据库会话曾经达到的最大值

查询数据库自启动以来最大的并发数量

select * from v$license

转载于:http://jackyrong.iteye.com/blog/565267

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26077805/viewspace-706638/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2011-07-20

  • 博文量
    23
  • 访问量
    37964