|Oracle9i Net Services Administrator's Guide
Release 2 (9.2)
Part Number A96580-02
This chapter is designed to help novice users set up and test a simple but common configuration--one between a client application and a database over a TCP/IP network.
This chapter contains these topics:
The tasks in this quick start show a TCP/IP connection between a client computer and a database server. The following about the database server and client computers is assumed:
Before using Oracle Net to connect a client computer to a database server, confirm that the client computer can successfully communicate with the database server computer. Evaluating network connectivity can eliminate network-based errors.
To confirm network connectivity:
A loopback test is a connection from the database server back to itself. Many network protocols provide a means of testing network connections. The utility PING can be used for TCP/IP network.
In a TCP/IP network, each computer has a unique IP address. A name resolution service, such as Domain Name System (DNS), can be used to map the IP address of a computer with its host name. If a name resolution service is not used, then the mapping is typically stored in a centrally maintained file called
hosts. This file is located in the
/etc directory on UNIX and the
\winnt directory on Windows NT. For example, an entry for a database server computer named
sales-server may look like the following:
To use PING, enter the following at the command line:
database_server_host is the host name of the database server computer. For example:
If the loopback was unsuccessful, try using the IP address of the database server. For example:
This varies according to the network protocol. For TCP/IP, you can use PING, FTP or TELNET utilities. If the client computer cannot reach the server, verify that the network cabling and network interface cards are correctly connected. Contact your network administrator to correct these problems.
The listener and database server must be running in order for the database server to receive connections.
listener_name is the name of the listener defined in the
listener.ora file. It is not necessary to identify the listener if you are using the default listener, named
A status message indicating that the listener has started successfully displays.
SYSTEM/MANAGER is a SYSDBA user.
STARTUPcommand, specifying the database name and full path of the parameter file:
If you do not specify the
PFILE option, the Oracle database uses the standard initialization parameter file located in the
/pfile/sid directory on UNIX platforms, and ORACLE_BASE
\pfile\sid directory on Windows NT. If you do not specify a database name, then the database uses the value of the
DB_NAME parameter specified in the initialization parameter file.
Oracle9i Database Administrator's Guide for further information about starting the database
SERVICES command lists the services supported by the database, along with at lease one available service handler.
Once network connectivity has been verified, you can use Oracle Net Configuration Assistant to create a net service name, a simple name for the database service. The net service name resolves to the connect descriptor, that is, the network address of the database and the name of the database service. The client will use the net service name to connect to the database.
The following example shows the net service name
sales mapped to a connect descriptor for a database called
sales.us.acme.com. A client can use
sales mapped to connect to
(ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)(PORT=1521)) (CONNECT_DATA= (SERVICE_NAME=sales.us.acme.com)))
To configure a client with a net service name:
The Welcome page appears.
The Net Service Name Configuration page appears.
The Net Service Name Configuration, Database Version page appears:
The Net Service Name Configuration, Service Name appears.
The service name is defined during database creation. If you are unsure what the service name is, ask the Database Administrator who created the database.
The Net Service Name Configuration, Select Protocols page appears.
The page appropriate for the selected protocol appears.
The Net Service Name Configuration, Test page appears.
During a test, Oracle Net Configuration Assistant contacts the remote database service, establishes a connection, and ends contact.
A successful test results in the following message:
If the test fails, it can be because the:
scott) and password (
tiger) are not valid
Depending on your diagnosis of the problem, perform one of the following tasks:
The Net Service Name Configuration, Net Service Name page appears.
The Net Service Name Configuration, Another Net Service Name page appears.
The Net Service Name Configuration, Configuration Done page appears.
From the client computer, connect to the database server as follows.
password are the database user and password, and
net_service_name is the net service name that you created in "Task 3: Configure the Client to Use a Net Service Name".