私はすべてのcreateおよびalterテーブルスクリプトを持つAlter_t_new.sqlを実行しているシェルスクリプトを作成しました。今、私はどんなエラーが出ても、ログファイルにスプールされるように作られています。私はSPOOL $ LOGFILEを試みたが、それはエラーにオブジェクト作成をログファイルにスプールする方法
SPOOL: command not found
シェルスクリプトを投げている:
echo "Starting installation of XXHCM_OBJECTS - XXHCM_OBJECTS ..."
echo "Starting installation of XXHCM_OBJECTS - XXHCM_OBJECTS ..." "">>$LOGFILE
echo "">>$LOGFILE
echo "">>$LOGFILE
echo "Copying Files To Appropriate Directories ..."
echo "Copying Files To Appropriate Directories ..." "">>$LOGFILE
echo "">>$LOGFILE
echo "">>$LOGFILE
echo "Files copied successfully !!! "
echo "Files copied successfully !!! " "">>$LOGFILE
echo "">>$LOGFILE
echo "Changing permissions ... " "">>$LOGFILE
chmod 777 *.*
echo "Changed permissions ... " "">>$LOGFILE
echo "">>$LOGFILE
echo "Creating Custom Package, Synonyms and Grants..." "">>$LOGFILE
echo "Creating Custom Package, Synonyms and Grants..."
echo "">>$LOGFILE
if sqlplus $APPS_USER @Alter_t_new.sql
then
SPOOL $LOGFILE
echo "Custom itables created successfully in APPS schema" "">>$LOGFILE
echo "Custom itables created successfully in APPS schema"
SPOOL OFF
else
echo "Error in creating custom itables in APPS schema" "">>$LOGFILE
echo "Error in creating Custom itables in APPS schema"
fi
echo "">>$LOGFILE
echo "Package, Synonyms,grants and Tables created successfully" "">>$LOGFILE
echo "Package, Synonyms,grants and Tables created successfully"
echo "">>$LOGFILE
echo "Installation completed for XXHCM_OBJECTS - XXHCM_OBJECTS"
echo "Installation completed for XXHCM_OBJECTS - XXHCM_OBJECTS" "">>$LOGFILE
# *****************************************************************************
# End of Script
# *****************************************************************************
@ hinotf-サーバーにmy_logを作成する必要がありますか? –
SQLPlusが実行されている場所で@sreekemboseログファイルが作成されました – hinotf
ありがとうございました! –