Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: What's a listner and how do I create one (LONG)
Tomas Rimsten wrote:
> This is our system:
>
> OS:
> NT 4.0
> Oracle:
> Oracle Call Interface 7.3.2.1.0
> Oracle Documentation 7.3.2.2.0
> Oracle Enterprise Manager 1.2.2
> Oracle TCP/IP Adapter 2.3.2.1.4
> Oracle7 ODCB Driver 1.15.3.1.0A
> Oracle Installer 3.1.4.1.2E
> SQL*Net Client 2.3.3.1.4
> SQL*Plus 3.3.2.0.2
>
> I took it all, some of the system specefic are not needed for solvning my
> problem. But better more than less.
Okay; there is at least one obvious problem here: you do not have a SQL*Net server installed! Install SQL*Net Server 2.3.3.1.4.
The pieces here are SQL*Net Client (which allows *outgoing* SQL*Net
connections -- to other databases on other machines); SQL*Net Server
(which
accepts connections from other machines; and the SQL*Net protocol
adapter;
in this case it looks as though you have a TCP/IP network and have
correctly
installed the TCP/IP adapter.
Once you have installed all of these pieces, you can *configure*
SQL*Net by modifying the files TNSNAMES.ORA, LISTENER.ORA, and
SQLNET.ORA.
These can all be found in $ORACLE_HOME\NETWORK\ADMIN. There are
programs
that Oracle provides to configure SQL*Net for you, but it is so easy to
do
that I never use them ... I just edit the files as appropriate. Here's
a
sample LISTENER.ORA:
(ADDRESS= (COMMUNITY= TCP.world) (PROTOCOL= TCP) (Host= brett) (Port= 1526) )
Here, my machine name is "brett" (you can specify a TCP/IP address in dotted-quad notation as the "HOST" instead of specifying a machine name) and I have an instance named "RND" on my machine. The listener is listening on port 1526 for requests to connect to RND.
On the client side, you will need to configure TNSNAMES.ORA to talk to this server. So someone desiring to connect to my RND database would have a TNSNAMES.ORA which includes the section:
(ADDRESS_LIST = (ADDRESS = (COMMUNITY = hpd.abbott) (PROTOCOL = TCP) (Host = brett) (Port = 1526) ) ) (CONNECT_DATA = (SID = RND) (GLOBAL_NAME = rnd.hpd.abbott.com) )
And then they could connect to my database using the connect string 'userid/password_at_RND.ABBOTT' -- or just 'userid/password_at_RND' if their SQLNET.ORA file specified "NAMES.DEFAULT_DOMAIN = abbott".
To build the actual listener, you must use the ORADIM73 program to create a SID. I do not use this as a GUI program; I prefer to use it on the command line, like this:
C:\> oradim73 -new -sid rnd -intpwd fubar -maxusers 10
If you create a SID using the GUI version (ORADIM73 without
parameters) it will create the database for you as well; I abhor this
idea. In any case, after creating the SID you will automagically have
a SQL*Net listener service. You can observe this service by running the
Windows NT control panel and selecting services; the relevent services
would be, in my particular case, "OracleServiceRND" -- which is the
actual
SID -- and "OracleTNSListener" which is the SQL*Net version two
listener.
If the service's status is "Started", then you should be able to
receive connections. Of course if your database is not up then you
won't
be able to connect to it!
One more thing -- if you modify the LISTENER.ORA file, you must
stop and restart the listener to make your changes active. There are
two
easy ways to do this: go to "services" in the control panel and stop/
restart the service using the buttons, or go to a command line and use
the
LSNRCTL program.
If you have further questions feel free to contact me via email. Note my correct email address below.
-bn
neumebm_at_hpd.abbott.com
Received on Fri May 16 1997 - 00:00:00 CDT
![]() |
![]() |