TOraServerEnumerator.GetServerList() does not account for commented entries
Posted: Mon 16 Jun 2014 17:17
I have a tnsnames.ora file that has an ifile declaration commented out (#) in the file. The problem is that the ifile declares the same tnsnames.ora file as the file. When TOraServerEnumerator.GetServerList() in OraServices.pas is called it ends up looking in tnsnames.ora for the ifile declaration which then finds and opens up the same file and looks for the ifile declaration over and over again which turns out being an infinite loop.
It would be nice if TOraServerEnumerator.GetServerList() could be improved to be smart enough to check for commented entries when looking for the ifile. It would also be nice if there was also some logic that checked for infinite loops in the ifile lookup logic.
I realize that this can be worked around by removing the ifile declaration or replacing ifile with i#file or something like that however, the symptom for me to realize that this was occurring was that our application was locking up without any indication as to why it was locked up.
This is the the tnsnames.ora file located at "C:\Work\SQLOracle\tnsnames.ora"
I just wanted to make you aware of what I would consider a bug.
Thanks
Rick
It would be nice if TOraServerEnumerator.GetServerList() could be improved to be smart enough to check for commented entries when looking for the ifile. It would also be nice if there was also some logic that checked for infinite loops in the ifile lookup logic.
I realize that this can be worked around by removing the ifile declaration or replacing ifile with i#file or something like that however, the symptom for me to realize that this was occurring was that our application was locking up without any indication as to why it was locked up.
This is the the tnsnames.ora file located at "C:\Work\SQLOracle\tnsnames.ora"
Code: Select all
# The following i file declaration is commented out
# ifile=C:\Work\SQLOracle\tnsnames.ora
DESIGNOPS_WORKSTUD = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = designops )(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = WORKSTUD ) ) )
Thanks
Rick