在win2k的系统变量中添加变量:TNS_ADMIN,它的值设置为:
d:\oracle\oracle8i\network\admin 也就是存放listener.ora等文件的路径;
在注册表中添加字串值:TNS_ADMIN 它的值同上;
再添加字串值:USE_SHARED_SOCKED,值设置为TRUE,重新启动计算机
d:\oracle\oracle8i\network\admin 也就是存放listener.ora等文件的路径;
在注册表中添加字串值:TNS_ADMIN 它的值同上;
再添加字串值:USE_SHARED_SOCKED,值设置为TRUE,重新启动计算机
也有可能是端口映射出了问题
直接把ORACLE服务器连到INTERNET,再试,可能有发现
http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:264415410962似乎是说需要修改完后不能只启动listener,要先启动数据库再启动listener
which ports must be opened on the firewall to communicate
with a oracle8-db using net8 and tcp? or, how is is the pool
of ports defined? we are using 1521 as the initial portnumber for net8-communication
with the db. if we open only this portnumber there is no connection
possible. with a netsniffer we found out that only the initial
contact is done on the 1521-port followed by a portswitch to
e.g. 1051 or something else. each new connection-attempt
is using a new portnumber. our firewall has no prebuild rule
for this communication-model. where can I get such information?thanks carsten
and we said...Are you on NT? The following can be used to help solve this issue. It explains
what the issue is and then offers ways around it..PURPOSE This article describes how to get around firewall problems with SQL*Net/Net*8
on NT Servers
Listeners on NT commonly listen on port 1521. It is a common misconception that
if you allow access in to and out of the firewall by enabling access through
port 1521, that SQL*Net clients will be able to connect. To understand why the
connect will fail, it is necessary to understand how a SQL*Net
connection on NT works.When a client initiates a connect, a TCP connection is established with port
1521. A TNS CONNECT packet is then sent to the listener. On UNIX systems the
listener process will fork a new Oracle process to deal with the new incoming
connection. With UNIX, forked processes will inherit the resources owned by the
parent process, in other words file handles and TCP sockets. Earlier releases of SQL*Net for Windows NT used the WINSOCK V1.1 API. With this
version of WINSOCK there is no capabaility of passing a TCP socket between two
processes, and no way to inherit a TCP socket. To work around this restriction
a new thread of execution is created by the main Oracle process and a local
connection is made between the listener and this new thread. The newly created
Oracle thread randomly selects a new TCP port, for example port 1087, to use for
the connection request and informs the listener of the new port to be used. The listener now needs to inform the client that they need to REDIRECT the
connection attempt to this newly selected networking endpoint. The listener now
sends a TNS REDIRECT packet to the client with details of the new port to
reconnect to. The client drops the existing TCP connection and then issues a TCP
Connect sequence to the new TCP port, and this is then followed by a TNS Connect
packet. If all is well and the Oracle server is able to process the incoming
connection request, then the server thread will respond with a TNS ACCEPT packet
and data will begin to flow.So, if you enable connects through port 1521 on your firewall, you can now see
that after the REDIRECT packet has been sent to the client, the connect will
fail as port 1087 is not enabled in the firewall. As the REDIRECT port that gets
generated is entirely at random, you cannot enable access through multiple
ports in the firewall as you have no idea which ports will get allocated.To workaround this problem there are several options:1. Configure the firewall to limit IP addresses rather than port numbers. This
is not a very secure option.2. Use Connection Manager so the TNS CONNECT following the REDIRECT happens the
server side of the firewall. 3. If you are on Oracle 8, you can use a WINSOCK V2 API feature called Shared
Sockets . This allows a socket to be shared (or passed) between multiple
processes. To use this functionality in a single Oracle Home enviroment, set
USE_SHARED_SOCKET = TRUE in the HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE section of
the registry. If you are using Multiple Oracle Homes, change to the desired
Oracle 8 Home and view the oracle.key file in ORACLE_HOME\BIN to find which
registry key to add USE_SHARED_SOCKET to. Please Note that as WINSOCK V2 allows a socket to be shared between multiple
processes, you cannot restart the listener without taking the database down
first.