Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Question on Dedicated Server, Recovery
With regards to (Q1) use dedicated server with MTS. Please read attached
article.
MTS Architecture
Figure 5.1: Example MTS Process Architecture
|--->Listener
+--------+ | |
|--->IPC-Dispatcher | SGA |
| | Shared-Server |--->TCP-Dispatcher | | | | +--------+
|-- = a listen end point
The dispatchers belong to a specific instance and are protocol specific message handlers. When a dispatcher starts it locates a RANDOM unused address to listen on for its given protocol. It then registers this address with the listener and then WAITS for a call.
Dispatchers can be seen in the process listing (ps command) as 'ora_dNNN_SID' where 'NNN' is a number. Shared servers can be seen in the process listing as 'ora_sNNN_SID'. The number of servers and dispatchers are not related.
5.2 Registering with the Listener
+----------+
IPC,KEY=mysid |--->| Listener |
| | TCP,HOST=..,PORT=.. |--->| | +----------+
|--- = listen end point
b) When an Oracle instance is started which is configured for
MTS each dispatcher firstly gets its OWN listen address. This address is a random listen point for the given protocol. TCP, +------------+ HOST=myhost |--->| Dispatcher | PORT=random +------------+ c) Each dispatcher then calls the listener using the address specified in the init.ora parameter 'MTS_LISTENER_ADDRESS'. TCP, +------------+ +----------+ HOST=myhost |--->| Dispatcher |---->|--->| Listener | PORT=random +------------+ | | |--->| | +----------+ d) The dispatcher then tells the listener the protocol it is using and the address on which it is listening. e) The listener adds the dispatchers 'MTS_SERVICE' and its address to its list of known services. TCP, +------------+ HOST=myhost |--->| Dispatcher | PORT=random +------------+ +----------+ IPC,KEY=mysid |--->| Listener | | | TCP,HOST=..,PORT=.. |--->| | +----------+ f) Any connect requests for the newly registered service / protocol can now be told the address of the dispatcher. h) NOTE: Until a dispatcher has registered its service with the listener connection requests CANNOT be put through to it.
5.3 Client Connections to MTS
5.4 Configuration
The main parameters are explained below:
MTS_SERVICE
Defines the SERVICE name that the dispatchers will register
with the listener. As pre-configured services use the
ORACLE_SID for the service name there are 2 options for setting
the MTS_SERVICE.
i) If you choose the SAME name as the ORACLE_SID
then connections requesting a particular SID will get an MTS connection if available (Unless the client calls asking for (SERVER=DEDICATED) ). If MTS is not available they will get a dedicated connection. ii) If you choose an MTS_SERVICE different to the ORACLE_SID clients can explicitly request and MTS or a non MTS connection using separate aliases. If MTS is requested and is not available they will NOT get defaulted to a DEDICATED connection. MTS_LISTENER_ADDRESS
MTS_DISPATCHERS
Several lines can list the protocol and number of dispatchers
for that protocol.
NOTE: Some protocols do NOT support MTS. A dispatcher MUST
be able to handle existing connections AND be notified of any new connect requests. If a protocol or its operating system interface cannot support this mode of operation the protocol cannot be used for MTS connections. MTS_MAX_DISPATCHERS
MTS_MAX_SERVERS
Maximum number of shared servers to allow.
MTS_SERVERS
Initial number of shared servers.
Note that as shared servers and dispatchers may be started at database startup OR at a later point in time any interim changes to the SQL*Net configuration files may be picked up by newly started processes. This can lead to some confusion - it is advisable to restart all processes if there have been any major configuration changes.
5.5 Example additions to 'init<SID>.ora'
# ---------------------------------------------------------------------# Example init.ora extension to start MTS dispatchers #
# This is the ADDRESS of a LISTENERs Listen End Point so we can
# register our service
mts_listener_address="(ADDRESS=(PROTOCOL=ipc)(KEY=mysid))"
mts_dispatchers= "ipc, 1" <-- Start 1 IPC dispatcher mts_dispatchers= "tcp, 1" <-- And 1 TCP dispatcher
mts_max_dispatchers=10 <-- No more than 10 mts_max_servers=10 <-- and no more than 10 servers mts_servers=4 <-- Start 4 servers at startup
5.6 Checking an MTS connection
lsnrctl services
This should list the dispatchers that have registered with the listener. If no dispatchers have registered check for RDBMS trace files as in step (d).
f) Check the output of 'lsnrctl services' to ensure that all
dispatchers (or prespawned servers) show valid listen end points.
Ie: (ADDRESS=...) shows a valid address. If not they may not be contactable. Eg: For TCP/IP if (HOST=0.0.0.0) then it is likely that your system does not have 'hostname' set OR the hostname that IS set is not defined in your /etc/hosts file.
g) Use 'sqlplus system/manager_at_mtsalias' where mtsalias is an
alias in the tnsnames.ora file that will try to connect to an MTS service for your database.
h) Once connected check that you have an MTS connection thus:
select username, program, server from v$session where audsid=userenv('sessionid');
This should return a row for your session that shows server as SHARED. If it shows 'DEDICATED' you have a DEDICATED connection.
5.7 Common Problems with MTS