Re: tnsnames.ora parser

From: Jared Still <jkstill_at_gmail.com>
Date: Sat, 1 May 2010 11:06:23 -0700
Message-ID: <u2ybf46381005011106r42f874abt34a6a9fe244cf697_at_mail.gmail.com>



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_at_yahoo.com> 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
>
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Sat May 01 2010 - 13:06:23 CDT

Original text of this message