Checking a config file for malformed entries - Oracle TNSNAMES.ORAfile - having problems, please hel

Checking a config file for malformed entries - Oracle TNSNAMES.ORAfile - having problems, please hel

am 22.07.2011 01:27:00 von newbie01 perl

--00151773e26893ea9004a89caf2c
Content-Type: text/plain; charset=ISO-8859-1

Hi all,

In Oracle, there is a file named tnsnames.ora that contains connection
strings to Oracle Databases.

At the moment the file is 10000+ lines long. We are currently having a
problem where the file is malformed, i.e. missing matching brackets. Can any
of the experts please advise how best to check for malformed stuff.

I believe Perl is very good at doing this kind of stuff. I've managed to
find some command line options from Google and trying that out.

For the meantime, hopefully someone from this group have had this same
problem in the fix and has a script that checks for malformity.

Thanks in advance.

--00151773e26893ea9004a89caf2c--

Re: Checking a config file for malformed entries - OracleTNSNAMES.ORA file - having problems, please

am 22.07.2011 01:49:37 von Jim Gibson

On 7/21/11 Thu Jul 21, 2011 4:27 PM, "newbie01 perl"
scribbled:

> Hi all,
>
> In Oracle, there is a file named tnsnames.ora that contains connection
> strings to Oracle Databases.
>
> At the moment the file is 10000+ lines long. We are currently having a
> problem where the file is malformed, i.e. missing matching brackets. Can any
> of the experts please advise how best to check for malformed stuff.
>
> I believe Perl is very good at doing this kind of stuff. I've managed to
> find some command line options from Google and trying that out.
>
> For the meantime, hopefully someone from this group have had this same
> problem in the fix and has a script that checks for malformity.

There is a CPAN module called Text::Balanced that will extract substrings
delimited by matching delimiters. Perhaps that can help.



--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/

Re: Checking a config file for malformed entries - OracleTNSNAMES.ORA file - having problems, please

am 22.07.2011 01:59:14 von Jim Gibson

On 7/21/11 Thu Jul 21, 2011 4:27 PM, "newbie01 perl"
scribbled:

> Hi all,
>
> In Oracle, there is a file named tnsnames.ora that contains connection
> strings to Oracle Databases.
>
> At the moment the file is 10000+ lines long. We are currently having a
> problem where the file is malformed, i.e. missing matching brackets. Can any
> of the experts please advise how best to check for malformed stuff.
>
> I believe Perl is very good at doing this kind of stuff. I've managed to
> find some command line options from Google and trying that out.
>
> For the meantime, hopefully someone from this group have had this same
> problem in the fix and has a script that checks for malformity.

There is a relevant discussion of just such a problem (perhaps even more
complicated than yours) going on in several, cross-posted Usenet news
groups. See here:

2436e/5df042e35bf9bb80?hl=en&q=group:comp.lang.perl.misc>

One Perl solution is here:



You can simplify these solutions somewhat by reducing the delimiter set.



--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/