ORA-12545: connection failed because the target host or object does not exist, ora-12545 does not exist
ORA-12545: the connection failed because the target host or object does not exist
1. Problem Description
In the Windows XP system, the AX1 application and the upgraded version of AX2 are installed at the same time to connect to the same connection instance configured on the local Oracle client. AX2 shows that the link is successful, but AX1 fails to link, the Oracle instance must be correctly configured because AX2 is successfully linked. Before that, AX2 and AX1 can be connected successfully. After you use 360 for antivirus purposes, AX1 will fail.
2. Problem Analysis
Log analysis showed that the error message returned by AX1 was "ORA-12545: connection failed because the target host or object does not exist ". Obviously, this information is incorrect. Oracle determines the cause of the error because the host we configured exists and is successfully linked to ax2.
3. Solution
To avoid the influence of ax1's dynamic database, we compile the pure ocitest Program testoci.exe. This exe only depends on the dynamic library of Windows and OCI, and put this test Program in AX2's Program, AX1's Program, and any folder on the desktop, the result is that only the display link of the AX1 Program fails, and the test Program in the other two folders is successful. This proves that the file in the AX1 Program affects the connection process.
The connection fails only when the producer and ws2_32.dll are in the same folder. Obviously, ws2_32.dll is a Windows Socket library, which is abnormal in AX1's Program, therefore, we can conclude that this problem is caused by the ws2_32.dll file.
Examples. One group contains only the test exe files in the folder, and the other group contains the test exe and ws2_32.dll files. The dynamic libraries loaded when the exe is started and run are printed respectively. The following are two groups of test results, which only extract some important information.
Group 1: Only testoci.exe is included in the folder.
Starting Directory: G: \ AAA \ Program \
Search Path:
C: \ Program Files \ Intel \ iCLS Client \;
G: \ app \ Administrator \ product \ 11.2.0 \ client_2 \ bin;
C: \ Program Files \ amd app \ bin \ x86;
C: \ WINDOWS \ system32;
C: \ WINDOWS;
C: \ WINDOWS \ System32 \ Wbem;
C: \ Program Files \ ATI Technologies \ ATI. ACE \ Core-Static;
C: \ Program Files \ Intel (R) Management Engine Components \ DAL;
C: \ Program Files \ Intel (R) Management Engine Components \ EPT;
C: \ Program Files \ Common Files \ Autodesk Shared \;
G: \ AAA \ program;
G: \ AAA \ program
Loaded "c: \ windows \ system32 \ WS2_32.DLL" at address 0x71A20000. Successfully hooked module.
Group 2: testoci.exe and ws2_32.dll are included in the folder at the same time.
Starting Directory: G: \ AAA \ Program \
Search Path:
C: \ Program Files \ Intel \ iCLS Client \;
G: \ app \ Administrator \ product \ 11.2.0 \ client_2 \ bin;
C: \ Program Files \ amd app \ bin \ x86;
C: \ WINDOWS \ system32;
C: \ WINDOWS;
C: \ WINDOWS \ System32 \ Wbem;
C: \ Program Files \ ATI Technologies \ ATI. ACE \ Core-Static;
C: \ Program Files \ Intel (R) Management Engine Components \ DAL;
C: \ Program Files \ Intel (R) Management Engine Components \ EPT;
C: \ Program Files \ Common Files \ Autodesk Shared \;
G: \ AAA \ program;
G: \ AAA \ program
Loaded "g: \ aaa \ program \ WS2_32.DLL" at address 0x71A20000. Successfully hooked module.
From the above two test results, we can see that the search paths for loading dynamic libraries of the two test programs are the same, but the dynamic libraries of ws2_32.dll are different, and the successful running is to load c: \ ws2_32.dll under windows \ system32, and ws2_32.dll under g: \ aaa \ program fails to be loaded. G: \ aaa \ program \ ws2_32.dll only has 85 K, while c: \ windows \ system32 \ WS2_32.DLL has 291 K, obviously g: \ aaa \ program \ ws2_32.dll is an incorrect library and Windows Socket is a complete set. If this library is loaded, other Socket libraries will not be loaded.
This problem only occurs in XP, but not in Win7. One possible reason is that the priority levels of search paths in XP and Win7 are not the same, or something has changed the dynamic library loading environment, but cannot be determined.
4. Solution
Delete ws2_32.dll in AX1/Program to restore the connection to the Oracle database.
All rights reserved. For more information, see the source.