好贴,大家快来讨论,有MTS经验的讲讲课吧

解决方案 »

  1.   

    抛砖头喽:
    Providing for Dedicated Server ConnectionsWhen implementing MTS, you may want to provide for a limited number of dedicated server connections. Not all types of connections benefit from MTS, and some tools and operations require a dedicated connection. In particular, you need dedicated connections for the following: Connections that have a high degree of utilization. A good example of this is a batch job that pulls down and processes a large amount of data. Such jobs run better over a dedicated connection. SQL*Plus or Server Manager connections when those tools are used to start or stop an instance.  Recovery Manager (RMAN) connections.Usually, the best way to provide for a dedicated connection is to create a separate net service name for that purpose. The use of MTS can be overridden in a net service name definition. 
      

  2.   

    同意black_snail(●龙飞虎○) ,我做了以下的实验
    1 建了两个客户端别名
    ORACLE =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = SAM)(PORT = 1521))
        )
        (CONNECT_DATA =
          (SERVICE_NAME = ORCL)
        )
      )ORACLE1 =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = SAM)(PORT = 1521))
        )
        (CONNECT_DATA =
          (SERVICE_NAME = ORCL)
          (SERVER=DEDICATED)
        )
      )2 然后用system/manager@oracle建了两个SQL*Plus,用system/manager@oracle1建了一个SQL*PLus3 查询select * from v$mts
    MAXIMUM_CONNECTIONS MAXIMUM_SESSIONS SERVERS_STARTED SERVERS_TERMINATED
    ------------------- ---------------- --------------- ------------------
    SERVERS_HIGHWATER
    -----------------
                      2                2               0                  0
                    5说明只有用oracle连接才交给dispatcher,而oracle1是同一个dedicated server 通讯。
      

  3.   

    以上的实验,验证了oracle书上的:“There are exceptions such as NT, in which performance may improve using the
    multithreaded server configuration due to the asynchronous nature of MTS.
    To request a dedicated server, the clause SERVER=DEDICATED must be included in
    the SQL*Net TNS connection string within the tnsnames.ora file”
      

  4.   

    从观察listener 的角度出发:tnsnames:
    ORCL_BLACKSNAIL.FUJITSU.SH =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = BLACKSNAIL)(PORT = 1521))
        )
        (CONNECT_DATA =
          (SID = ORCL)
          (SERVER = DEDICATED)
        )
      )MTS.FUJITSU.SH =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = blacksnail)(PORT = 1521))
        )
        (CONNECT_DATA =
          (SERVICE_NAME = ORCL)
        )
      )
    A:打开lsnrctl
    ->services
    1.显示
    2 个DEDICATED SERVER,established : 0 B:启动一个sessionconnect system/manager@mts->services
    1.显示
    DEDICATED SERVER,established : 0 
    DISPATCHER1 established :1 current : 1
    DISPATCHER2 established :0 current : 0
    C:启动又一个session
    connect system/manager@mts
    ->services
    1.显示
    DEDICATED SERVER,established : 0 
    DISPATCHER1 established :1 current : 1
    DISPATCHER1 established :1 current : 1
    (ORACLE 自动平衡DISPATCHER)D:启动又一个session
    connect system/manager@orcl_blacksnail
    ->services
    1.显示
    DEDICATED SERVER,established : 1 
    DISPATCHER1 established :1 current : 1
    DISPATCHER1 established :1 current : 1
    (DEDICATED SERVER 增加了!)ORACLE真聪明!