Re: OAS DAD problem

From: Frank <fbortel_at_nescape.net>
Date: Mon, 08 Dec 2003 23:10:08 +0100
Message-ID: <br2sbh$79v$1_at_news4.tilbu1.nb.home.nl>


pixelmeow wrote:

> On Sat, 06 Dec 2003 17:30:49 +0100, in comp.databases.oracle.tools,
> Frank <fbortel_at_nescape.net> scribbled:
>
>

>>Oh dear... comments embedded, trouble shooting below:
>>
>>* decide an a network configuration directory, no, make
>>  that: create one.
>>* fire up your favorite registry tool. Add, or edit the
>>  String Value (REG_SZ type) of TNS_ADMIN. The value would
>>  be the newly created directory name, without an ending
>>  backslash.
>>  Do this in every HLM\Software\Oracle\HomeX (x from 0 to 99),
>>  as well as in HLM\Software\Oracle (V7 network looks here.)
>>  Close this tool.
>>* Copy TNSNAMES.ORA, LISTENER.ORA and SQLNET.ORA over to this
>>  directory, preferably from a directory you *think* is correct.
>>* Check if you can still start the listener, check it's status
>>  first:
>>  c:> lsntctl status - it should respond with something like:

>
>
> That above should be "c:>lsnrctl status"; figured it out and got close
> to the below:
>
>
>>STATUS of the LISTENER
>>------------------------
>>Alias                     LISTENER
>>Version                   TNSLSNR for 32-bit Windows: Version 8.1.7.4.0 
>><snipped>
>>Listener Parameter File   D:\oracle\9iAS\network\ADMIN\listener.ora
>>Listener Log File         D:\oracle\817\network\log\listener.log
>>Listening Endpoints Summary...
>>  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
[Quoted] >>  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=cs-frank02.cs.nl)(PORT=1521)))
>>  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\rcvipc)))
>>  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\iasdbipc)))
>>  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\demoipc)))
>>  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\db920ipc)))
>><snipped>

>
>
> Mine was:
> <begin paste>
> d:\>lsnrctl status
> LSNRCTL for 32-bit Windows: Version 8.1.5.0.0 - Production on
> 08-DEC-03 14:59:15
> (c) Copyright 1998 Oracle Corporation. All rights reserved.
> Connecting to
> (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=cc-oracletest)(PORT=1521
> )))
> STATUS of the LISTENER
> ------------------------
> Alias LISTENER
> Version TNSLSNR for 32-bit Windows: Version
> 8.1.5.0.0 - Production
> Start Date 08-DEC-03 14:46:33
> Uptime 0 days 0 hr. 12 min. 45 sec
> Trace Level off
> Security OFF
> SNMP OFF
> Listener Parameter File d:\Oracle\OraNetwork\listener.ora
> Listener Log File D:\Oracle\Ora81\network\log\listener.log
> Services Summary...
> G35 has 3 service handler(s)
> TEST has 1 service handler(s)
> The command completed successfully
> <end paste>
>
> I pasted this in after doing everything, so you can see also that I've
> changed the registry settings.
>
>
>>  The points of interest are the parameter file and the
>>  Endpoint summary.
>>  This parameter file looks OK - the listener is up and running,
>>  and servers 4 instances.
>>  Keep this file (listener.ora)
>>* Stop it: c:> lsntctl stop
>>* Start it up again: c:> lsntctl start - the response should be the
>>  same as above, but now using the newly created directory as location
>>  of the parameter file.
>>* If this works - fine! You TNS_ADMIN settings work for the listener!
>>  Time to move on.

>
>
> Worked fine, just fine. The stop and start is what I missed before, I
> believe. But the problem I have with that thought is that I made
> TNS_ADMIN point to d:\oracle\ora81\network, which is where the
> TNSNAMES and listener.ora files are. No SQLNET.ora there, tho, maybe
> that's the problem? See below...
>
>
>>* Check is SQLNET.ORA and TNSNAMES.ORA are OK:
>>* c:> sqlplus scott/tiger_at_your_local_instance
>>  This should work.

>
>
> It did, beautifully. Thank you, sir! But I checked further, just in
> case.
>
>
>>     If it does, keep those SQLNET.ORA and TNSNAMES.ORA files.
>>     If not, try:
>>        c:> set oracle_sid=(the name of the SID)
>>        c:> sqlplus scott/tiger - you now use BEQ protocol, bypassing
>>            tnsnames and sqlnet.ora
>>        If that works, at least your instance is up (and has a
>>        scott account).
>>       * Testing the network:
>>	What are we called?
>>        C:\>hostname
>>        cs-frank02
>>       * Are we configured properly?
>>        C:\>ping cs-frank02
>>        Pinging cs-frank02.cs.nl [192.168.1.102] with 32 bytes of data
>>        Response from 192.168.1.102: bytes=32 time<10 ms TTL=64
>>       * Is TNS configured properly?
>>        tnsping demo (pls note: this is the third line from the services
>>	              summary of the listener - so that should not be
>>	              a problem!)
>>	<snipped version>
>>	Used parameter files:
>>        D:\oracle\9iAS\network\ADMIN\sqlnet.ora
>>        D:\oracle\9iAS\network\ADMIN\tnsnames.ora
>>        <always nice to know - should be the TNS_ADMIN directory!!!>
>>        Used TNSNAMES adapter to resolve the alias
>>         <snipped the actual connect data>
>>        OK (60 msec)

>
>
> My result is a bit different. It does not show "Used parameter
> files", but it worked anyway. Which it had done, before. All of my
> Oracle tools worked fine, except for the creation of the DAD in
> OASManager.
>
>
>>       * Hmmm - looks OK, doesn't it?
>>         C:\>sqlplus scott/tiger_at_demo
>>          ERROR:
>>          ORA-12514: TNS:listener could not resolve SERVICE_NAME given
>>          in connect descriptor.
>>       * Open TNSNAMES.ORA:
>>DEMO.CS.NL =
>>  (DESCRIPTION =
[Quoted] >>    (ADDRESS_LIST =
>>      (ADDRESS = (PROTOCOL = IPC)(KEY = demo))
>>      (ADDRESS = (PROTOCOL = TCP)(HOST = cs-frank02)(PORT = 1521))
>>    )
>>    (CONNECT_DATA =
>>      (SERVICE_NAME = demo)
>>    )
>>  )
>>        * Now, you know for sure, this is the SID used when you
>>          created the database...
>>        startup nomount pfile="D:\oracle\admin\demo\pfile\init.ora"
>>        CREATE DATABASE demo
>>          Yep, there it is.
>>        * HOWEVER, look in init.ora:
>>          service_names = demo.cs.nl
>>          Align tnsnames with that:
>>	    (SERVICE_NAME = demo.cs.nl)
>>	*
>>       Connected to:
>>       Oracle8i Enterprise Edition Release 8.1.7.4.1 - Production
>>To prove the point:
>> select * from global_name;
>>GLOBAL_NAME
>>-------------
>>DEMO.CS.NL
>>
>>In short: make sure the servicename is what you qualified as servicename
>>in init.ora.
>>Alternatively, change tnasnames to read:
>>    (CONNECT_DATA =
>>      (SID = demo)

>
>
> I had checked this part of the problem over and over trying to resolve
> why I was getting a 12145, because the service_name in init.ora
> matches the sid in all of the TNSNAMES files: G35. It's that in every
> single one. Hence my total confusion.
>
> At any rate, I tested sql*plus with G35 *and* G35.world, and both
> worked (the second a lot slower); as did Enterprise Manager programs.
> I haven't tried to recreate the DAD in the OAS manager, the Tree
> Applet is soooooooooo slow that I have given up on that until I finish
> this post. Some questions: do I *have* to use that interface to do
> anything with OAS, if I even *need* OAS if I can use Apache? If I can
> use Apache, I assume (off the top of my head) that I still need a DAD,
> or is httpd.conf usable? I will be researching this anyway, don't
> think I want you to do my work for me! I am very thankful that you
> took this much time. Thank you, *very* much.
>

Glad it worked out in the end. Sorry about the missing r in lsnrctl, but -lame excuse- my keyboard needs cleaning.

The "configuration files used" bit is new in the V9 tools.

I missed out completely on sqlnet.ora; it holds the default domain:
NAMES.DEFAULT_DOMAIN = cs.nl

This allows met to have demo.cs.nl in my tnsnames.ora, and specify demo as connect string (default domain being cs.nl -> the search is for demo.cs.nl)

For other projects, I use aliases with the projectname appended, so I use connect strings like testjava.project_one. Helps to keep all different connections apart on a project or customer base.

sqlnet.ora also holds the sequence of name resolution methods:
NAMES.DIRECTORY_PATH= (TNSNAMES, HOSTNAME); try tnsnames.ora first, then switch to hostname (DNS) resolving. Other possibilities: ONAMES (Oracle Name Server) and LDAP

-- 
Regards, Frank van Bortel
Received on Mon Dec 08 2003 - 23:10:08 CET

Original text of this message