1748089 Members
4868 Online
108758 Solutions
New Discussion юеВ

Re: TNSNAMES File.

 
SOLVED
Go to solution
The Brit
Honored Contributor

TNSNAMES File.

Hi Guys, I am having a terrible time with the TNSNAMES file on a new OpenVMS Blade cluster.
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.

14 REPLIES 14
Mike Kier
Valued Contributor

Re: TNSNAMES File.

The example at < http://lbdwww.epfl.ch/f/teaching/courses/oracle9i/network.920/a96581/tnsnames.htm > (figure 7-2) seems to indicate using multiple (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=) from a single top level definition, rather than having multiple full definitions.
Practice Random Acts of VMS Marketing
John H. Reinhardt
Frequent Advisor

Re: TNSNAMES File.

Since you have multiple addresses per database instance you may want to add the "ADDRESS_LIST" keyword. See the attached file.

Note the extra ")" at the end of the last address line:

".... (PORT = 1521)))"

The Brit
Honored Contributor

Re: TNSNAMES File.

Thanks for your suggestions guys, unfortunately neither of them resolved the issue.

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.
Marc Van den Broeck
Trusted Contributor

Re: TNSNAMES File.

Hi Dave,

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
Duncan Morris
Honored Contributor
Solution

Re: TNSNAMES File.

I don't have an itanium handy to play with, but have you checked the format of TNSNAMES.ORA?

The 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
The Brit
Honored Contributor

Re: TNSNAMES File.

Hi Marc,
This might be my problem. Can you point me to any docs about how the format changed?

thanks

Dave.
Hein van den Heuvel
Honored Contributor

Re: TNSNAMES File.

The file is STREAM_LF format I hope?
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.
The Brit
Honored Contributor

Re: TNSNAMES File.

Thanks again,

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.
Duncan Morris
Honored Contributor

Re: TNSNAMES File.

Dave,

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