Thursday, June 13, 2024

ORA-12637: Packet Receive Failed - From Windows

What's the Problem?

I was intermittently getting an "ORA-12637: Packet Receive Failed" from Windows on a local network.

  • Running an Oracle Client on Windows.
  • Connecting to an Oracle Database on my Local Network.

What's the Fix?

Add an entry for the database server into the Windows "host" file.

I have a DHCP server that hands-out specific IPv4 addresses to each server.  I added the IPv4 address and hostname to the "C:\Windows\System32\drivers\etc\hosts" file.

Why Does this Work?

The mechanism that was supposed to resolve IP addresses from hostnames wasn't working correctly.

How to Troubleshoot?

1. Create a "C:\app\oracle\network\admin\sqlnet.ora" file with the following entries.  (My version 21.3 ORACLE_HOME is "C:\app\oracle")
# Trace Levels: off (0), user (4), admin (10), support (16)
2. Attempt to connect to the database.

3. Find a new trace file in "C:\app\oracle\network\traces" folder.

4. I found the following lines in the new trace file "cli_13580.trc":
(13580) [13-JUN-2024 11:59:26:485] nttbnd2addr: looking up IP addr for host: hostname1
(13580) [13-JUN-2024 11:59:26:485] snlinGetAddrInfo: entry
(13580) [13-JUN-2024 11:59:27:512] snlinGetAddrInfo: getaddrinfo() failed with error 11001
(13580) [13-JUN-2024 11:59:27:512] snlinGetAddrInfo: exit
(13580) [13-JUN-2024 11:59:27:512] nttbnd2addr:  *** hostname lookup failure! ***
(13580) [13-JUN-2024 11:59:27:512] nttbnd2addr: exit
5. After adding the "hosts" file entry and I no longer received the ORA-12637 error.