Wednesday, January 27, 2010

tnsnames.ora is picky

Recently we added some TNS entries into our Remote Desktop servers that shared by all our users. The user report newly added entries are not working.
I did a tnsping on them and got these errors.

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION =
TNS-12533: TNS:illegal ADDRESS parameters

I then check the entry in tnsnames.ora file, it reads



Do you find anything wrong with them?

Not sure about you, but it took me a while to figure out that tnsnames.ora is pretty sensitive to the format. The problem is the new entry description all flatten out to the left instead of having indentation like this one just below.

-----(SID = FPROD)

-- Oh well, I think we had same problem here on blogspot, it left align all my postings. Let me use dash instead.

So Oracle think "(DESCRIPTION" is a new entry in the tnsnames.ora instead of the description of previous entry. Because we DBA don't have control over the remote desktop server, I need to create tickets to add new entry. When I pasted the text into ticket, the ticket system left aligned them hence lost indentation.

Well, it's a small trivial problem but sometime it's hard to figure if you don't already know. Because the actual configure text are correct and worked on other hosts.