Simpler Navigation for Servers and Operating Systems
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
cancel
Showing results for 
Search instead for 
Did you mean: 

using MTS when locally connected

Michael Schulte zur Sur
Honored Contributor

using MTS when locally connected

Hi,

I am using Oracle 8.1.6.2.0 and how I understand it, a client must connect via user@service so I can influence, whether he is getting a dedicated or MT server or can I force someone, who connects locally also to get a MTS?

thanks for any idea,

Michael
7 REPLIES
Hein van den Heuvel
Honored Contributor

Re: using MTS when locally connected

ramblings... [because I only have modest experience in this space]

The way I see it, the main goal of MTS is
reduce memory usage somewhat by funneling multiple oracle clients to the same slave.

MTS on the best of days is of limited value as the latency price can be high (your slave busy for an other client? tough!) and the memory reduction modest.
The process coutn reduction is nice though.

MTS on a local node has possibly less value because the you are already stuck with the client process. Adding the clave may be ok.

That is, with 1000 remote clients and a 10:1 fan in, the DB will have 100 slaves. With 1000 local clients and the same fan in using MTS will reduce the total needed processes from 2000 to 1100, nice, but not a magnitude smaller as before.

Best I understand it, the MTS service is strictly under control of the listener. So for a local client to use it, it would have to forgoe the most efficient connection with the BEQuet (sp?) protocol and use connect xxx@tns-names-entry. I'd recommend IPC over TCP as the most likely more efficient protocol.

hth,
Hein.
T G Manikandan
Honored Contributor

Re: using MTS when locally connected

When SQL net or NET8 is installed two adapters bequeath and ipc are installed.

When making local connections they use these adapters and you cannot force them to use MTS.

Alexander M. Ermes
Honored Contributor

Re: using MTS when locally connected

Hi there.
Setup a second alias for the database in the tnsnames.ora and have the user use this alias.
sample :

# SID =
# (DESCRIPTION =
# (ADDRESS_LIST =
# (ADDRESS = (PROTOCOL = TCP)(HOST = XYZ)(PORT = nnnn))
# )
# (CONNECT_DATA =
# (SERVICE_NAME = ORIGINAL_SID
# (SID = ORIGINAL_SID)
# (SERVER=DEDICATED)
# )
# )

Hope it helps.
Rgds
Alexander M. Ermes
.. and all these memories are going to vanish like tears in the rain! final words from Rutger Hauer in "Blade Runner"
Yogeeraj_1
Honored Contributor

Re: using MTS when locally connected

hi,

i would also add that bequeath uses ipc under the covers (that is just interprocess communication). we can use it with or without using a listener to connect.

Normally TNS, Transparent Network Substrate, is a "foundation" software built into the Oracle client that handles our remote connections - allowing for peer-to-peer communication. The TNS connection string tells the Oracle software how to connect to the remote database. Generally, the client software running on a machine will read a file called TNSNAMES.ORA.

Let us see how this works.

It is this configuration file that allows the Oracle client software to turn the the connection string - ora816 (e.g. if connecting using system/manager@ora816) into somthing useful. The other way it could have been resolved is using ORACLE NAMES, which is a distributed name server for the database, similar in purpose to DNS for hostname resolution.

After the resolution, the client software will open a TCP/IP socket connection to the database.

The TNS listener process is what will get us physically connected to the database in an NET8 environment. When the listener receives an inbound connection request, it inspects the request and, using its own configuration files, either reject the request(no such database for example, or perhaps the IP address is disallowed) or accepts it and goes about getting us connected.

If we are making a dedicated server connection, the listener process will create a dedicated server for us (via a fork() and exec() system call)

For MTS connection requests, the listener process knows the dispatcher(s) running on the database. AS connections requests are received, the listener will choose a dispatcher process from the pool of available dispatchers. The listener will send back to the client the connection information describing how the client can connect to the dispatcher process. This must be done because the listener is running on a well-known hostname and port on the host, but the dispatchers will be accepting connections on a 'randomly assigned' ports on that server. The listener is aware of these random port assignments and picks a dispatcher. The client then disconnects from the listener and connects directly to the dispatcher. There is now a physical connection to the database.

Hence, connection to the database either through a dedicated server, or a shared server is determined at the client side.

Locally on the server,

scott/tiger needs no listener and scott@ORA816/tiger does

the listener is ONLY used when you use @ORA816
and to connect to the database through a shared server, you should use @ORA816

Now setting the TWO_TASK environment variable, allows you use the connect string from TNSNAMES.ORA which can be either of dedicated or shared. (you may also have to set ORACLE_SID and CONNECT_STRING)


hope this helps!

regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Michael Schulte zur Sur
Honored Contributor

Re: using MTS when locally connected

Hi everyone,

I am amazed about the many details you all wrote. Thank you. All this Net8 is making me dizzy!! Does Oracle Press have a good book on it, which breaks it down in pieces, you can chew and digest? ;-) Anyway, I still have some comments and questions.

begin all
does anyone of you know verastream? It is used as middleware between Javaclients and a local software on the host.
end all

begin Hein
After optimizing the Oracle itself, I still have the problem, that due to the large number of Oracle processes, the machine is paging. Well, although you don??t have that much savings on processes as when the clients were all external, yet the clients are small compared to Oracle and cutting down by 90% would be a breakthrough. About local connects being the better protocol I have heard.
end Hein

begin T G
well, I hope not!
end T G

begin Alexander
I am not sure, I understand you correctly. I want all client making connect via a certain software to use multi threaded server and not dedicated.
end Alexander

begin Yogeeraj
thank you for going that much into detail. I think, I understood most of it. This two_task variable sounds very promisimg. I will check it out.
end Yogeeraj

Michael Schulte zur Sur
Honored Contributor

Re: using MTS when locally connected

Hi Yogeeraj,

I looked for two_tasked in metalink, but I wasn??t successful in getting the information needed. Somewhat I have the impression, that this was meant for Net8 V1 and Oracle 7.3 and before. Can you give the syntax for Net8 V2?

thanks

Michael
Michael Schulte zur Sur
Honored Contributor

Re: using MTS when locally connected

Hi everybody,

Can anyone explain, how two_task is built with Net8 V2?

Michael