Академический Документы
Профессиональный Документы
Культура Документы
Previous Next
This chapter contains the following topics to help you completely configure your
client/server network:
Oracle Net is a software component that resides on the client and the Oracle database
server. It is responsible for establishing and maintaining the connection between the
client application and the server, as well as exchanging messages between them, using
industry standard protocols.
For the client application and a database to communicate, the client application must
specify location details for the database it wants to connect to and the database must
provide some sort of identification, or address.
See Also:
Oracle Net Services Administrator's Guide for more guidance in
understanding Net Services and for more configuration details.
On the database server side, the Oracle Net listener, commonly known as the listener, is a
process that listens for client connection requests. It is configured in a file named
listener.ora, with a protocol address that identifies the database. This address defines
the protocol the listener is listening on and any other protocol specific information. For
example, the listener could be configured to listen at the following protocol address:
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=my-server) (PORT=1521)))
This example shows a TCP/IP protocol address that specifies the host machine of the
listener and a port number.
Client Configuration
When a client configured with the same protocol address broadcasts a request for a
connection, the listener on the server machine brokers the request and forwards it to the
Oracle database.
The client uses a connect descriptor to specify the database it wants to connect to. This
connect descriptor contains a protocol address and a database service name. A database
can have multiple services defined, so a specific one must be specified for the connection.
In the case of the preconfigured database that you installed, there is only one service, the
name of which defaults to the global database name.
The following example shows a connect descriptor that enables clients to connect to a
database service called mydb.us.acme.com:
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=my-server) PORT=1521))
(CONNECT_DATA=
(SERVICE_NAME=mydb.us.acme.com)))
Connection Requests
While the connect identifier is relatively simple as shown, it can be long and
inconvenient to use if your environment configuration is more complex. With long
connect identifiers, you can use a mapping method that maps the net service name to the
connect descriptor. This mapping information is stored in one or more repositories of
information that are accessed with naming methods.
Naming Methods
• Local Naming
• Directory Naming
• Easy Connect Naming
• External Naming
The preconfigured database uses local naming. Only this form of naming is used in this
book.
Local Naming
The local naming method stores connect descriptors, identified by their net service name,
in a local (on the client) configuration file named tnsnames.ora.
Directory Naming
The easy connect naming method enables clients to connect to an Oracle database server
by using a TCP/IP connect string consisting of a host name and optional port and service
name:
CONNECT username/password@host[:port][/service_name]
For example:
CONNECT scott/tiger@my-server:1521/mydb
The external naming method stores net service names in a supported non-Oracle naming
service. These supported third-party services include:
The Oracle Universal Installer launches Oracle Net Configuration Assistant after the
database is installed. Oracle Net Configuration Assistant enables you to configure the
listening protocol address and service information for an Oracle database.
During a typical database install (as opposed to client install), Oracle Net Configuration
Assistant automatically configures a listener with a name of LISTENER that has a TCP/IP
listening protocol address for the Oracle database that you install. If you do a custom
install, Oracle Net Configuration Assistant prompts you to configure a listener name and
protocol address of your choice.
Oracle Net Configuration Assistant is primarily a post installation tool. Thereafter, Oracle
provides other means for network configuration, which are the Oracle Enterprise
Manager and Oracle Net Manager.
Enterprise Manager
Enterprise Manager enables you to manage your server-side network configuration with
two pages: the Listener page and the Net Services Administration page.
The Listener page displays the listener status and enables you to shut it down. You can
navigate to this page from the Home page by clicking the Listener link under General.
See "Viewing Listener Configuration" in this chapter.
You can navigate to the Net Services page from the Home page by clicking Listener
under General. The Listener page appears. Under Related Links, click Net Services
Administration.
You can access Oracle Net Manager from the command line or for Windows platforms
through the Start menu.
Oracle Net Manager provides the same features as Oracle Enterprise Manager with the
addition of configuring profiles. To learn how to use this tool, see "Configuring Oracle
Networking on Client Machines".
To view the status of the listener, navigate to the Enterprise Manager home page. Under
General, click Listener. The Listener: listener_name page appears. Under General, note
the listener status, which is either Up or Down.
This page also gives the listener version, its net address, and start time.
You can additionally view the listener status at the command line using
lsnrctl status
lsnrctl start
You can use Enterprise Manager to stop the listener. To do so, navigate to the Listener:
listener_name page by clicking Listener on the Home page. To shut down the listener,
click Stop.
You can also stop it at the command line using the following:
lsnrctl stop
This example shows you how to configure a Windows client with local naming, which
involves adding a connect descriptor entry to the local tnsnames.ora file. The connect
descriptor specifies the host name, protocol address, and service name of the database to
connect to.
On Windows, you can use the Oracle Net Manager program to create a new net service
entry in your tsnames.ora file as follows:
Note that you can additionally run Oracle Net Manager from the command line using
netmgr on Windows, Linux, and Unix platforms.
To view the Networking OBE, point your browser to the following location:
http://otn.oracle.com/obe/2day_dba/network/network.htm