1.专有模式
dedicated server: shared_servers=0
新建一个连接,产生一个新的server prrocess,oracle<sid>
使用dbca创建数据库,选择专有模式,shred_servers=1,有s000,d000进程
SQL> show parameter shared_servers
NAME
------------------------------------ ----------- ------------------------------
max_shared_servers
shared_servers
SQL> show parameter dispatcher
NAME
------------------------------------ ----------- ------------------------------
dispatchers
max_dispatchers
[oracle@localhost ~]$ ps -ef | grep s00
oracle
[oracle@localhost ~]$ ps -ef | grep d00
oracle
2.共享模式
shared server: shared_servers>0
新建一个连接,不产生新的server process,使用已有的s00n,d00n
连接多,时间短
即使数据库工作在共享模式,其本地连接也是专有的.
SQL> alter system set shared_servers=5 scope=both;
System altered.
SQL> alter system set dispatchers = "(protocol=tcp)(dispatchers=5)(protocol=ipc)(dispatchers=1)"
System altered.
SQL> alter system set max_dispatchers=10 scope=both;
System altered.
SQL> show parameter shared_servers
NAME
------------------------------------ ----------- ------------------------------
max_shared_servers
shared_servers
SQL> show parameter dispatcher
NAME
------------------------------------ ----------- ------------------------------
dispatchers
max_dispatchers
[oracle@localhost ~]$ ps -ef | grep s00
oracle
oracle
oracle
oracle
oracle
[oracle@localhost ~]$ ps -ef | grep d00
oracle
oracle
客户端
$ORACLE_HOME/network/admin/tnsnames.ora
-------------------------
--将Server改为共享模式,此时缺省为共享,新建连接,不产生oracle<sid>进程
--当Server为共享模式,客户端设为专有,仍为专有连接