- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- tnsping on a non oracle related account !!!
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-25-2002 01:09 PM
тАО11-25-2002 01:09 PM
Here is a good one, which I could not answer, since I have never encountered this problem before.
I am having problems with a apache web server account. The c program accesses the local DB fine from the command prompt, but not from the web cgi-bin program.
I think this is an environment problem on the web server, and the same program, when executed on another box, access this local DB fine.
Looking at the sqlnet.log file generated, we get this error :
Fatal NI connect error 12541, connecting to:
(DESCRIPTION=(CONNECT_DATA=(SID=*)(SERVICE_NAME=RIM.)(CID=(PROGRAM=)(HOST=HOSTHERE)(USER=webuser)))(ADDRESS=(PROTOCOL=TCP)(HOST=RIM)(PORT=1521)))
as you can see, SID is *, which is not correct. ANd service name is also trying to concatenate something to the correct SID name.
NOW, the interesting part, and I am sure I am about to learn something here.
When I login to this account, webuser, on the box that this works from, it has no oracle environment setup at all, but If I execute tnsping from that account, I get something like this :
tnsping SID_NAME
under the host I get the correct host name
if I try the same thing on the local machine, it does not revolve to the host name, instead it uses the SID_NAME as the hostname !!! ???
there is no sqlnet.ora file on these boxes ( not sure why )
So, my question here is !!!!
how does an account with no oracle environment resolves hostname on one box OK but not on the other ? I want to be able to explain to somebody, what is the process that tnsping uses when there are no oracle environments setup for a given account, which is what is happening here. I would like to KNOW as well :-))
Thanks,
Henrique Silva
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-25-2002 08:26 PM
тАО11-25-2002 08:26 PM
Re: tnsping on a non oracle related account !!!
The apache should either use the sql net to connect to the database or the ODBC.
I am not sure about the configuration of the apache but would tell that the sql net should be configured.
Use Net8 configuration Assistant for the same.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-26-2002 07:37 AM
тАО11-26-2002 07:37 AM
Re: tnsping on a non oracle related account !!!
when you do a tnsping from the webuser account, which has no ORACLE environment variables set, it resolves the hostname correctly !!!! Somehow !!!!
say, tnsping from host green.com I get :
$ /opt/oracle/product/8.1.7/bin/tnsping TEST
TNS Ping Utility for HPUX: Version 8.1.7.3.0 - Production on 26-NOV-2002 07:25:46
(c) Copyright 1997 Oracle Corporation. All rights reserved.
Attempting to contact (ADDRESS=(PROTOCOL=TCP)(HOST=GREEN.COM)(PORT=1521))
Message 3509 not found; No message file for product=network, facility=TNS
when you try the same thing from the non-working box, you get an ORA-03505 with not much info at first, and if you try to use the hostname as the instance name below, you get the host as the instance you are trying to tnsping :
$ /u00/app/oracle/product/8.1.7_64/bin/tnsping TEST
TNS Ping Utility for HPUX: Version 8.1.7.4.0 - Production on 26-NOV-2002 10:29:38
(c) Copyright 1997 Oracle Corporation. All rights reserved.
TNS-03505: Message 3505 not found; No message file for product=network, facility=TNS
$ /u00/app/oracle/product/8.1.7_64/bin/tnsping GREEN
TNS Ping Utility for HPUX: Version 8.1.7.4.0 - Production on 26-NOV-2002 10:30:00
(c) Copyright 1997 Oracle Corporation. All rights reserved.
Attempting to contact (ADDRESS=(PROTOCOL=TCP)(HOST=GREEN)(PORT=1521))
Message 3509 not found; No message file for product=network, facility=TNS
So, we found yesterday that in the resolv.conf, there were some domains that might explain why the SID name was appearing as RIM, however, what I need to understand is HOW A NON-ORACLE RELATED ACCOUNT ( webuser, which has no oracle variables ), and this is outside the box guys, do not think as it being apache here but just an account, say joeblow, how does it resolve SID and hostname when a tnsping is executed ? I could not explain it yesterday, and I sure would like to know.
My guess is that when you do a tnsping, it looks at your env and if it does not find anything there, it will use whatever is on the resolv.conf file in order to find out whether it will use hosts, NIS, or whatever, to at least find a system with the same name as the instance you are trying to tnsping !!!
But htis is just a guess, and I need to know exactly what happens, so I can make some sense out of this !!!
Thanks,
Henrique Silva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-26-2002 07:47 AM
тАО11-26-2002 07:47 AM
Re: tnsping on a non oracle related account !!!
a) Do you have a tnsnames.ora accessible by this User?
b) Do you have any other Oracle related variables in your shell?
c) What is the output of your 'env' command as the user?
Share and Enjoy! Ian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-26-2002 03:46 PM
тАО11-26-2002 03:46 PM
Re: tnsping on a non oracle related account !!!
Again, can somebody explain the process to me ? This user has NO ORACLE ENVIRONMENTS and the HOST was resolving the the proper ( local ) system. It did not find the instance, but resolved the host. I am still trying to understand how tnsping and ping relate here, and how the environment substitution is happening !!!
Thanks,
Henrique Silva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-27-2002 01:05 PM
тАО11-27-2002 01:05 PM
Solution$TNS_ADMIN
/etc
$ORACLE_HOME/network/admin
~/.tnsnames.ora
It checks to see if the variable points to a directory, and then checks to see if files exist. The "Msg not found" messages mean that you do not have a valid $ORACLE_HOME variable set. The tnsping command will use DNS to define the host if it does not find the input variable in the tnsnames.ora file (hence you get a response from "GREEN" but not from "TEST").
Hope this helps.
Brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-28-2002 10:46 AM
тАО11-28-2002 10:46 AM
Re: tnsping on a non oracle related account !!!
what about the "$TWOTASK" variable?
Even though it is quite an old-fashioned one, it still does work, AFAIK...
Its content would be the TNSNAME to be used.
And if the process using Net8 does a "cd" to the $ORACLE_HOME directory to be used, and has "." in its $PATH and maybe even its "$SHLIB_PATH", then that could be sufficient.
FWIW,
Wodisch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-02-2002 06:59 AM
тАО12-02-2002 06:59 AM
Re: tnsping on a non oracle related account !!!
Thanks Brian.
This is really what I was looking for. An explanation of the places an account will look for, if it does not have any Oracle variables setup.
What I will do however, is make sure that this web account has ALL the oracle variables setup, so that it does not have any problems in the future.
Thanks everyone.
Henrique Silva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-03-2002 01:17 PM
тАО12-03-2002 01:17 PM
Re: tnsping on a non oracle related account !!!
I personally like to set up any env variables that are required for the web server, in this file.
Surya.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-03-2002 01:51 PM
тАО12-03-2002 01:51 PM
Re: tnsping on a non oracle related account !!!
the problem has been solved by adding the symbolic links from /etc to the *.ora files on ORACLE_HOME/network/admin, but this might have been the solution all along. The problem is ALWAYS been apache not being able to map the proper environments, and this might have been the answer.
thanks,
Henrique