Re: tnsnames.ora parser

From: Yong Huang <>
Date: Sat, 1 May 2010 10:47:53 -0700 (PDT)
Message-ID: <>


Not directly related to this subject. But I find that a connection string entry (stanza) can be flattened into one line, no space at line beginning, and this entry still works. In fact, this tnsnames.ora file is very easy to grep:

#What connections go to DB(s) on server
grep tnsnames.ora

#Show all service names

perl -nle "print $1 if /SERVICE_NAME=(\w+)/" tnsnames.ora

But since the single-line stanza is kind of hard for a human to read, I only use it when I dump our OID entries to this text file for grep. I use my script to dump.

Yong Huang       

Received on Sat May 01 2010 - 12:47:53 CDT

Original text of this message