shell脚本备份db2数据库
在shell脚本里面核心的备份语句就下面两句话
db2 archive log for db tart
db2 backup db tart ONLINE to /home/db2inst1/DB2BakData INCLUDE LOGS
然后就报以下错误:
2012-05-21-08.49.31.398699+480 E633049996G504 LEVEL: Error
PID : 2821 TID : 2169498512 PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : tart
APPHDL : 0-4813 APPID: *LOCAL.db2inst1.120521004907
AUTHID : DB2INST1
EDUID : 106 EDUNAME: db2agent (tart) 0
FUNCTION: DB2 UDB, database utilities, sqluhDeletionReport, probe:387
MESSAGE : ADM8509N Unable to delete the database logs "203 - 236" in log chain
"5".
2012-05-21-08.49.31.398894+480 E633050501G519 LEVEL: Error
PID : 2821 TID : 2169498512 PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : tart
APPHDL : 0-4813 APPID: *LOCAL.db2inst1.120521004907
AUTHID : DB2INST1
EDUID : 106 EDUNAME: db2agent (tart) 0
FUNCTION: DB2 UDB, database utilities, sqluhPruneHistoryDeleteFile, probe:1071
MESSAGE : ADM8504I Successfully deleted the backup image with timestamp
"20110723030004".
2012-05-21-08.49.31.399112+480 I633051021G734 LEVEL: Error
PID : 2821 TID : 2169498512 PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : tart
APPHDL : 0-4813 APPID: *LOCAL.db2inst1.120521004907
AUTHID : DB2INST1
EDUID : 106 EDUNAME: db2agent (tart) 0
FUNCTION: DB2 UDB, database utilities, sqluhDiskDelete, probe:949
MESSAGE : SQL0902C A system error (reason code = "") occurred. Subsequent SQL
statements cannot be processed.
DATA #1 : String, 30 bytes
Error returned by disk delete.
DATA #2 : String, 74 bytes
/home/db2inst1/ARCHIVE_DBLog/db2inst1/tart/NODE0000/C0000005/S0000237.LOG
DATA #3 : ZRC, PD_TYPE_ZRC, 4 bytes
0x870F0011
2012-05-21-08.49.54.657490+480 E633051756G487 LEVEL: Error
PID : 2821 TID : 2169498512 PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : tart
APPHDL : 0-4813 APPID: *LOCAL.db2inst1.120521004907
AUTHID : DB2INST1
EDUID : 106 EDUNAME: db2agent (tart) 0
FUNCTION: DB2 UDB, database utilities, sqluhDeletionReport, probe:387
MESSAGE : ADM8509N Unable to delete the database logs "237" in log chain "5".
上面那个/home/db2inst1/ARCHIVE_DBLog/这个是原先的归档日志路径,但是在我接手之前被上一个哥们给删除了,后来我重新配置了一个路径,但是从日志报错的情况来看,他依然再找原先的归档日志的内容,请高手指导一下,它这个影不影响我现在的备份?
[解决办法]
你看看目录权限够吗?
另外,你shell脚本是否保存了,执行的是这个shell吗?
正常的话,shell是没有缓存的。
[解决办法]
把shell里面的脚本拿出来 执行下看看