The local naming method stores net service names and their connect descriptors in a localized (on each individual client's) configuration file named tnsnames.ora to locate network addresses.
Local naming is most appropriate for simple distributed networks with a small number of services that change infrequently.
Configuring the Local Naming Method
How to ?
The local naming method adds net service names to the tnsnames.ora file. Each net service name maps to a connect descriptor. The following example shows a net service name mapped to a connect descriptor:
sales= (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)(PORT=1521)) (CONNECT_DATA= (SERVICE_NAME=sales.us.acme.com)))
To configure with the local naming method, use one of the following tools:
- an editor to edit manually the tnsnames.ora file
- Oracle Enterprise Manager: Net Services Administration page > Local Naming from the Administer list > Select the Oracle home and go
- Oracle Net Manager: Local > Service Naming
- Oracle Net Configuration Assistant: Local Net Service Name Configuration > Next.
Verify the Listener configuration
Ensure that the listener (located on the server) is configured to “listen on” the same protocol address you configured for the net service name. By default, the listener should already be configured for the TCP/IP protocol on port 1521.
Distribute the Configuration
After one client is configured, it is best to simply copy the tnsnames.ora and sqlnet.ora configuration files to the same location on the other clients. This ensures that the files are consistent.