Re: tnsnames.ora parser
From: Yong Huang <yong321_at_yahoo.com>
Date: Sat, 1 May 2010 10:47:53 -0700 (PDT)
Message-ID: <537763.29023.qm_at_web80604.mail.mud.yahoo.com>
Jared,
Date: Sat, 1 May 2010 10:47:53 -0700 (PDT)
Message-ID: <537763.29023.qm_at_web80604.mail.mud.yahoo.com>
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-lReceived on Sat May 01 2010 - 12:47:53 CDT