Oracle Shared Server Session Scheduling

Hi,
We're currently evaluating the shared server architecture for production use. As far as we know, Oracle schedules N sessions across M operating system threads, dependent on the configured limits.
An essential requirement for our production system is to be able to associate a given operating system thread belonging to an Oracle shared server process with a session (more specifically the session owner) and maintain this information externally. Because a shared server thread may handle multiple sessions in random order with interruption, the assumption that a given thread and its corresponding thread identifier always processes a specific session throughout the thread lifetime is incorrect, thus we cannot directly associate a thread and session via the thread identifier.
Does Oracle provide a way to be notified (native callback) before and/or after a shared server level scheduling "session context switch" so that a thread id could be used to associate a thread with a session at any given time?
Thanks in advance for any insights!
cheers,
Horst Reiterer

You can realize if your database is working in shared mode through several ways:
1.- Looking the background process at the OS level
2.- Looking some init parameters and other methods
What is your OS ?
Joel Pérez
http://otn.oracle.com/experts

Similar Messages

  • Question about Oracle Shared Server Performance

    Is it true that the performance of the Oracle Shared Server on Windows plataformns, like 2003 server is poor. ?
    And so that, I cant see any advantages to change its configuraton, on a 200 users configuration, where I can have at most 2.000 session.
    Tks for help and some tips if you guys have them.
    Fernando

    Hi Fernando,
    Is it true that the performance of the Oracle Shared Server on Windows plataformns, like 2003 server is poor. ? In general (not just Windows), shared servers (the MTS) should only be used if you have an acute RAM shortage.
    Tom Kytes notes:
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:5269794407347
    "Unless you have a real reason to use MTS -- don't."
    "a shared server connection is by design "slower" than a dedicated server (more stuff goes on, more complex) it is most likely only getting in the way."
    Also, remember that you can use AWE to take the data buffer above the line and free-up more low-memory RAM for connections. Here are my notes:
    http://www.dba-oracle.com/oracle_tips_ram_waste.htm
    http://www.dba-oracle.com/t_mts_multithreaded_servers_shared.htm
    My experience concurs that Oracle shared servers should not be used without a compelling reasons (i.e. super high connect/disconnect rates on an instance with limited resources) and that the vast majority of Oracle databases will run more efficiently without shared servers.
    Dedicated server connects are far faster than multi-threaded server connections, and 64-bit Oracle combined with the low cost of RAM has driven-down the rare cases where shared servers are justified.
    Hope this helps. . .
    Donald K. Burleson
    Oracle Press author

  • Oracle shared server default connection

    We are currently trying to use shared server on an Oracle 11.1.0.7 standard edition database.
    We don't have any problem regarding parameters or performance yet. We can connect either with dedicated or shared connection.
    Our problem or issue is with tnsnames.ora.
    trdb =
    (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = X.X.X.X)(PORT = 1521))
    (CONNECT_DATA =
    (SID = orcl)
    We do not specify if this connection is shared neither dedicated. Connection defaults to dedicated and we would like to force that users connect to a shared server connection.
    It would be really usefull to avoid having to go client by client on remote sites. We do no have any centralized management tool to change the file (not on remote sites).
    We could, of course make the application to distribute a new file, but since every client is unique, it could be risky.

    Try to use SERVICE_NAME instead of SID in tnsnames.ora and make sure this service is mapped to a dispatcher in database init. file.
    Example with 11.2.0.1:
    1. DISPATCHERS parameter
    SQL> show parameter dispatchers
    NAME                                 TYPE        VALUE
    dispatchers                          string      (PROTOCOL=TCP) (SERVICE=DB112XDB)
    max_dispatchers                      integer2. TNSNAMES.ORA:
    $cat tnsnames.ora
    DB112 =
    (DESCRIPTION =
       (ADDRESS_LIST =
         (ADDRESS = (PROTOCOL = TCP)(HOST = lx01.localdomain)(PORT = 1521))
    (CONNECT_DATA =
       (SERVICE_NAME = DB112XDB)
    )3. Test with SQL*Plus:
    sqlplus  system/xxx@DB112 @tss
    SQL*Plus: Release 11.2.0.1.0 Production on Mon Feb 15 21:37:35 2010
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> select username, program, server, service_name
      2  from v$session
      3  where server<> 'DEDICATED';
    USERNAME                       PROGRAM
    SERVER    SERVICE_NAME
    SYSTEM                         [email protected] (TNS V1-V3)
    SHARED    DB112XDB

  • How to trace a module that uses shared server sessions?

    I have an app (Esri's ArcGIS Server 9.3.1) that I want to trace. Oracle is at 11.2.0.2.0. Our OEM is is at 10.2.0.4.0.
    When I initiate a trace for the module (ArcSOC.exe) in OEM, I can see a trace file start to grow larger. But it seems to be a trace file that already exists (example: <instance>s00022493.trc). To isolate activity to just the duration of time I'm interested in, I'd like to start with a fresh trace file. Is there any way to do that? Must I delete currently active trace files or would that cause a failure?
    When tracing a dedicated server session, I've noticed that a new trace file will be generated with "ora" in its name. Evidently not so with shared server stuff, whether it's tracing a module or a particular session. When the shared server model is used, it seems Oracle wants to reuse existing trace files. And since trace files an get quite large, it would be difficult to open the trace file in an editor and remove the pre-existing, older activity that I don't want to work with.

    See http://www.oracle-base.com/articles/10g/SQLTrace10046TrcsessAndTkprof10g.php for various ways. Delete the trace file before you begin. See http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/sqltrace.htm#i20110

  • Oracle 9i Server : Job Scheduling not working as expected on Windos XP

    Hi
    I have a oracle 9i on my system. The underline OS for the system is
    Windows XP.
    I am trying to execute a oracle job on the oracle server but it seems
    it is not getting executed. The same job if I am placing on a oracle
    9i server installed on a Linux based OS, then I am getting the
    expected outcome from it.
    Can you please let me know, what should I do to get it executed on
    Windos XP system.
    One more thing, while installing the Oracle 9i, I had seen numerous
    options but not very sure @ which one is used for what functionality.
    It would be a greatful if you can send me some docs ( presentations
    would be the best ) to understand the componenets.
    We are also facing some problem while creating a new service.
    What steps needs to be followed for the same.
    Thanks and Regards,
    Pratibh V Pokharna
    Senior Software Engineer
    HSBC GLT, Pune
    M: 91-9226713562

    Can you please let me know, what should I do to get
    it executed on
    Windos XP system.
    What is JOB_QUEUE_PROCESSES parameter set in init.ora on Windos XP ?
    It suppose to be more then 0 .
    One more thing, while installing the Oracle 9i, I had
    seen numerous
    options but not very sure @ which one is used for
    what functionality.
    Check following doc for options and there functionality
    http://download-west.oracle.com/docs/cd/B19306_01/license.102/b14199/options.htm#CIHDDBCG
    Cheers,
    Virag

  • Configure Oracle Shared Server

    Hi,
    Can i shutdown the dispatcher (Shared server) when there is existing connection doing the transaction. as i discover the dispatcher causing the high CPU usage sometime. If Shutdown dispatcher, how to restart the dispatcher when the instance is up and running without restart the instance.
    Regard
    Liang

    user13290160 wrote:
    Can i shutdown the dispatcher (Shared server) when there is existing connection doing the transaction. as i discover the dispatcher causing the high CPU usage sometime. No, no and no.
    What about killing the kernel process as it too sometimes causes high CPU usage? How about killing the swap process daemon for the same reason? Why even bother booting the server at all when there will always be the risk of this situation occurring, that according to you is so bad that it needs to be responded with killing the "offending" process?
    Surely, by your reasoning, the best approach to this problem and prevent processes from sometimes using "too much" CPU, is not running any processes at all - and simply not powerup the server.
    Sounds stupid? Well, so does your killing of a dispatcher process based on high CPU usage, without identifying an actual problem, or even bothering to determine what is causing that symptom of high CPU usage.
    The very first step to ANY IT or IS issue is "*Identify The Problem!*".
    All you have observed is a symptom - high CPU usage. This is not a problem. You need to determine WHY it is happening and that will tell you whether there is a problem.
    Simply wanting to kill the "offending" process? That is wrong. Period.

  • When we go for shared Server environment?

    When we go for shared Server environment from Dedicated server mode?
    When we have to choose thi shared Server mode?
    Which is the optimized way?

    > When we go for shared Server environment from Dedicated server mode?
    You do not. It is not one or the other - it is using both correctly. You want shared server sessions to service applications (any, from web/app servers to flat clients) that are OLTP in nature. They fire off short-and-sweet SQLs that takes a second or three to execute.
    A shared server pool of a few processes can service a very large number of clients.
    You want to use dedicated servers to service OLAP type clients. They fire off complex SQLs that can tie up the server processes for several minutes at a time.
    And that in a nutshell is how to apply the two. It is not Shared Servers versus Dedicated Server. It is about using The Right Tool For The Job. Nothing more and nothing less.
    As for Windows, I will not really bother quickly with shared server connections. On Windows both shared and dedicated servers runs as threads in the main Oracle executable process image.
    There is thus very little resource saving by reducing the number of threads as the footprint of a thread is tiny in comparison to a brand new process. The amount of resources saved by a reducing the number of dedicated server threads is not significant. If anything, Oracle on Windows has shown to scale better than Oracle on Linux in this regard. (refer to [url http://www.perftuning.com/pdf/Comparison_Oracle_Windows_Linux.pdf]A Comparison of Oracle Database 10gR2 Real Application Cluster Performance on Microsoft Windows 2003 Server Enterprise Edition x64 and Red Hat Enterprise Linux x86_64 from the Performance Tuning Corporation).
    And this is exactly the opposite of how Oracle behaves on Unix. Each server process is a physical kernel process. This means that a servicing a 1000 concurrent sessions with a 1000 dedicated server processes, each consuming memory and resources, are expensive. Conversely, supporting a 1000 concurrent sessions with a 100 shared server processes is (almost) 90% cheaper.
    This makes Shared Server a desirable option to use to scale OLTP sessions on Unix-based systems (or any platform where Oracle does not use multi-threading but multi-processing).
    PS. As the Linux kernel support Posix threads (see http://en.wikipedia.org/wiki/Native_POSIX_Thread_Library), it begs the question as to when Oracle is going to support multi-threading on Linux instead of multi-processing.. or at least give us the option to choose.

  • Shared server connections.

    we are running a third party application with an 11g database shared server configuration and OAS 10gR2. Dispatchers set to 10 and shared servers set to 100. When the database instance is started, the 100 shared server and 10 dispatcher sessions start up and I can see these processes with ps -ef. They show as ora_s0* processes and ora_d0* respectively.
    At some point after the startup of the application, it establishes a connection pool of 100 sessions (10 per dispacher). The process Id of these sessions correspond to the pids of the dispatcher processes not the shared server processes.
    The 100 sessions in the connection pool remain idle until a user logs on to the system. When a successful login is made, I see that about 8 of the idle sessions become active and remain so until the user finishes with the application and logs out.
    Questions :
    1. Is there a query I can do to show me the shared sherver sessions i.e. ora_s0* being used?
    3. Are the 100 sessions (in the connection pool) really the shared server sessions even though they show up with the pid of the parent dispatcher?
    2. I need to record the number of connections being made to the system over a period and how long each user is connected for, could you suggest the best method (including queries) of going about this task?
    Thank you.

    user8869798 wrote:
    we are running a third party application with an 11g database shared server configuration and OAS 10gR2. Dispatchers set to 10 and shared servers set to 100. When the database instance is started, the 100 shared server and 10 dispatcher sessions start up and I can see these processes with ps -ef. They show as ora_s0* processes and ora_d0* respectively.
    At some point after the startup of the application, it establishes a connection pool of 100 sessions (10 per dispacher). The process Id of these sessions correspond to the pids of the dispatcher processes not the shared server processes.
    The 100 sessions in the connection pool remain idle until a user logs on to the system. When a successful login is made, I see that about 8 of the idle sessions become active and remain so until the user finishes with the application and logs out.
    Questions :
    1. Is there a query I can do to show me the shared sherver sessions i.e. ora_s0* being used?You can use v$shared_server s, v$circuit c, v$session n
    with this as joining condition- s.circuit = c.circuit and c.saddr = n.saddr
    3. Are the 100 sessions (in the connection pool) really the shared server sessions even though they show up with the pid of the parent dispatcher? you can query server column of v$session to check if they are shared or dedicated.
    2. I need to record the number of connections being made to the system over a period and how long each user is connected for, could you suggest the best method (including queries) of going about this task?
    I see only ash the option for you, else you need to have your own scheduled script/procedure that would gather that information.
    Thank you.

  • Can someone decode this diagram of a shared server?

    Hi.
    This diagram
    http://esupport.csci.unt.edu/oracle/server.901/a90117/manproc.htm
    of the Oracle Shared Server setup is quite useful but I would like to ask anyone here to tell me what the numbers 1 and 7 , and 4 represent.
    Im thinking that between 1 and 7 we have the user process.
    And that for number 4 we have the server process.
    Cheers.
    DA

    I believe these number is used to demonstrate the sequence of shared server flow.
    1. User application called to dispatch process to request for connection
    2. Dispatch place user request to Request Queue
    3. User request is served by Shared Server Processes
    4. Making necessary interaction with SGA, buffer cache, shared pool etc
    5. After request processed, result place to Response Queue
    6. Result was routed to Dispatch process
    7. Served back to User Application

  • How to create a dedicated-server session (to a oracle database)

    Hello!
    I've installed Oracle SQL Developer (Rel.: 2.1.1.64.45) and Oracle Instant Client (Rel.: 11.1.0.7), my Client is configured to enable connections using tnsnames.ora or host-/easy-naming (sqlnet.ora-entry: NAMES.DIRECTORY_PATH= (TNSNAMES, HOSTNAME)).
    Regardless how I configure a database-connection in SQL Developer, I allways "only" get a shared-server connection (even when using a tnsnames.ora-entry with "...(SERVER = DEDICATED)...").
    SQL Developer (any release) in combination with ("fat") client 9.2.0.7 (using tnsnames.ora) creates dedicated-server sessions as wanted.
    Is there any setting in SQL Developer which dis- and/or enables dedicated-server sessions or is this a feature/problem of Instant Client 11.1.0.7?
    Any ideas and/or suggestions?
    (Additional Info: There is no difference in this behavior according to the connected database, I work with databases 9.2.0.7, 10.2.0.3, 10.2.0.4, 11.1.0.6 and 11.2.0.1)
    With kind regards
    Klaus

    Hi,
    Take a look at the main [ SQL Developer page on OTN|http://www.oracle.com/technology/products/database/sql_developer/index.html]. There is a link you should find useful, it's the Getting Started link under the Migration section. This explains how to download and setup the drivers you need to correct to non-Oracle databases. There are also links to online demonstrations on how to create connections to these databases. See how you go with that material.
    It should help.
    Sue

  • SAP db upgrade to Oracle 10G 64 bit - Dedicated or Shared Server ?

    We current run 32bit servers ( approx 150 users ) and plan to migrate to ECC 6.0 on 64bit bit server. Question about upgrade <br>from Oracle 9.2.0.8 32bit to 10.2.0.4 64 bit . Database upgrade Oracle 64 bit should be Dedicated or Shared Server? <br><br>
    My understanding ( limited), is Oracle 64bit dedicated server connection has the dedicated resource so whether or not a user is<br> doing work the connection remains allocated to that user. So for example, in our case a small Windows "shop" will needs <br>around 2MB of kernel space. So 150 threads, for 150 dedicated server connections, approx 150 x 2MB RAM.  Correct ? <br><br>
    Whereas Shared server the user connection is shared, that is user is connecting by dispatchers and when a user is idle his <br>resource can be used by other users, thus lessen the load on system. So in this case maybe 5 dispatcher processes and <br>30 shared server processes to service the 150 sessions of the 150 users which seems very effective to me . <br>My main concern however is with some of the Finance people who get problems with huge COPA and SIS reports now which is <br>why we are moving to 64bit OS/DB/SAP<br><br>
    Question is which does SAP ECC 6.0 support ( or recommend ) Oracle 64 bit Dedicated or Shared Server db migration ?

    > Question is which does SAP ECC 6.0 support ( or recommend ) Oracle 64 bit Dedicated or Shared Server db migration ?
    Never heard that anyone uses shared Server Setup with SAP.
    With SAP, it is NOT the user having a DB connection.
    It is the workprocess, and it is keeping it even if all users are idle.
    You allways have dedicated Oracle processes for SAP Workprocesses.
    The rather old note 70197 states, that Oracle MTS (multi threaded server)
    allowed, but you are on your own to configure it and there are some pitfalls.
    Volker

  • Oracle 10g Shared Server Problem Please Help

    Hi
    I am studying for Oracle 10g OCP ; I was trying to start the shared server feature of oracle10g ver 10.2.0.
    The database name is :CERTIFICATION10g
    The listener name is: LISTENER_CERTIFICATION10g Port:1521
    I could register the dispatchers successully with the listener above. However when I open a new connection ; instead of going through the dispatcher it uses the dedicated connection. I tried opening many sessions but the established filed for both dispatchers remained 0
    I post a dump of the lsnrctl services command below:
    LSNRCTL> service listener_certification10g
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=einstein)(PORT=1521)))
    Services Summary...
    Service "PLSExtProc" has 1 instance(s).
    Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:0 refused:0
    LOCAL SERVER
    Service "certification10g" has 1 instance(s).
    Instance "certification10g", status READY, has 3 handler(s) for this service..
    Handler(s):
    "DEDICATED" established:1 refused:0 state:ready
    LOCAL SERVER
    "D001" established:0 refused:0 current:0 max:1002 state:ready
    DISPATCHER <machine: EINSTEIN, pid: 1428>
    (ADDRESS=(PROTOCOL=tcp)(HOST=einstein)(PORT=1045))
    "D000" established:0 refused:0 current:0 max:1002 state:ready
    DISPATCHER <machine: EINSTEIN, pid: 1252>
    (ADDRESS=(PROTOCOL=tcp)(HOST=einstein)(PORT=1044))
    Service "certification10g_XPT" has 1 instance(s).
    Instance "certification10g", status READY, has 3 handler(s) for this service..
    Handler(s):
    "DEDICATED" established:1 refused:0 state:ready
    LOCAL SERVER
    "D001" established:0 refused:0 current:0 max:1002 state:ready
    DISPATCHER <machine: EINSTEIN, pid: 1428>
    (ADDRESS=(PROTOCOL=tcp)(HOST=einstein)(PORT=1045))
    "D000" established:0 refused:0 current:0 max:1002 state:ready
    DISPATCHER <machine: EINSTEIN, pid: 1252>
    (ADDRESS=(PROTOCOL=tcp)(HOST=einstein)(PORT=1044))
    The command completed successfully
    LSNRCTL>
    Why are the connections not being routed through the dispatchers? Any additional setting needs to made?
    Please reply asap
    Thanls in Advance
    Prahalad Deshpande

    Maybe because you have in your listener.ora used by your client only this entry:
    XXX =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = YYYY)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED) -> should be SHARED
    (SERVICE_NAME = XXX)
    (INSTANCE_NAME = XXXX)
    (HS = OK)
    )

  • IFS uses Oracle DEDICATED server instead of SHARED

    Hi all,
    Context:
    OS = HPUX 11.00 64 bits
    Oracle 8.1.7.0
    iFS 1.1.9
    I have configured my Oracle DB server to use MTS (Multi Threaded
    Server) mode, using the "mts_dispatcher" parameters suite in
    the 'init.ora' file.
    I have also re-configured the listener to force SHARED server
    mode, using the "netasst" graphical tool.
    From that point, after restarting the DB server and the
    listener, my standard Oracle client (SQL worksheet) are
    connecting to the base using a dispatcher and a SHARED server,
    as I can see from the v$session view.
    However, when I start iFS (./ifsstart), all agents and protocol
    servers are still using several DEDICATED servers...instead of
    SHARED server mode.
    How can I change this behaviour ?
    Did I miss something in the DB server configuration, or in iFS
    configuration ?
    This point is very critical to us since we are experiencing
    problems when too many iFS connections occur at the same time,
    when reaching a ceil of oracle processes, the kernel refuses to
    spawn new ones...causing new iFS connections to fail.
    Thanks in advance for any information.
    Regards,
    Arnaud Chiaberge

    Note that we don't certify the JDBC thin driver, only the JDBC
    OCI driver.
    I don't know enough about how MTS works to be able to fully
    answer your question about why the processes come up in
    DEDICATED mode.
    However, I'm more concerned about the issue where you say that
    too many Oracle shadow processes are being created and the
    kernel is refusing to do so.
    Note that you can adjust the maximum number of iFS processes
    that can be created using the Target and Maximum Readonly and
    Writeable connection pool settings. Also, you can adjust the
    time that iFS will wait before trying to spawn a new connection,
    once the Target setting has been reached.
    If your problem is more challenging than that, please open a
    Technical Assistance Request with Oracle Worldwide Support, and
    give us more details, so we can see how we can help.

  • How to monitor oracle 11g database sessions on Windows 2008 server?

    Hi Experts
    How to monitor the Oracle 11g database sessions on Windows 2008 server (other than SQL Developer tool), which procedure or query is taking more time with Java application.

    Recently i found this tool- myorasql on the net to monitor the performence of database, easy to setup and check the performence.  i never tested it but seems impresive.  It is free and i think it would be use ful to you.
    http://myorasql.com/
    You can also use Quest - Toad or sqlplus if you are very good at sql commands and all dictionary tables or OEM/EM grid if it is configured .

  • Deleting the  Shared library in oc4j instance of Oracle Application Server

    Hi Friends,
    I am using Oracle Application Server (10.1.3.4.0). I have some system level shared libraries. When i am deploying the application in home instance the application is deploying fine, but when i create an another instance using the default group i am getting two more system level shared libraries that are not present in the home instance. Because of this two shared libraries i am not able to deploy the application.
    Is there a way to delete the system level shared libraries. If so provide the related information. If there is any other alternative solution provide me that also. This is very urgent to me. Please help me in resolving this issue.
    Thank You,
    Ravi kumar.

    Hi Shail,
    i referred the link you have sent it was helpful to me, but the thing is while deleting the shared library apache.webservices it is saying the shared library is in use. When we brought down the Application Server and try to run the removeSharedLibrary command we got other error.
    Error: "Failed at "Could not get DeploymentManager".
    This is typically the result of an invalid deployer URI format being supplied, the target server not being in a started state or incorrect authentication details being supplied.
    Is the way which i have done is correct ?? Please reply me.
    Thank You,
    Ravi kumar.

Maybe you are looking for

  • [SOLVED] KDE problems after upgrade from 4.10.0-1 to 4.10.1-1

    Hi guys, after updating KDE ihave the following problems: 1. The widgets are unable to load (red cross icon) everywhere at desktop, at panel. 2. Panel need to be removed and added after boot. 3. The programs does not displaying at task manager. 4. Pr

  • Wait Activity Problem in OBPM 10GR3

    Hi all, We have a recent problem with our Wait Activity. We have a definite interval of 5 mins to the wait activity passed on through a business parameter. But for some reason, the Wait activity is behaving awkwardly. It sometimes, waits for less tha

  • Upgrading the J2EE to J2EE 5

    Hey, I've got the Sun Java Studio Enterprise 8.1 installed and would like to upgrade the J2EE from 1.4 to J2EE 5. I've downloaded the J2EE sdk 5 and installed it and used the upgrade option within the installer, however I am not able to change the J2

  • Why are songs greyed out in my itunes

    Why are songs greyed out on iTunes?  The songs will play within iTunes, but will not sync with my iPod Classic 160G.  How do I correct this situation?

  • Cisco WAAS deployment over VSAT WAN links

    Hi. I would just like to know if you can implement Cisco WAAS on a WAN running on 128 VSAT llinks and if the performance improvement will be very significant. Significant enough to make me change my mind from upgrading the link? Thanks