Hi All,
We have oracle 11.2.0.4 on Aix 7.
Every weekend ,we run index rebuild scripts based on schemas. Each schema has one index rebuild script.some schema has less than 50 indexes and others has more than 100 indexes.
Schema names are Test1,test2,test3 etc. The rebuild script is stored at /u05/scripts/test1/,/u05/scripts/test2,/u05/scripts/test3 etc.
Last three months,the rebuild index scripts ( some of the indexes ) was failed due to an error ORA-00054.
Script : For the Test1 schema
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
export ORACLE_HOME=/u01/app/oracle
export ORACLE_SID=TEST
export PATH=$ORACLE_HOME/bin:$PATH
sqlplus -s "username/password@test" << EOF
spool Test1_Index_rebuild.log
@/u05/scripts/Test1_Index_rebuild.sql
EOF
spool off;
exit;
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1a,I am asked to extract the error ORA-00054 with sql statement from Test1_Index_rebuild.log,save it as Test1_Index_rebuild_1.log
1b,Then,extract only sql statement from Test1_Index_rebuild_1.log,save it as Test1_Index_rebuild_1.sql.
1c,Finally send the Test1_Index_rebuild.sql file to mail.
2,I have to do the same thing for others schema's Test2,Test3 etc.
Any Suggestions
Thanks & Regards,