51代码网ORACLEMYSQLSQL SERVER其它数据库java/jspasp/asp.netC/C++/VC++APP应用其它语言服务器应用
您现在的位置: 51代码网 >> 其它数据库 >> 文章正文

DB2 v9.5恢复问题

更新时间:2012-3-11:  来源:51代码网

DB2从NBU做异机恢复,在目标机上原来创建过同名数据库。恢复时已经将原来数据库全部删。
创建新的实例后,在恢复数据库时,重新命名要恢复的库。提示:
db2 => restore db HBYD load /usr/openv/netbackup/bin/nbdb2.so64 into HBYDNEW redirect
SQL0294N The container is already in use. SQLSTATE=42730

在库文件目录下看不到任何和新库相关的内容。
 
后在目标机上创建了一个新库,查看显示如下:
db2 => list tablespace containers for 3 show detail

  Tablespace Containers for Tablespace 3

 Container ID = 0
 Name = /data/db2instl/NODE0000/HBYD/T0000003/C0000000.LRG
 Type = File
 Total pages = 8192
 Useable pages = 8160
 Accessible = Yes


使用db2untag时,提示提示:

bash-3.00$ db2untag /data/db2instl/NODE0000/HBYDNEW1

db2untag: A service tool to remove the DB2 tag on a tablespace container.

The tag is used to prevent DB2 from reusing a container
in more than one tablespace.
If a tablespace/database is destroyed thru unnatural means,
then the tag can be left behind preventing future DB2 use of
the resource.

WARNING: This tool should only be used by informed sysadmins.

Using file </data/db2instl/NODE0000/HBYDNEW1>

ERROR: Could not open file, RC = 0x840f0008.

不知道是什么原因。哪位高人指点一下,不胜感激。
db2untag /data/db2instl/NODE0000/HBYD/T0000003/C0000000.LRG
这样呢 估计是你要恢复的数据库创建的表空间容器与你当前机器上存在的其它数据库使用的表空间容器冲突(有可能使用相同的目录)。

  • 上一篇文章:
  • 下一篇文章: 没有了
  • 赞助商链接
    推荐文章
  • 此栏目下没有推荐文章
  • {
    设为首页 | 加入收藏 | 友情链接 | 网站地图 | 联系站长 |