PL/SQL (MOSC)

MOSC Banner

Script to generate histograms upon columns that are part of an equijoin, where clause, etc.

edited May 6, 2011 12:00PM in PL/SQL (MOSC) 8 commentsAnswered âś“
Hi,

I have this script which generates histograms for columns that are part of an equijoin.

Everything goes Ok when generating the "METHOD_OPT" text, but when I try to execute, it says that the text is long, the script is:

  SET PAGES 0;
  SET FEEDBACK OFF;
  SPOOL $TABLAS

  SELECT ''''||UPPER(owner)||''''||' '||''''||UPPER(table_name)||''''
  FROM dba_tables
  WHERE owner IN ('owner')
    AND temporary != 'Y'
 ORDER BY owner DESC, table_name;

  SPOOL OFF;
!

if [ ! -f $TABLAS ]
then
  echo 'No existe el archivo de tablas!!!' >>$LOG
  exit 5
fi

echo "Inicio analisis: `date`" >>$LOG
total=`wc -l $TABLAS | awk '{print $1}'`

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center