Step 2. SQL to generate and Run a Script to
Check Row Count for each Table
- set feedback off
 - set heading off
 - Generate the SQL Script, called gen_script.sql ...
spool gen_script.sql
select TO_CHAR(SysDate,'DD/Mon/YYYY  HH:MI P.M.') from
dual;
Change Table Owner as appropriate ...
SELECT 'SELECT '||''''||Table_name||''''||', COUNT(*) FROM
'||Table_Name||';'
FROM all_tables WHERE owner='OPS$ORACLE';
select TO_CHAR(SysDate,'DD/Mon/YYYY  HH:MI P.M.') from
dual;
spool off
 - Run the generated SQL Script and create output file.
 - spool chk_num_rows.op 
 - start gen_script.sql
 - spool off
 - rem This completes the Job.