Page 482
Listing 20.3Two TNS Aliases Connected to the Same DatabasePROD_MTS = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (COMMUNITY = tcp.world) (PROTOCOL = tcp) (HOST = dbprod) (PORT = 1521) ) ) (CONNECT_DATA = (SID = PROD01) ) ) PROD_BATCH = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (COMMUNITY = tcp.world) (PROTOCOL = tcp) (HOST = dbprod) (PORT = 1521) (SERVER = DEDICATED) ) ) (CONNECT_DATA = (SID = PROD01) ) )
During normal operation, the Oracle server will start and stop shared server and dispatcher processes as they are needed. This is based on the load placed on the processes. However, it may be necessary to manually administer MTS operation, or monitor for performance problems. For this reason, there are several data dictionary views available that display information relating to the MTS workings. V$DISPATCHERS and V$SHARED_SERVERS will display runtime information on the dispatcher and shared server processes. V$MTS will display overall statistics such as the maximum number of MTS connections, the number of servers started, the number of servers killed, and the high-water mark for servers. V$QUEUE will display information on the Request and Response queues. Finally, V$CIRCUIT shows information on user connections using dispatchers or servers. These performance views allow you to check on your MTS configuration, and make adjustments or refinements where necessary.
You can make adjustments to the number of shared server and dispatcher processes while the instance is running by using the appropriate ALTER SYSTEM commands. You can increase or decrease the number of processes with the appropriate command. Note that if you attempt to terminate servers or dispatchers, the Oracle server will only terminate them as the User sessions using them are closed.
Page 483
The following examples show how these commands are used:
ALTER SYSTEM SET MTS_DISPATCHERS = `spx,10';
This will start or stop SPX dispatchers until ten are running.
ALTER SYSTEM SET MTS_SERVERS = 5;
This will start or stop shared server processes until five are running.
The Oracle Connection Manager is a new Net8 option that is supplied with the Enterprise version of Oracle8. It provides enhanced services for handling connection pooling, access control, and multiple protocol support. It is ideal for environments with hundreds or thousands of simultaneous connections, and provides similar benefits as the Multi-Threaded Server.
To configure the Connection Manager, use the Network Manager or Net8 Assistant. Alternatively, the Connection Manager can be configured by directly editing the cman.ora file.
Multiplexing connections (or Concentration, as it is referred to in Oracle documentation) is
the process of routing multiple discrete connections over a single network connection.
When connections are multiplexed, less resources are consumed by the server, as the
multiplexed connections only uses the overhead of a single connection. Concentration can be enabled
in environments configured to use MTS.
In an Oracle Names environment configured with Dynamic Discovery, concentration will occur automatically when the Connection Manager is brought online. To manually enable concentration, you must place the address and port where the Connection Manager is listening in the tnsnames.ora file.
To configure where Connection Manager will listen, add the following line to cman.ora:
cman=(address=(protocol=tcp)(host=HOSTNAME)(port=PORT)))
where HOSTNAME is the hostname of the computer Connection Manager is running on, and PORT is the port Connection Manager should listen to. By default, Connection Manager listens on port 1600.
To configure the client to use Connection Manager pooling, specify the Connection Manager information in the address list, and set the SOURCE_ROUTE parameter to yes. For example:
(description = (address_list = (address = (protocol=tcp)(host=conman)(port=1600)) (address = (protocol=tcp)(host=dbserver)(port=1580)) ) (connect_data=(sid=db1)) (source_route = yes))
Page 484
NOTE |
The SOURCE_ROUTE parameter indicates the client must travel through multiple destinations to get to the final destination. Used with Connection Manager, it indicates the client must first go to the Connection Manager machine before traveling on to the actual database. n |
The Multiple Protocol Support of Connection Manager takes the place of the
Multiprotocol Exchange of Oracle7. To enable handling of multiple protocols by Connection Manager,
install all of the protocols on the machine where Connection Manager is run. Connection
Manager will route the requests automatically depending on the configuration of the
client's tnsnames.ora file. A source route address which indicates the protocols being traversed in
the tnsnames.ora file is all that is required to enable muliprotocol communications. For example:
(description = (address_list = (address = (protocol = spx)(service=conmansrvc)) (address = (protocol = tcp)(host = dbserver)(port = 1580)) (connect_data = (sid = db)) (source_route = yes))
Page 485
Page 486