Problems connecting to Oracle on Windows Xp Sp2? (By Mike Droney)

One of the many new features of Windows Xp Sp2 is that Windows Firewall is turned on by default. For those of us who connect to Oracle in Whidbey on a regular basis, this has affected us greatly. All of a sudden, the Oracle listener would start spouting error codes like there was no tomorrow :-) After a little research and some playing around with the Windows Firewall, here are the steps to get Oracle working again:

1. Add TCP Port 1521 to the exceptions list of Windows Firewall (this is the default listening port for client connections to the Oracle listener)

2. Force all Oracle client connections to use Port 1521. After Oracle has set up a client connection using the listener on Port 1521, it uses a random TCP port for the actual connection to the server. To avoid having to figure out what port Oracle is using per connection and add it to the exception list, you must force all client connections to go through Port 1521. To do this, you must add a string value USE_SHARED_SOCKET=TRUE in the HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE section of the registry

Here is the text to create a reg key for both steps to add to your registry:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\GloballyOpenPorts\List]
"1521:TCP"="1521:TCP:*:Enabled:Oracle Port 1521"

[HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE]
"USE_SHARED_SOCKET"="TRUE"