One of the important components of Oracle networking is the Oracle listener.
The listener is the process responsible for receiving database connection requests
and redirecting them to another process, which in turn becomes the main point
of contact between the client and the database. The process that ultimately services
user requests is called a server process. It is the responsibility of the server
process to perform such tasks as reading data from disk into the Database Buffer
Cache and sorting query results.
There are two possible configurations for the server process. In the dedicated server
configuration, one server process is started for each client connection to the database.
This server process is then dedicated to serving only that connection’s
request. In the multi-threaded server configuration, shared servers perform most of
the same tasks as the dedicated server. The main difference is that, where a dedicated
server only supports one client, a shared server supports one or more
clients. The ability to support multiple client connections can be useful if the
number of requests made by each client connection is low. Therefore, a dedicated
server configuration would be useful for operations such as a batch load of data
into the database, whereas a multi-threaded server configuration would be more
appropriate for supporting many clients, each of which periodically performs
transactions on the database that affect small amounts of data.
The information needed to establish database connections is stored in several
configuration files. The following two configuration files will be discussed in this
chapter:
• tnsnames.ora
• listener.ora
template for two TNS service name definitions is shown below:
####################################
# FILENAME: tnsnames.ora #
# LAST MODIFIED: March 24, 2000 #
####################################
example00 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = development)
(PORT = 1521)
)
)
(CONNECT_DATA =
(SID = db00)
)
)
example01 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = production)
(PORT = 1521)
)
)
(CONNECT_DATA =
(SID = db01)
)
)
####################################
# FILENAME: listener.ora #
# LAST MODIFIED: March 24, 2000 #
####################################
LISTENER =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = production)
(PORT = 1521)
)
)
STARTUP_WAIT_TIME_LISTENER = 0
CONNECT_TIMEOUT_LISTENER = 10
LOG_DIRECTORY_LISTENER = e:\Oracle\Ora81\network\log
LOG_FILE_LISTENER = listener
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = db00)
(ORACLE_HOME = e:\Oracle\Ora81)
)
)