Last week, I wrote an article on connecting the oracle client to the server, solving the troubles of installing it in my own book.
In the past, my computer and server were in the same LAN, so every time they were remote servers, they were not the solution. Because multiple people used the same server, they were extremely inconvenient to use, install it in your own book and compare the cards. Therefore, the above blog appears. Hey, digress. Let's get down to the truth.
Back from home, continue my work, open oracle client PLSQL, ah, suddenly cannot connect.
Hey, what's going on? I ran normally a few days ago. I went home for three or four days. Why?
When a problem occurs, analyze the error calmly. From the error, you can find that the target host, that is, the client, cannot find the server.
First of all, we should understand how the oracle client connects to the server. I have already discussed this in my previous blog. The basic information of the oracle server is obtained through the configuration in the tnsnames. ora file. Now that we understand the principles, we have clarified the source of the problem.
In the tnsnames. ora File
# tnsnames.ora Network Configuration File: F:\quanxianguanliruanjian\oracle\product\10.2.0\db_1\network\admin\tnsnames.ora# Generated by Oracle configuration tools.SMS = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST =ShortBrain-PC)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = sms) ) )EXTPROC_CONNECTION_DATA = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1)) ) (CONNECT_DATA = (SID = PLSExtProc) (PRESENTATION = RO) ) )
Generally, the host to be connected is changed. For example, the ip address of the server and the computer name of the server are changed.
In this case, you only need to compare the host and server name or ip address in the file.
Another reliable method is: Since you know the location of the error, you can directly change the tnsnames. ora file in the client, copy the tnsnames. ora file from the server, and put it on the client.
Therefore, when you encounter problems, analyze them calmly, identify errors, reduce time, and improve efficiency.