Re: 10g listener configuration

From: bdbafh <>
Date: Wed, 16 Jan 2008 14:36:20 -0800 (PST)
Message-ID: <>

On Jan 16, 4:50 pm, Arch <> wrote:
> On Wed, 16 Jan 2008 12:54:33 -0800 (PST), bdbafh <>
> wrote:
> >On Jan 16, 3:27 pm, Arch <> wrote:
> >> I set up systems for a classroom training environment that include
> >> Oracle and a database. I am trying to migrate from 9i to 10g but have
> >> run into a major roadblock and would appreciate some help.
> >> With 9i, I could edit the listener.ora and tnsnames.ora and substitute
> >> localhost for the actual system name. This worked perfectly and
> >> permitted cloning of the systems for the classroom.
> >> With, however that technique doesn't seem to work. Once the
> >> files are changed to localhost and I've restarted the listener, I
> >> can't get the database to register with the listener. I get "listener
> >> does not currently know of service requested".
> >> Using lsnrctl status confirms that the listener is not aware of the
> >> instance. There is no error in the log, other than the unknown
> >> service.
> >> Any suggestions will be appreciated.
> >have you tried just using the (tcp) loopback address of
> >
> >explicitly?
> >Might you consider to use IPC instead of TCP if only local connections
> >are to be supported?
> >what OS, btw?
> >-bdbafh
> Thanks for the reply.
> I tried using, same problem as localhost. Also tried
> aliasing localhost in the hosts file - didn't help.
> I need to use TCP because there are other applications involved.
> I should have stated, up front, that the platform is Windows XP.
> Unless I can figure out a way around this, I'm going to have to write
> a program to edit listener.ora and tnsnames.ora each time the system
> is cloned.

The file listener.ora is not required.
Have you tried on a clean system with a fresh install of the Oracle 10g database server software:

C:\> lsnrctl start

which will create an OS service and start a listener process up on the default nic?

that handles half of the issue.

as far as the tnsnames.ora file, could you construct an entry using the environment variable %COMPUTERNAME% in the connect descriptor in a script that gets run on each host?

untested, but should work for demo purposes:

c:\> echo mydb=(ADDRESS=(PROTOCOL=TCP)(HOST=%COMPUTERNAME%)(PORT=1521) (CONNECT_DATA=(SERVICE_NAME=mydb)) > tnsnames.ora c:\> type tnsnames.ora

-bdbafh Received on Wed Jan 16 2008 - 16:36:20 CST

Original text of this message