Generally, it can be divided into three steps:
1. Install the Oracle client. Next, you can proceed. You don't have to change anything.
2. Configure the local name to parse tnsnames. ora, without directly entering the connection string.
3. Connection.
Let's talk about the name resolution Configuration:
Add the following content to tnsnames. ora:
Orcl_1.1.1.includedicated =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = 1.1.1.1) (PORT = 1521 ))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
This is a dedicated connection. Of course, if the server supports the shared mode, you can also connect in the Shared Mode:
Orcl_1.1.1.20.shared =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = 1.1.1.1) (PORT = 1521 ))
(CONNECT_DATA =
(SERVER = SHARED)
(SERVICE_NAME = orcl)
)
)
You can also enter
Conn hr/hr@1.1.1.1: 1521/orcl
If the connection timeout error occurs when the oracle server listener is enabled and the IP address and port number are correct
It may be related to the firewall. You can turn off the firewall first and try to connect.
Service iptables stop ---- temporarily disable firewall in linux