export LANG=C
export NLS_LANG=American_America.JA16SJISTILDE
cd $(cd $(dirname $0);pwd)
sqlplus -s system/manager@192.168.1.10:1521/orcl <<EOF
set pagesize 0
set head off
set feed off
set trimspool on
spool db01-scott.log
select '"'||object_type||'", "'||object_name||'","'||subobject_name||'"' from dba_objects
where owner = 'SCOTT'
and (object_type like 'INDEX%' or object_type like 'TABLE%')
order by object_type, object_name, subobject_name;
spool off
exit
EOF
sqlplus -s system/manager@192.168.1.11:1521/orcl <<EOF
set pagesize 0
set head off
set feed off
set trimspool on
spool db02-scott.log
select '"'||object_type||'", "'||object_name||'","'||subobject_name||'"' from dba_objects
where owner = 'SCOTT'
and (object_type like 'INDEX%' or object_type like 'TABLE%')
order by object_type, object_name, subobject_name;
spool off
exit
EOF
diff -y db01-scott.log db02-scott.log