Enhance Skills Daily

October 03, 2026

Oracle DBA Lesson 41 Part 1 — Dedicated and Shared Server

A connected session can spend much of its time waiting for its next call. Oracle can retain a dedicated server for a connection, or use dispatchers and shared servers to serve calls from many sessions. Follow the request path and session memory together when choosing or investigating a connection type.

Oracle DBA Lesson 41 Part 1 — Dedicated and Shared Server

Two calls from one session

With a dedicated connection, a dedicated server process handles that client's database work. In the ordinary single-session connection, successive calls use the same server. The process remains assigned during the gaps between calls.

With shared server, the established client connection communicates with a dispatcher:

  1. The dispatcher places a call on the common request queue in the SGA.
  2. An available shared server takes one request and executes it.
  3. It places the response on the calling dispatcher's response queue in the SGA. Each dispatcher has its own response queue.
  4. The dispatcher returns the response to the appropriate client.
  5. The shared server becomes available for another request. The same session's next call may use another shared server.

A request is handled by one selected shared server. Two shared servers in a drawing show available process choices. They are not a fixed capacity recommendation. The connection retains its dispatcher association, while its calls can use different shared servers. The listener establishes the connection route. It does not execute SQL or relay every established database call. See process architecture and application and Oracle Net Services architecture.

Why session state survives

The UGA (user global area) holds session information, including logon information and session variables. It must remain available between calls for the lifetime of the session.

ArchitectureSession UGAProcess memory
DedicatedIn the dedicated server's PGAThe PGA is private to that process
Shared serverIn the SGA: large pool when configured, otherwise shared poolEach shared server still has its own PGA for private process work

The SGA is the instance's shared memory area. A PGA belongs to one process. These are memory areas, not physical database files on disk. Shared session information is accessible to the shared server handling the next call. Comparing two architectures does not describe moving an existing session's UGA between them while it runs. Java-specific session-state allocation and threaded execution are outside this ordinary SQL / Linux process-model example. See memory architecture.

Inspect the actual session type

An administrator with access to the relevant dynamic performance view can inspect sessions for an application account and service. Use the appropriate container. View access and visibility depend on privileges and container scope.

SELECT sid, serial#, username, server, service_name
FROM v$session
WHERE username = 'APP_USER'
  AND service_name = 'orders'
ORDER BY sid;
SIDSERIAL#USERNAMESERVERSERVICE_NAME
41872APP_USERDEDICATEDorders
58614APP_USERSHAREDorders

SID and SERIAL# identify a session together. USERNAME and SERVICE_NAME help select the intended application sessions. SERVER reports the server type: session 41 uses dedicated handling, and session 58 uses shared handling. A common service name can appear with different server types. A SID alone can be reused after a session ends.

The documented SERVER values also include PSEUDO, POOLED, and NONE. Interpret the value in the actual architecture. These two example rows do not establish whether an application connection pool is present, or which server is executing a call at a particular instant. See V$SESSION.

Request a route, then observe it

The following are CONNECT_DATA fragments, not complete network aliases:

(CONNECT_DATA=(SERVICE_NAME=orders)(SERVER=DEDICATED))
(CONNECT_DATA=(SERVICE_NAME=orders)(SERVER=SHARED))

A complete descriptor also needs the correct network address. Shared handling requires appropriate configured and registered dispatcher service handlers. An explicit shared request is rejected if no dispatcher is available. Do not assume a fallback to dedicated. Client configuration such as USE_DEDICATED_SERVER can also affect handling. Compare the actual client configuration and the resulting V$SESSION.SERVER observation. Changing a descriptor selects handling for a new connection. It does not convert the current session. See configuring a shared server architecture.

Choose for the work

Many connected sessions making short, intermittent calls can benefit from fewer shared server processes. A long call occupies its selected shared server. When all shared servers are busy, more requests can wait. Measure concurrent calls, process and memory use, and response time with a representative workload before choosing or sizing an architecture.

Use a dedicated connection for RMAN backup, restore, and recovery. SYSDBA describes administrative authority. Dedicated or shared describes connection handling. Authentication and privilege alone do not identify the architecture. See managing processes.

Related pooling mechanisms have specific roles:

MechanismReused/shared resource
Application connection poolDatabase connections reused by application requests
Shared serverOracle server processes handling calls from multiple sessions
DRCP (database resident connection pooling)A pool of dedicated servers and sessions

These mechanisms require their own configuration and observations. A SHARED row identifies shared server handling, while application pooling can reuse connections with either dedicated or shared handling. See application and Oracle Net Services architecture for DRCP.

Quiz

1. Must the same shared server execute every call for one session?

2. Where is the UGA for the ordinary dedicated connection shown here?

3. What happens to the PGA with shared server?

4. A descriptor explicitly requests SHARED but no dispatcher is available. What should you expect?

5. Which task requires a dedicated connection according to the cited Oracle guidance?

No comments:

Post a Comment

Vocabulary Revision 6 — Lessons 21 to 24

Lessons 21–24 · 16 words Watch on YouTube Contents https://www.apps-dba.com/ https://www.youtube.com/@EnhanceSkillsDaily Open ...