ORA-12545: Connection failed because the target host or object does not exist

Source: Internet
Author: User

ORA-12545: Connection failed because the target host or object does not exist

1. Description of the problem

The XP system installs both the AX1 application and the upgraded AX2, connecting to the same connection instance that is configured on the native Oracle client, where AX2 shows the link to succeed, and AX1 the link fails, where the Oracle instance configuration must be correct because the AX2 has been linked successfully. Before this AX2 and AX1 are able to connect successfully, the user uses 360 antivirus after, AX1 only then appears the problem.

2. Problem analysis

Through log analysis, it is found that the error message returned by AX1 is "ORA-12545: Connection failed because the target host or object does not exist." Obviously this information is wrong, and Oracle incorrectly determines the cause of the problem because the host we configured is present and has been successfully linked on AX2.

3. Workaround

In order to avoid the AX1 dynamic library influence, we write the Pure OCI test program TestOCI.exe, this EXE only relies on the windows and OCI Dynamic Library, the test program will be placed in AX2 programs, AX1 and the desktop in a random folder, As a result, only the AX1 program's display link failed, and the test programs under the other two folders were successful. This proves that there must be something under the AX1 program that affects the connection process.

Using the two-point shielding method of AX1 program all the files of the group test, the final test procedure TestOCI.exe and Ws2_32.dll in the same folder, the connection failure will occur, it is obvious that Ws2_32.dll is the socket library of Windows, This library appears in the AX1 program when it is not normal, so you can conclude that this problem is caused by the Ws2_32.dll file.

And then we are why this library will affect our test procedures are analyzed, respectively, on the problem machine test two sets of TestOCI.exe, one group is the folder only Test EXE, and another set of folders contains test EXE and Ws2_32.dll, Print this EXE separately to launch the dynamic library that the runtime loads. Here are the two sets of test results, which extract only some of the important information.

Group 1: only TestOCI.exe in folders

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\intel (R) Management Engine components\dal;

C:\Program Files\intel\intel (R) Management Engine components\ipt;

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: Folders contain both TestOCI.exe and Ws2_32.dll

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\intel (R) Management Engine components\dal;

C:\Program Files\intel\intel (R) Management Engine components\ipt;

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 two test programs load dynamic Library of the search path is the same, but the load of Ws2_32.dll dynamic library is different, the success of the run is loaded c:\windows\system32 below the Ws2_32.dll, and the failure to run is loaded g : \aaa\program under the Ws2_32.dll. G:\aaa\program\ws2_32.dll is only 85K, and C:\windows\system32\WS2_32.DLL has 291K, obviously G:\aaa\program\ws2_32.dll is a wrong library, At the same time the Windows socket is a complete set, only this one library is loaded, the other socket library is not loaded also will have the problem.

This problem only occurs in XP, but not in the Win7, one possible reason is that the XP and Win7 search path priority level is not the same, or something changed the dynamic library loading environment, but not sure.

4. Workaround

You can restore the connection to the Oracle database by removing the ws2_32.dll under Ax1/program.

Copyright, reproduced please specify the source.

ORA-12545: Connection failed because the target host or object does not exist

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.