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

db2 v9.7 + linux5.4db2 create db testdbdb2 connect to testdbdb2 "create tablespace userspace2 managed by automatic storage"db2 connect to testdbdb2 "create tablespace userspace3 managed by automatic storage"db2 update db cfg for testdb using LOGARCHM...显示全部
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

查看其它 1 个回答jinzun的回答

jinzunjinzun软件开发工程师郑州大学
今天我也试也,好像也是这样的问题,有没有人解决呀
互联网服务 · 2012-08-09
浏览510

回答者

jinzun
软件开发工程师郑州大学

jinzun 最近回答过的问题

回答状态

  • 发布时间:2012-08-09
  • 关注会员:3 人
  • 回答浏览:510
  • X社区推广