TnsNames parsing problem / IFILE
Posted: Wed 17 Oct 2018 06:45
Our customer uses a very simple tnsnames.ora containing a single IFILE instruction:
IFILE=//server/share/folder/tnsnames.ora
The referenced tnsnames.ora contains a large number of entries, most using more than one alias.
The first alias is in the first line of the include file, no comment or empty line before!!
The currently implemented parser finds just two aliases: DESCRIPTION and DESCRIPTION_LIST, which is obviously wrong.
I found out the following change helped to fix the problem:
Without the change the repeat-until code is looped again, and the first line of the include file is removed from the copy.
As a result, alias parsing gave odd results.
Please consider to include a fix in the next release.
IFILE=//server/share/folder/tnsnames.ora
The referenced tnsnames.ora contains a large number of entries, most using more than one alias.
The first alias is in the first line of the include file, no comment or empty line before!!
The currently implemented parser finds just two aliases: DESCRIPTION and DESCRIPTION_LIST, which is obviously wrong.
I found out the following change helped to fix the problem:
Code: Select all
procedure TOraServerEnumerator.GetServerList(List: TStrings);
...
if FileExists(FileName) then begin
IFile.LoadFromFile(FileName);
for j := IFile.Count - 1 downto 0 do
F.Insert(i, IFile[j]);
Code := lcEnd; //hh, 16.10.2018 added to leave the until loop
Continue;
end;
until Code = lcEnd;;
As a result, alias parsing gave odd results.
Please consider to include a fix in the next release.