If I just ran the command again via CLP it would work. And it did work the next time we ran it (only 10 minutes later). I apologize -- I meant to state that 99% of the time this same script works. It's that buggerly 1% that it doesn't, and from what it looks like it's going to happen from time to time, at least how we have it set up.
The command (taken from the shell script) is:
...
# ================================================== ===========
# Rename table xx_velocity to xx_velocity_save
# ================================================== ===========
db2 rename table xx_velocity to xx_velocity_save
if [ "$?" = "0" ]
then echo "Renamed xx_velocity to _save"
else
echo "Could not rename xx_velocity to _save."
echo "RENAME xx_CARD_SAVE TO xx_CARD"
echo "RENAME xx_ACCOUNT_SAVE TO xx_ACCOUNT"
echo "RENAME xx_ACCT_XREF_SAVE TO xx_ACCT_XREF"
echo "YOU NEED TO RECREATE ALL VIEWS."
echo "Contact your systems administrator."
echo "Renewal Critical Section Failure, run recovery script rename_save_card_acct_xref, then run rollback script creat
e_all_views, then retry the script." | mail -s "Renewal Critical Section Failure. Contact the systems administrator."
me@mycompany.com -c
abunchofpeople@mycompany.com -c
bossman@mycompany.com
exit "$?"
fi
db2 connect reset
echo --Renamed xx_... tables to xx_..._save
There are other tables that in this part get renamed but they're basicly the same.
This is the exact error that was written to the log:
================================================== ========
ENTERING CRITICAL SECTION 7 OF RENAMING TABLES TO _save
================================================== ========
==Renaming xx_... tables to xx_..._save
Database Connection Information
Database server = xxx Linux 390 8.1.5
SQL authorization ID = xxx
Local database alias = xxxxxx
Connected to eba database
DB20000I The SQL command completed successfully.
Renamed xx_card to _save
DB20000I The SQL command completed successfully.
Renamed xx_account to _save
DB20000I The SQL command completed successfully.
Renamed xx_acct_xref to _save
DB21017E The Command Line Processor encountered a system error with the
front-end process output queue. Reason code = -2097151987.
Could not rename xx_velocity to _save.
RENAME xx_CARD_SAVE TO xx_CARD
RENAME xx_ACCOUNT_SAVE TO xx_ACCOUNT
RENAME xx_ACCT_XREF_SAVE TO xx_ACCT_XREF
YOU NEED TO RECREATE ALL VIEWS.
Contact your systems administrator.
Most other companies that do this type of daily update run a comparison between the new and old data and assimilate the new data without dropping the tables. I'm now under the impression that we're doing the "fast but furious" method (fast because 6 minutes is way less than 45, furious because it makes my VP really mad with any downtime). I'm going to pursue the other method. Bottom line is that I need a stable system, and I'm sure my employers will agree.
BTW, you guys are so AWESOME! Quick, intelligent replies. I'm glad I stopped by. thx.
ß