利用表空间重建数据库出错

db2 v9.7 + linux5.4

db2 create db testdb
db2 connect to testdb
db2 "create tablespace userspace2 managed by automatic storage"
db2 connect to testdb
db2 "create tablespace userspace3 managed by automatic storage"
db2 update db cfg for testdb using LOGARCHMETH1 disk:$HOME/archlog
db2 backup db testdb to /dev/null
然后执行脚本bak:
db2 connect to testdb
db2 "backup db testdb tablespace (syscatspace,userspace1) online to $HOME/tbbak"
db2 "backup db testdb tablespace (userspace2,userspace3) online to $HOME/tbbak"
db2 "backup db testdb tablespace (userspace3) online to $HOME/tbbak"
   Database Connection Information
Database server        = DB2/LINUX 9.7.4
SQL authorization ID   = DB2INST1
Local database alias   = TESTDB
Backup successful. The timestamp for this backup image is : 20120628213134
Backup successful. The timestamp for this backup image is : 20120628213140
Backup successful. The timestamp for this backup image is : 20120628213142
现在开始恢复数据库:
db2 restore db testdb rebuild with all tablespaces in database taken at 20120628213142
SQL2582W  Warning! A new request to rebuild the database from a table space
image or using a subset of table spaces has been detected. This will abort the
current rebuild in progress and start a new one using this backup image. The
target database will be overwritten.
Do you want to continue ? (y/n) y
DB20000I  The RESTORE DATABASE command completed successfully.
/home/db2inst1>
/home/db2inst1>db2 "rollforward db testdb to end of logs and stop "
SQL1268N  Roll-forward recovery stopped due to error "SQL1042" while
retrieving log file "S0000002.LOG" for database "TESTDB" on node "0".
每次都是这样的问题,我都试了n遍了,请大家帮一下。
参与5

2同行回答

jinzunjinzun软件开发工程师郑州大学
今天我也试也,好像也是这样的问题,有没有人解决呀显示全部
今天我也试也,好像也是这样的问题,有没有人解决呀收起
互联网服务 · 2012-08-09
浏览503
synclijunsynclijun软件开发工程师topnet
数据库不完整了,停止前滚日志吧显示全部
数据库不完整了,停止前滚日志吧收起
互联网服务 · 2012-07-12
浏览502

提问者

问题状态

  • 发布时间:2012-06-28
  • 关注会员:3 人
  • 问题浏览:6621
  • 最近回答:2012-08-09
  • X社区推广