• 修改oracle的processes和session(转)


    1.process 和session的概念:
    process:这个参数限制了能够连接到SGA的操作系统进程数(或者是Windows 系统中的线程数),这个总数必须足够大,从而能够适用于后台进程与所有的专用服务器进程,此外,共享服务器进程与调度进程的数目也被计算在内.此外,共享服务器进程与调度进程的数目也被计算在内.因此,在专用服务器环境中,这是一种限制并发连接数的方法.

    疑点一:能够连接到SGA的操作系统进程数,这种进程包括哪些进程? Windows系统中的线程数,是指所有与oracle相关的进程的线程数之和?

    疑点二:在共享服务器和专用服务器环境中,算法有什么不同?

    哪位兄弟了解比较透彻,请指点一下,拜谢!

    Sessions:是被应用于oracle层次而非操作系统层次.在不考虑通过专用服务器或共享服务器进行登录的情况下,这个参数限制了对指定实例的并发登陆数.

    疑问:在C/架构中,是指Oracle用户登陆建立的会话数?在B/S架构中又怎么算呢?

    2,尽管概念不是很明白,遇到这种问题还得干活先:

    1).通过SQLPlus修改
    Oracle的sessions和processes的关系是
    sessions=1.1*processes + 5

    使用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=400 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;
    文件已创建。


    重启数据库,OK!

    SQL> shutdown immediate;
    数据库已经关闭。
    已经卸载数据库。
    ORACLE 例程已经关闭。
    SQL> startup
    ORACLE 例程已经启动。

    Total System Global Area  171966464 bytes
    Fixed Size                   787988 bytes
    Variable Size             145488364 bytes
    Database Buffers           25165824 bytes
    Redo Buffers                 524288 bytes
    数据库装载完毕。
    数据库已经打开。
    SQL> show parameter processes;

    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ----------------
    aq_tm_processes                      integer     0
    db_writer_processes                  integer     1
    gcs_server_processes                 integer     0
    job_queue_processes                  integer     10
    log_archive_max_processes            integer     2
    processes                            integer     400
    SQL> show parameter session;

    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ----------------
    java_max_sessionspace_size           integer     0
    java_soft_sessionspace_limit         integer     0
    license_max_sessions                 integer     0
    license_sessions_warning             integer     0
    logmnr_max_persistent_sessions       integer     1
    session_cached_cursors               integer     0
    session_max_open_files               integer     10
    sessions                             integer     445
    shared_server_sessions               integer
    SQL>


    【注:sessions是个派生值,由processes的值决定,公式sessions=1.1*process + 5】
  • 相关阅读:
    POJ 3659 Cell Phone Network(树的最小支配集)(贪心)
    2017 Hackatari Codeathon C. Arcade(DP)(滚动数组)
    2017 Hackatari Codeathon B. 2Trees(深搜)(想法)
    Codeforces Round #307 (Div. 2) E. GukiZ and GukiZiana(分块)
    Codeforces Round #407 (Div. 2) D. Weird journey(欧拉路)
    HDU 5669 Road(线段树建树)(分层图最短路)
    【bzoj2763】[JLOI2011]飞行路线 (分层图最短路)(优先队列dij)
    sed命令基本用法
    linux文本编辑器vim
    oracle row_number() over(partition by .. order by ..)和rank() over(partition by .. order by ..) 和dense_rank() over(partition by .. order by ..)的相似点与区别
  • 原文地址:https://www.cnblogs.com/datalife/p/2094235.html
Copyright © 2020-2023  润新知