Re: Ways to Generate References to Specific Character String in a Schema

From: joel garry <joel-garry_at_home.com>
Date: Tue, 23 Feb 2010 09:37:59 -0800 (PST)
Message-ID: <206d3f66-7cbc-4968-87f9-79f7ed634e7b_at_b9g2000pri.googlegroups.com>



On Feb 23, 6:38 am, "if_inves..._at_yahoo.com" <basis_consult..._at_hotmail.com> wrote:
> On Feb 22, 6:14 pm, joel garry <joel-ga..._at_home.com> wrote:
>
>
>
> > On Feb 22, 1:38 pm, "if_inves..._at_yahoo.com"
>
> > <basis_consult..._at_hotmail.com> wrote:
> > > Hi,
>
> > > In a 10g database, I am looking for all ways to list references
> > > to a specific data string in any table of a specific schema, assuming
> > > that the fields are all VARCHAR2.
>
> > > For example, suppose that there is a schema named OLYMPICS.
>
> > > That schema has many tables, and I am looking for all tables that
> > > have a data value of 'Vancouver' (Hopefully, case insensitive), in
> > > any field. The fields are all VARCHAR2.
>
> > > So, the script will, hopefully, generate the following data. The most
> > > important
> > > info. is the tablename... I can live without the fieldname and value.
> > > I would
> > > prefer the case insensitivity, but I can live without that also.
>
> > > Schema       Table      Field                Data Value
>
> > > OLYMPICS- HOST     Currenthost      vancouver
> > > OLYMPICS- CITIES    2010host         Vancouver
>
> > > etc..
>
> > > Thanks,
> > > QZ
>
> > Seehttp://asktom.oracle.com/pls/asktom/f?p=100:11:3980172595068555::::P1...
>
> > jg
> > --
> > _at_home.com is bogus.http://jimhillmedia.com/blogs/jim_hill/archive/2010/02/09/what-happen...Hide quoted text -
>
> > - Show quoted text -
>
> Hi,
>
> Thanks to those who replied. I will check the AskTom script.
> This is not a class assignment; I am trying to find references
> to the server name in the database.

Don't know if this will work, it's just off the top of my head, but in the past I've searched export files like so, kinda slow:

strings xyz.exp|awk '{ if (match($0,"CREATE TABLE")>0) {saveline=$0} {if (match($0,"Abcdefg")>0) {print saveline}}}'|sort -u|more

It will miss it if the export breaks up the string Abcdefg, though, I can't remember if exp does that in column data.

jg

--
_at_home.com is bogus.
http://www.ibtimes.com/articles/20100223/developers-arms-over-apples-restrictions.htm
Received on Tue Feb 23 2010 - 11:37:59 CST

Original text of this message