Re: tnsnames.ora parser

Thanks Yong.

My tnsnames.ora files are often flattened into one line.

Re the spaces: I have in fact ran into problems with some versions
of Oracle when there are spaces in the tnsnames entries, so I always
remove spaces.

Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist
Oracle Blog: http://jkstill.blogspot.com
Home Page: http://jaredstill.com



On Sat, May 1, 2010 at 10:47 AM, Yong Huang <yong321@xxxxxxxxx> wrote:

> Jared,
>
> 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 abc.example.com
> grep abc.example.com 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 http://yong321.freeshell.org/oranotes/Ldap2Tnsnames.txt to dump.
>
> Yong Huang
>
>
>
> --
> http://www.freelists.org/webpage/oracle-l
>
>
>

Other related posts: