- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: TNSNAMES File.
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
тАО01-22-2009 11:46 AM
тАО01-22-2009 11:46 AM
System is running 8.3-1H1 with Oracle 10G client. The TNSNAMES.ORA file contains two entries,
$ ty tnsnames.ora
DEV.TEMPO.COM =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = TABDL385A-VIP.TEMPO.COM)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = TABDL385B-VIP.TEMPO.COM)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = DEV.TEMPO.COM)
)
)
#
STG.TEMPO.COM =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = TABDL385A-VIP.TEMPO.COM)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = TABDL385B-VIP.TEMPO.COM)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = STG.TEMPO.COM)
)
)
#
If I run TNSPING on the services I get
$ tnsping dev.tempo.com
TNS Ping Utility for VMS: Version 10.2.0.2.0 - Production on 22-JAN-2009 14:18:56
Copyright (c) 1997, 2005, Oracle. All rights reserved.
Used parameter files:
SYS$SYSDEVICE:[ORACLE10G.NETWORK.ADMIN]sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = TABDL385A-VIP.TEMPO.COM)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = TABDL385B-VIP.TEMPO.COM)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = DEV.TEMPO.COM)))
OK (20 msec)
$
$
$ tnsping stg.tempo.com
TNS Ping Utility for VMS: Version 10.2.0.2.0 - Production on 22-JAN-2009 14:19:00
Copyright (c) 1997, 2005, Oracle. All rights reserved.
Used parameter files:
SYS$SYSDEVICE:[ORACLE10G.NETWORK.ADMIN]sqlnet.ora
TNS-03505: Failed to resolve name
$
$
So it succeeds on "dev", and fails on "stg".
However, if I reverse the order of the entries in the file, then it succeeds on the "stg" and fails on "dev".
I have tried deleting the file and recreating it from scratch, manually typing in each entry, to no avail.
Interestingly, if I remove the "#" sign from between the entries,and leave a blank line, then TNS ping concatenates the entries and fails on "TNS-12533: TNS:Illegal ADDRESS parameters"
Is this my problem? Should I be using some other separator?
Also, Oracle 10G is on an ODS5 disk, and I am using "Parse Style = Traditional". Could this have something to do with it.
I would really appreciate any information that you could provide. At my age I cant afford the hair loss.
Thanks
Dave.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-22-2009 12:56 PM
тАО01-22-2009 12:56 PM
Re: TNSNAMES File.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-22-2009 01:54 PM
тАО01-22-2009 01:54 PM
Re: TNSNAMES File.
Note the extra ")" at the end of the last address line:
".... (PORT = 1521)))"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-23-2009 05:07 AM
тАО01-23-2009 05:07 AM
Re: TNSNAMES File.
I dont think this has anything to do with the formatting of the entries. The problem is that
1. IT DOES NOT SEEM TO BE ABLE TO FIND AN INSTANCE NAME UNLESS IT IS THE FIRST LINE IN THE FILE.
and
2. IF THERE IS NOT A "#" SIGN AT THE END OF THE ENTRY, IT DOESN'T RECOGNIZE THE END OF THE ENTRY, (i.e. it simply continues into (concatenates) the next entry.)
Using a Working TNSNAMES file (albeit from another OpenVMS system, running different OS and Oracle versions), also fails to read any but the first entry, and then only if there are no comments or blank lines before the first entry). If there ARE comments or blanks before the first entry, it will not resolve even the first entry.
Disgarding the file completely and starting from scratch, fails to read any but the first entry.
One additional piece of information which might be relevent, the SQLNet.ORA file contains,
$ ty tns_admin:sqlnet.ora
#SQLNET.AUTHENTICATION_SERVICES=(NONE)
AUTOMATIC_IPC = OFF
TRACE_LEVEL_CLIENT = OFF
names.directory_path = (TNSNAMES)
names.default_domain = tempo.com
#name.default_zone = world
$
Retroactively, I went back and checked the situation on another blade (standalone node running same OS and Oracle version) and found out that the situation was the same. Only the first instance is being resolved.
This failure to parse the file seems to be specific to 10g Client installed on OpenVMS 8.3-1H1 (Itanium Blade bl860c).
Does anyone know if there is a parsing parameter that needs to be set, or if there is a patch that needs to be installed.
Any further suggestions would be appreciated.
(I am taking this also to Metalink)
Dave.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-23-2009 06:02 AM
тАО01-23-2009 06:02 AM
Re: TNSNAMES File.
where have you copied the tnsnames.ora file from?
If you copied from an older Oracle version, remember that the file format has changed in Oracle 10.
Rgds
Marc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-23-2009 06:05 AM
тАО01-23-2009 06:05 AM
SolutionThe following extract come from the 10g R2 installation guide:-
If you have a previous release of Oracle software installed on this system, you may want to copy information from the Oracle Net Services TNSNAMES.ORA and LISTENER.ORA configuration files from the previous release to the corresponding files for the new release.
These files should have a record format of stream_lf.
If you copy a TNSNAMES.ORA or a LISTENER.ORA file from an earlier version, use the following command to convert the files:
$ CONVERT/FDL=SYS$INPUT filename
filename
RECORD
CARRIAGE_CONTROL carriage_return
FORMAT stream_LF ^Z
Duncan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-23-2009 06:06 AM
тАО01-23-2009 06:06 AM
Re: TNSNAMES File.
This might be my problem. Can you point me to any docs about how the format changed?
thanks
Dave.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-23-2009 06:07 AM
тАО01-23-2009 06:07 AM
Re: TNSNAMES File.
This is a (relatively) new Oracle requirement.
Easy to fix:
$ CONVERT/FDL="RECORD; FORMAT STREAM_LF;
CARRIAGE CARRIAGE" old new
I published a little script to test and generate the above lines, which you can then copy & paste to execute if desired:
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1263875
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-23-2009 06:42 AM
тАО01-23-2009 06:42 AM
Re: TNSNAMES File.
One last question, do I have to take precautions when adding addition entries to the file?? Or do I need to do this everytime I add? Or is this one time convert sufficient?
Dave.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-23-2009 06:56 AM
тАО01-23-2009 06:56 AM
Re: TNSNAMES File.
you would need to be careful every time.
Depending upon your personal choice of editor, the output from an edit is unlikely to retain the stream_lf format, and you would need to reconvert.
Try editing a stream_lf version of a file and then look at the file attributes of the new version.
Duncan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-23-2009 07:04 AM
тАО01-23-2009 07:04 AM
Re: TNSNAMES File.
Most OpenVMS editor will create a variable length record file, which will fail unless the output file is re-converted
VIM works, and can be handy in the parenthesis matching.
Also if you used say 'perl' to script an edit, that would work.
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-26-2009 05:15 AM
тАО01-26-2009 05:15 AM
Re: TNSNAMES File.
Does this mean that I am ok if I edit with "$ edit/tpu", i.e. use EVE editor. Or do you recomment converting after every edit anyway.
Dave.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-26-2009 05:40 AM
тАО01-26-2009 05:40 AM
Re: TNSNAMES File.
I'm not, and I have very little trouble
(except with new files).
> Try editing a stream_lf version of a file
> [...]
Yes. Let's do that. (Did you?)
1. Create a file using an editor:
alp $ edit /tpu orig.txt
[...]
2. Notice that it's not Stream_LF:
alp $ write sys$output f$file_attributes( "orig.txt", "rfm")
VAR
3. Convert it to Stream_LF (under a different
name):
alp $ write sys$output f$file_attributes( "orig.txt", "rfm")
VAR
alp $ convert orig.txt stmlf.txt /fdl = sys$input:
RECORD
FORMAT stream_lf
Exit <--- Ctrl/Z
4. Verify the format of the converted file:
alp $ write sys$output f$file_attributes( "stmlf.txt", "rfm")
STMLF
5. Edit the Stream-LF file, and save it under
yet another name (so it can't inherit any
attributes from a previous version):
alp $ edit /tpu stmlf.txt /output = stmlf_2.txt
[...]
6. See what happened:
alp $ write sys$output f$file_attributes( "stmlf_2.txt", "rfm")
STMLF
7. Act amazed.
That's on VMS V7.3-2 (Alpha), but find me a
system where it fails.
> Or do you recomment converting after every
> edit anyway.
I recommend running a quick test, and then
relaxing. DIRE /FULL is a quick (if noisy)
way to check a file's record format, too.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-26-2009 05:43 AM
тАО01-26-2009 05:43 AM
Re: TNSNAMES File.
EDIT/TPU should be fine.
I created a dummy file using an FDL to set the STREAM_LF format.
Record format: Stream_LF, maximum 0 bytes, longest 0 bytes
Record attributes: Carriage return carriage control
Then I used edit/tpu to modify the file, and checked the file attributes with DIR/FULL
Record format: Stream_LF, maximum 0 bytes, longest 37 bytes
Record attributes: Carriage return carriage control
After you do any work on your TNSNAMES.ORA file, just make sure that you check that the file still has the correct record format.
Duncan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-26-2009 06:27 AM
тАО01-26-2009 06:27 AM
Re: TNSNAMES File.
Dave.