Managing Users  «Prev  Next»

Configure an Oracle Net Client with NETCA - Exercise

Objective: Use Oracle Net Configuration Assistant (NETCA) to create a local network service name for COIN, and then verify that the alias resolves through Oracle Net.

Exercise value

This exercise is worth 10 points. Enter the resulting connect descriptor and your verification command or result, and then select Submit to compare your response with the suggested solution.

Background

This exercise uses Oracle Net's Local Naming method. A friendly net service name such as COIN maps to a connect descriptor in tnsnames.ora. The descriptor identifies the database server host, listener port, and destination database service.

NETCA provides a guided way to create, modify, delete, rename, and test these local connect descriptors. You can edit tnsnames.ora manually, but using NETCA reduces the chance of introducing a parenthesis or spelling error while learning the descriptor format.

Important: Make sure you are changing the configuration used by the intended Oracle client installation. If TNS_ADMIN is set, Oracle Net reads configuration files from that directory; otherwise, it normally uses the network/admin directory under the applicable Oracle home.

Instructions

  1. Confirm the database service and listener are running, and obtain the database host, listener port, and registered service name. This lab uses host 10.11.49.239, port 1521, and service COIN.
  2. Start NETCA. On Linux or UNIX, run $ORACLE_HOME/bin/netca. On Windows, start Oracle Net Configuration Assistant from the Oracle home's Configuration and Migration Tools menu.
  3. Select Local Net Service Name Configuration, select Add, and continue to the service-name page.
  4. Enter COIN as the destination database service, select TCP, and enter the lab host and listener port.
  5. Test the connection if valid database credentials are available. A NETCA connection test requires both the listener and database service to be available.
  6. Save the net service name as COIN and finish the assistant.
  7. Open the active tnsnames.ora file and confirm that the new descriptor uses SERVICE_NAME = COIN, not the legacy SID = COIN form.
  8. At an operating-system command prompt, run tnsping COIN.
  9. Paste the resulting COIN descriptor and the relevant tnsping result into the response area.

If your lab uses a different host, port, or registered database service, substitute the values supplied by your instructor or administrator.