Monday, April 09, 2007

OCA 10g - Ch5 Oracle Shared Server

Chapter 5 - Oracle Shared Server

Review Questions and Answers

1. All the following are reasons to configure the server using Shared Server except:
a. Overall memory utilization is reduced.
b. The system is predominantly used for decision support with large result sets returned.
c. The system is predominantly used for small transactions with many users.
d. The number of idle connections on the server is reduced.
---
Ans: B.
Shared Server is a scalability option of Oracle. It provides a way to increase the number of supported user processes while reducing the overall memory usage. This configuration is well suited to high-volume, small-transaction-oriented systems with many users connected. Because users share processes, the number of overall idle processes is also reduced. It is not well suited for large data retrieval type applications such as decision support.

2. Which of the following is true about Shared Server?
a. Dedicated connections cannot be made when Shared Server is configured.
b. It is recommended that index rebuilds be performed when connected via Shared Server.
c. The database can be started when connected via Shared Server.
d. The database cannot be stopped when connected via Shared Server.
---
Ans: D.
Users can request dedicated connections in a Shared Server configuration.
Index rebuilds and data-intensive activities should be performed using dedicated server.
The database cannot be started when connecting via Shared Server. So the correct answer is D.

3. The administrator wants to allow a user to connect via a dedicated connection into a
database configured in Shared Server mode. Which of the following lines accomplishes this?
a. (SERVER=DEDICATED)
b. (CONNECT=DEDICATED)
c. (INSTANCE=DEDICATED)
d. (MULTITRHEADED=FALSE)
e. None of the above
----
Ans: A.
A user must explicitly request a dedicated connection when a server is configured in Shared Server mode. Otherwise, the user gets a Shared Server connection. The correct parameter is (SERVER=DEDICATED).

4. In which of the following files would you find the Shared Server configuration parameters?
a. listener.ora
b. mts.ora
c. init.ora
d. tnsnames.ora
e. sqlnet.ora
----
Ans: C.
The Shared Server configuration parameters exist in the init.ora file on the Oracle Server machine.


5. Which of the following is a component of Shared Server?
a. Shared user processes
b. Checkpoint processes
c. Dispatcher processes
d. Dedicated server processes
----
Ans: C.
In Shared Server, users connect to a pool of shared resources called dispatchers.
A client connects to the listener, and the listener redirects the request to a dispatcher.
The dispatchers handle all the user requests for the session. Many users can share dispatchers.

6. You want to put the database in Shared Server mode. Which of the following files will you modify?
a. tnsnames.ora
b. cman.ora
c. names.ora
d. init.ora
---
Ans D.
Because the database has to be configured in Shared Server mode, you must change the init.ora file. The other choices are also configuration files, but none of them are used to configure Shared Server.


7. What choice in the Oracle Net Manager allows for the configuration of Shared Server?
a. Local
b. Service Naming
c. Listeners
d. Profile
e. None of the above
---
Ans E.
This is one of the tricky questions again! You can use Oracle Net Manager to configure many options and files, including tnsnames.ora and sqlnet.ora. But because Shared Server is a characteristic of the database server and not of the network, you cannot use Oracle Net Manager to configure it.


8. You want two TCP/IP dispatchers and one IPC dispatcher to start when the instance is started. Which of the following lines will accomplish this?
a. dispatchers=(protocol=tcp)(dispatchers=2)(protocol=IPC) (dispatchers=1)
b. dispatchers="(protocol=tcp)(dispatchers=2)(protocol=IPC)(dispatchers=1)"
c. dispatchers_start=(protocol=tcp)(dispatchers=2)(protocol=IPC) (dispatchers=1)
d. dispatchers_start=(pro=tcp)(dis=2)(pro=IPC)(dis=1)
---
Ans: B.
The DISPATCHERS parameter of the init.ora file is used to configure dispatchers, so the correct answer is option B. All the other choices are invalid parameters.


9. What is the name of the piece of shared memory that client connections are bound to during communications via Shared Server?
a. Program Global Area
b. System Global Area
c. Virtual Circuit
d. Database Buffer Cache
e. None of the above
----
Ans C.
The System Global Area is the shared memory segment that Oracle obtains on instance startup. The Program Global Area is an area of memory used primarily during dedicated connections. The Database Buffer Cache is actually a component of the Program Global Area. Virtual Circuits are the shared memory areas to which clients bind.

10. What is the first step that the dispatcher performs after it receives a request from the user?
a. Pass the request to a shared server.
b. Place the request in a request queue in the PGA.
c. Place the request in a request queue in the SGA.
d. Process the request.
---
Ans: C.
Once a dispatcher receives a request from the user process, it places the request on the request queue. Remember that in a Shared Server environment, a request can be handled by a shared server process. This is made possible by placing the request and user information in the SGA.


11. Dispatchers have all the following characteristics except:
A. Dispatchers can be shared by many connections.
B. More dispatchers can be added dynamically with the ALTER SYSTEM command.
C. A dispatcher can listen for multiple protocols.
D. Each dispatcher has its own response queue.
---
Ans. C.
Many users can connect to dispatchers, and dispatchers can be added dynamically. Also, each dispatcher does have its own response queue. The only one of these options that is false is option C because dispatchers can listen for only one protocol. You can configure multiple dispatchers so that each is responsible for different protocols.


12. When configured in Shared Server mode, which of the following is contained in the PGA?
A. Cursor state
B. Sort information
C. User session data
D. Stack space
E. None of the above
---
Ans: D.
A small PGA is maintained even though most of the user-specific information is moved to the SGA (specifically called the UGA in the Shared Pool or the Large Pool). The only information left in the reduced PGA is stack space.

13. Which of the following is false about shared servers?
A. Shared servers can process requests from many users.
B. Shared servers receive their requests directly from dispatchers.
C. Shared servers place completed requests on a dispatcher response queue.
D. The SHARED_SERVERS parameter configures the number of shared servers to start at instance startup.
--
Ans B.
Shared Servers can process requests from many users.
The completed requests are placed into the dispatchers' response queues.
The servers are configured with the SERVERS parameter.
However, shared servers do not receive requests directly from dispatchers.
The requests are taken from the request queue.

14. Which of the following is not a step in the processing of a Shared Server request?
A. Shared servers pass information back to the client process.
B. Dispatchers place information in a request queue.
C. Users pass requests to a dispatcher.
D. The dispatcher picks up completed requests from its response queue.
E. None of the above.
---
Ans: A.
Study the steps of what happens during a request via Shared Server. Dispatchers receive requests from users and place the requests on request queues. Only dispatchers interact with client processes. Shared servers merely execute the requests and place the results back on the dispatcher's response queue.

15. When you are configuring Shared Server, which initialization parameter would you likely need to modify?
A. DB_CACHE_SIZE
B. DB_BLOCK_BUFFERS
C. LARGE_POOL_SIZE
D. BUFFER_SIZE
E. None of the above
---
Ans: C.
Shared Server requires a shift of memory away from individual session processes to the SGA. More information has to be kept in the SGA (in the UGA) within the Shared Pool. A Large Pool is configured and is responsible for most of the SGA space allocation. Option C is the correct answer. The cache size and block buffers settings do not affect Shared Server.
C.

16. Which of the following is false about request queues?
A. They reside in the SGA.
B. They are shared by all the dispatchers.
C. Each dispatcher has its own request queue.
D. The shared server processes remove requests from the request queue.
---
Ans: C.
Request queues reside in the SGA, and there is one request queue per instance. This is where shared server processes pick up requests that are made by users. Dispatchers have their own response queues, but they share a single request queue.

17. You want to gather information about users connected via Shared Server connections. Which of the following is the view that contains this information?
A. V$USERS
B. V$QUEUE
C. V$SESS_STATS
D. V$CIRCUIT
E. None of the above
--
Ans D.
You can use several V$ views to manage the Shared Server.
V$QUEUE gives information regarding the request and response queues. V$USERS and V$SESS_STATS are not valid views. V$CIRCUIT gives information about the users who are connected via Shared Server connections, and it provides the necessary information.


18. What is the process that notifies the listener after a database connection is established?
A. SMON
B. DBWR
C. PMON
D. LGWR
---
Ans: C.
The PMON process notifies the listener after a client connection is established. This is so that the listener
can keep track of the number of connections being serviced by each dispatcher.


19. You want to gather performance and tuning-related information for the shared server processes. You should start by querying which of the following views?
A. V$USERS
B. V$CIRCUIT
C. V$SHARED_SERVER_MONITOR
D. V$SESS_STATS
----
Ans: C.
You can query the V$SHARED_SERVER_MONITOR view to display information about the maximum number of connections and sessions, the number of servers started and terminated, and the server high-water mark. These numbers can help determine whether you should start more shared servers.


20. Which command can you execute to get details about the number of sessions connected via Shared Server?
A. lsnrctl sessions
B. lsnrctl conn
C. lsnrctl status
D. lsnrctl services
E. None of the above
---
Ans: D.
Dispatchers register with listeners so that when a listener redirects a connection to a dispatcher, the listener knows how many active connections the dispatcher is serving. The lsnrctl services command summarizes the number of connections established, connections currently active, and other valuable information regarding Shared Server.
The lsnrctl status command summarizes only dispatchers and does not display any details about connections.

No comments: