Re: SQLNet.ora per Listener? - SOLVED, more

From: <japplewhite_at_austinisd.org>
Date: Tue, 19 May 2009 14:40:39 -0500
Message-ID: <OFB7857A8B.B99B5CEF-ON862575BB.0067E169-862575BB.006C1B6F_at_austinisd.org>



Environments: 9i and 10g on HPUX and Linux.

Just a follow-up to recount another problem solved that about drove me nuts. I was following my advice below to establish two separate Oracle10g TNS_ADMIN directories (in order to enforce different sqlnet.ora settings on each Listener) when I ran into yet another glitch. On a Linux server with both 9i and 10g ORACLE_HOMES I had it all set up and could start one 10g Listener, switch TNS_ADMIN, but the other 10g Listener wouldn't start - kept getting the TNS-01106 error "Listener using listener name 'string' has already been started".
Cause: Another listener is already listening on one of the ADDRESSes specified.
Action: Shutdown the previous listener specified by the listener name before starting this one.

Each 10g Listener had a different name and a different port and I could start either one first, but then got TNS-01106 when trying to start the second. In hindsight I see that I didn't pay enough attention to the "ADDRESSes" part of the Cause: in the error doc. I finally stumbled on the line at the bottom of Doc ID: 232010.1 - "TNS-1106 occurs when a KEY value has been duplicated. e.g. A listener using KEY=EXTPROC is already running when you attempt to start a listener configured with KEY=EXTPROC."

Well, that made it clearer to me and, sure enough, I had "(ADDRESS = (PROTOCOL = IPC)(KEY = <db_sid>))" in the ADDRESS_LIST of both 10g Listeners. Once I commented that out of one of them, they'd both start up. In fact, I had "(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))" in the ADDRESS_LIST of one of the 10g Listeners and it wouldn't start if an Oracle9i Listener had been started with that line - different ORACLE_HOME, TNS_ADMIN, etc., but a conflict nonetheless.

So now I've got three Listeners going on that server - 1 Listener from the 9i ORACLE_HOME and 2 Listeners from the 10g ORACLE_HOME with two non-standard TNS_ADMIN directories.

Hope this helps someone else, too. Or, maybe I'm the only idiot who couldn't figure this out without so much experimentation. ;-)

Jack C. Applewhite - Database Administrator Austin I.S.D. - MIS Department
512.414.9715 (wk) / 512.935.5929 (pager)

japplewhite_at_austinisd.org
Management Info - CAC; Management Info - CAC Sent by: oracle-l-bounce_at_freelists.org 04/21/2009 03:31 PM
Please respond to
japplewhite_at_austinisd.org

To
Oracle-L Freelists <oracle-l_at_freelists.org>, oracle-l-bounce_at_freelists.org cc

Subject
Re: SQLNet.ora per Listener? - SOLVED

After much experimentation, I got lsnrctl to pay attention to the TNS_ADMIN variable. It's just backward from what you'd think. Instead of checking for the existence of TNS_ADMIN, using its value if present, or using the default of $ORACLE_HOME/network/admin if TNS_ADMIN is absent, lsnrctl first checks to see if $ORACLE_HOME/network/admin is present. If it is, lsnrctl uses it, no matter what TNS_ADMIN says. If the default directory is not there, THEN lsnrctl checks for and uses the value in TNS_ADMIN. If there's no default directory AND no TNS_ADMIN set, lsnrctl starts a Listener and establishes a log in $ORACLE_HOME/network/log, but says "The listener supports no services". I guess it would then depend on auto-registration by each database to be "listened for".

So, if you want separate Listener environments in the same ORACLE_HOME, you have to have two, separate TNS_ADMIN directories, neither of which can be the default of $ORACLE_HOME/network/admin. I can handle that with some simple shell scripts to set TNS_ADMIN for each Listener I want - just one for starting, since stuff like status and stop don't need to access the listener.ora or sqlnet.ora files.

Hope this helps someone else.

BTW, From my reading, I think TNS_ADMIN will direct Client tools to a specific tnsnames.ora files, even if in non-default locations. Haven't tested it thoroughly, but I know that works from past experience. It just doesn't work the same with lsnrctl.

Jack C. Applewhite - Database Administrator Austin I.S.D. - MIS Department
512.414.9715 (wk) / 512.935.5929 (pager)

--
http://www.freelists.org/webpage/oracle-l
Received on Tue May 19 2009 - 14:40:39 CDT

Original text of this message