db2licm -l检查下license
IBM Support: Fix Central - Please wait, Select fixes
db2 force application all
db2ckbkp -H JYC.0.DB2.NODE0000.CATN0000.20240603223001.001
db2 "restore db jyc logtarget x:\db2\log"
db2 "rollforward db jyc to end of logs and complete overflow log path (x:\db2\log)"
报错:
归档日志路径
参考:https://www.cnblogs.com/vipsoft/archive/2012/08/08/2628291.html
其它参考:https://www.talkwithtrend.com/Question/262263?order=asc
关于错误:SQL1265N的错误处理
步骤一、恢复数据库
db2inst1@db2server:~> db2 "restore db patchdb logs taken at 20140124061304
LOGTARGET /home/db2inst1/dblog/"
DB20000I The RESTORE DATABASE command completed successfully.
步骤二、前滚数据库
db2inst1@db2server:~/dblog> db2 "ROLLFORWARD DATABASE patchdb TO END OF LOGS AND COMPLETE
OVERFLOW LOG PATH ('/home/db2inst1/dblog/')"
SQL1265N The archive log file "S0000017.LOG" is not associated with the
current log sequence for database "PATCHDB" on node "0".
步骤三、拷贝需要前滚的最小日志文件
db2inst1@db2server:~> cd /home/db2inst1/dblog/
db2inst1@db2server:~/dblog> ls -rtl
total 16
drwxr-x--- 4 db2inst1 db2iadm1 4096 Jan 24 06:21 db2inst1
-rw------- 1 db2inst1 db2iadm1 12288 Jan 24 06:35 S0000017.LOG
db2inst1@db2server:~/dblog> cp S0000017.LOG /home/db2inst1/db2inst1/NODE0000/SQL00003/SQLOGDIR/
db2inst1@db2server:~/dblog> db2 "ROLLFORWARD DATABASE patchdb TO END OF LOGS AND COMPLETE "
SQL1271W Database "PATCHDB" is recovered but one or more table spaces are
off-line on node(s) "0".
步骤四、查询前滚状态
db2inst1@db2server:~/dblog> db2 "rollforward db patchdb query status"
Rollforward Status
Input database alias = patchdb
Number of nodes have returned status = 1
Node number = 0
Rollforward status = not pending
Next log file to be read =
Log files processed = S0000017.LOG - S0000017.LOG
Last committed transaction = 2014-01-24-11.13.22.000000 UTC