set heading off;
set feedback off;
set termout off;
set echo off;
set VERIFY off;
set LINESIZE 1000;


connect user/Password@service_odbc

spool C:\RebuildInvalidIndexStat.sql

select 'spool C:\RebuildInvaliIndexStat.log' from dual;


select 'alter index user.'||index_name ||' rebuild TABLESPACE TABLESPACE_INDEX;' from user_indexes where STATUS!='VALID';



select 'spool off' from dual;
spool off

set serveroutput off

set VERIFY on;
set WRAP on;
set heading on;
set feedback on;
set termout on;
set echo on;
