5 Copyright © Oracle Corporation, All rights reserved. Usage and Configuration of the Oracle Shared Server
5-2 Copyright © Oracle Corporation, All rights reserved. Objectives After completing this lesson, you should be able to do the following: Identify the components of the Oracle Shared Server Describe the Oracle Shared Server architecture Configure the Oracle Shared Server Identify and explain usefulness of related data dictionary views
5-3 Copyright © Oracle Corporation, All rights reserved. Server Configurations Dedicated server process Shared server process
5-4 Copyright © Oracle Corporation, All rights reserved. Dedicated Server Processes ClientServer User process Server process PMON DBWnSMON LGWRCKPTARCn Instance SGA
5-5 Copyright © Oracle Corporation, All rights reserved. Oracle Shared Server Shared server processes Database server Client Snnn User process Snnn Instance SGA Dispatcher D003 Dispatcher D001 Dispatcher D002
5-6 Copyright © Oracle Corporation, All rights reserved.
5-7 Copyright © Oracle Corporation, All rights reserved. Benefits of Oracle Shared Server Reduces the number of processes against an instance Increases the number of possible users Achieves load balancing Reduces the number of idle server processes Reduces memory usage and system overhead
5-8 Copyright © Oracle Corporation, All rights reserved. Using a Dedicated Server with Oracle Shared Server TEST.world = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = stc-sun02) (PORT = 1521) ) (CONNECT_DATA=(SERVICE_NAME=TEST.us.oracle.com) (SERVER=DEDICATED) )
5-9 Copyright © Oracle Corporation, All rights reserved. 2 1 Database server Client Connecting User process Listener Dispatcher process D001 Dispatcher process D002 3
5-10 Copyright © Oracle Corporation, All rights reserved. PMON DBWn SMON LGWRCKPTARCn Request Queue Response queue for (D002) Response queue for (D003) Instance SGA Processing a Request Shared server processes Database server client Snnn User process Listener Dispatcher D002 Dispatcher D003 Snnn Response queue for (D001) Dispatcher D001 User process
5-11 Copyright © Oracle Corporation, All rights reserved.
5-12 Copyright © Oracle Corporation, All rights reserved. Oracle Shared Server: User session data is held in the SGA SGA User session data Cursor state Shared pool and other memory structures Stack space PGA Dedicated Server: User session data is kept in the PGA The SGA and PGA SGA Shared pool and other memory structures Stack space User session data Cursor state PGA
5-13 Copyright © Oracle Corporation, All rights reserved. Configuring Oracle Shared Server Required initialization parameters – DISPATCHERS – SHARED_SERVERS Optional initialization parameters – MAX_DISPATCHERS – MAX_SHARED_SERVERS – CIRCUITS – SHARED_SERVER_SESSIONS
5-14 Copyright © Oracle Corporation, All rights reserved. DISPATCHERS Specifies the number of dispatchers initially started for a given protocol DISPATCHERS = "(PROTOCOL=TCP)(DISPATCHERS=2)\ (PROTOCOL=IPC)(DISPATCHERS=1)" Dispatcher D002 TCP/IP Dispatcher D003 IPC Dispatcher D001 TCP/IP
5-15 Copyright © Oracle Corporation, All rights reserved.
5-16 Copyright © Oracle Corporation, All rights reserved. MAX_DISPATCHERS Specifies the maximum number of dispatcher processes that can run simultaneously Issues the ALTER SYSTEM command to add more dispatchers than initially started MAX_DISPATCHERS = 5 Dispatcher D002 TCP/IP Dispatcher D003 IPC Dispatcher D001 TCP/IP Dispatcher D004 Dispatcher D005
5-17 Copyright © Oracle Corporation, All rights reserved.
5-18 Copyright © Oracle Corporation, All rights reserved. SHARED_SERVERS Specifies the number of server processes created when an instance is started up SHARED_SERVERS = 6 S001 S002 S003 S004 S005 S006
5-19 Copyright © Oracle Corporation, All rights reserved.
5-20 Copyright © Oracle Corporation, All rights reserved. MAX_SHARED_SERVERS Specifies the maximum number of shared servers that can be started Allows shared servers to be allocated dynamically based on the length of the request queue MAX_SHARED_SERVERS = 10 S001 S002 S003 S004 S005 S006 S007 S008 S009 S010
5-21 Copyright © Oracle Corporation, All rights reserved. CIRCUITS Specifies the total number of virtual circuits that are available for inbound and outbound network sessions Contributes to total SGA size CIRCUITS = 100
5-22 Copyright © Oracle Corporation, All rights reserved. SHARED_SERVER_SESSIONS Specifies the total number of Oracle Shared Server user sessions to allow Setting this parameter enables you to reserve user sessions for dedicated servers SHARED_SERVER_SESSIONS = 100
5-23 Copyright © Oracle Corporation, All rights reserved. Related Parameters Other initialization parameters affected by Oracle Shared Server that may require adjustment: LARGE_POOL_SIZE SESSIONS
5-24 Copyright © Oracle Corporation, All rights reserved.
5-25 Copyright © Oracle Corporation, All rights reserved. Verify that the dispatcher has registered with the listener when the instance was started by issuing: Verify that you are connected using shared servers by making a single connection then query V$CIRCUIT view to show one entry per shared server connection. Verifying Setup $ lsnrctl services
5-26 Copyright © Oracle Corporation, All rights reserved.
5-27 Copyright © Oracle Corporation, All rights reserved. Dynamic Views V$CIRCUIT V$SHARED_SERVER V$DISPATCHER V$SHARED_SERVER_MONITOR V$QUEUE V$SESSION
5-28 Copyright © Oracle Corporation, All rights reserved. Summary In this lesson, you should have learned how to: Identify the components of the Oracle Shared Server Describe the Oracle Shared Server architecture Configure the Oracle Shared Server Identify and explain usefulness of related data dictionary views
5-29 Copyright © Oracle Corporation, All rights reserved. Practice 5 Overview This practice covers the following topics: Configuring Oracle Shared Server Defining LOCAL_LISTENER for instance registration Using the Listener Control utility to verify services Verifying shared server configuration and performance using V$ views Verifying instance registration
5-30 Copyright © Oracle Corporation, All rights reserved.