【发布时间】:2011-11-02 20:15:07
【问题描述】:
我正在使用命令
db2 restore db S18 from /users/intadm/s18backup/ taken at 20110913113341 on /users/db2inst1/ dbpath on /users/db2inst1/ redirect without rolling forward
to restore database from backup file located in /users/intadm/s18backup/ .
命令执行给出这样的输出:
SQL1277W A redirected restore operation is being performed. Table space
configuration can now be viewed and table spaces that do not use automatic
storage can have their containers reconfigured.
DB20000I The RESTORE DATABASE command completed successfully.
当我尝试连接到恢复的数据库时(通过执行 'db2 connect to S18'),我收到以下消息:
SQL0752N Connecting to a database is not permitted within a logical unit of
work when the CONNECT type 1 setting is in use. SQLSTATE=0A001
当我尝试使用像 SQuireL 这样的 db 查看器连接到 db 时,错误如下:
DB2 SQL Error: SQLCODE=-1119, SQLSTATE=57019, SQLERRMC=S18, DRIVER=3.57.82
这意味着“在恢复功能期间发生错误或恢复仍在进行中”(来自 IBM DB2 手册)
如何解决这个问题并连接到恢复的数据库? UPD:我在备份文件上执行了 db2ckbkp,它没有发现备份文件本身有任何问题。
【问题讨论】:
-
您的恢复命令中有“不前滚”...您是否要恢复到某个时间点?