Re: 10g listener configuration

From: Robert Klemme <shortcutter_at_googlemail.com>
Date: Thu, 17 Jan 2008 02:30:11 -0800 (PST)
Message-ID: <2ab432fa-449d-4327-996b-c66996237bf3@f10g2000hsf.googlegroups.com>


On Jan 17, 1:30 am, Arch <send..._at_spam.net> wrote:
> On Wed, 16 Jan 2008 14:36:20 -0800 (PST), bdbafh <bdb..._at_gmail.com>
> wrote:
>
>
>
> >On Jan 16, 4:50 pm, Arch <send..._at_spam.net> wrote:
> >> On Wed, 16 Jan 2008 12:54:33 -0800 (PST), bdbafh <bdb..._at_gmail.com>
> >> wrote:
>
> >> >On Jan 16, 3:27 pm, Arch <send..._at_spam.net> 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 10.2.0.1, 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
>
> >> >127.0.0.1
>
> >> >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 127.0.0.1, 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
> >mydb=(ADDRESS=(PROTOCOL=TCP)(HOST=RevMaynard)(PORT=1521)
> >(CONNECT_DATA=(SERVICE_NAME=mydb))
>
> >-bdbafh
>
> Here's what I've figured out so far (I think). It looks as though the
> problem with using localhost is only with the registration of the
> database with the listener. The other functions of the listener seem
> to still work.
>
> I modified the listener.ora file to include the db instance. I created
> a SID_DESC entry for it (like the old days). Now it will listen for
> that instance.
>
> Does this make sense or am I whistling in the dark?
>
> My objective here is to avoid having to modify the files after cloning
> the systems. It's not uncommon to need to clone 100 systems per week.

AFAIK Oracle 10 registers with the listener automatically. Changing the host name *after* installation of Oracle is generally a bad idea and will create a mess in my experience.

However, a solution in your case might be to install while machines are called localhost.localdomain and give them proper hostnames afterwards. You will have to make sure that "localhost" and "localhost.localdomain" are properly mapped afterwards. All this is assuming that you use a *nix OS (could not find a ref to OS in your postings).

You might find some more helpful remarks in Oracle Net Configuration documentation.

Kind regards

robert Received on Thu Jan 17 2008 - 04:30:11 CST

Original text of this message