#!/bin/bash # Author: A-Lang DB_USER="WIN_FDC_OFFLINE_STDB" DB_PASS="1234" get_tab_list (){ sqlplus -s $DB_USER/$DB_PASS <<EOF SET PAGESIZE 0 FEEDBACK OFF VERIFY OFF HEADING OFF ECHO OFF SELECT t.table_name FROM user_tables t ORDER BY 1; EXIT; EOF } cat << EOF set heading off set feedback off set pagesize 0 EOF get_tab_list | while read tab_name do echo "select '${DB_USER}.${tab_name} ' || count(*) from ${DB_USER}.${tab_name};" #echo $tab_name done echo echo "exit;"