8.4.5 Configuring Easy Connect Naming to Use a DNS Alias
You can optionally configure a DNS alias for the host name, as provided with the host naming method.
With host naming, clients use a connect string that uses the following pattern:
CONNECTusername@DNS_alias
Enter password:password
The following procedure describes how to configure a DNS alias:
-
Ensure the database service is registered with the listener.
If the database can find the listener, then information about the database service is dynamically registered with the listener during service registration, including the service name. The listener is found if the following conditions are met:
-
The default listener named
LISTENER
on TCP/IP, port 1521 is running. -
The LOCAL_LISTENER parameter is set in the initialization file.
If the database cannot find the listener, then you can configure static registration for the listener.
-
-
Establish a host name resolution environment.
You can configure a mechanism such as DNS, NIS, or a centrally-maintained TCP/IP host file,
/etc/hosts
. For example, if a service name ofsales.us.example.com
for a database exists on a computer namedsales-server
, then the entry in the/etc/hosts
file would look like the following:#IP address of server host name alias 192.0.2.35 sales-server sales.us.example.com
The domain section of the service name must match the network domain.
-
Connect to the database using the DNS alias.
Using the example in the previous step, the client can use
sales.example.com
in the connect string:CONNECT
username
@sales.us.example.com Enter password:password
If the client and server are in the same domain such as
us.example.com
, then the client must enter onlysales
in the connect string.
Related Topics
Parent topic: Configuring the Easy Connect Naming Method