Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Whole database search (solution)

Re: Whole database search (solution)

From: Tom T <tomtul2_at_yahoo.com>
Date: 22 Jul 2003 12:16:52 -0700
Message-ID: <fcd672c.0307221116.5c2b9884@posting.google.com>


improvement on my previous post--I got it all in one script so it is not a two step process of creating a script and running it.

You still have to hand edit the script to put in the database name, search string and other parameters.

#!/bin/sh
# search whole database for text string
# >> Must Hand Edit to set
# CONNECT STRING
# SEARCH STRING
# string length (DATA_LENGTH)
# table OWNER
#
# currently hard coded
# You can also restrict the search to tablenames matching a
wildcard--see
# uncomment the 'and table_name like ...' in the Where clause.

connectstr=SCOTT/TIGER_at_MYDB

generate_sql()
{
# generate Sql statements to search all varchar2 columns in all tables
for a string
echo "set feedback off"

sqlplus -s $connectstr <<EOF
  set pages 0
  set feedback off
  set linesize 300

Received on Tue Jul 22 2003 - 14:16:52 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US