当前位置: 代码迷 >> DB2 >> 请问DB2 v9.5恢复有关问题
  详细解决方案

请问DB2 v9.5恢复有关问题

热度:5041   发布时间:2013-02-26 00:00:00.0
请教DB2 v9.5恢复问题
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
这样呢
------解决方案--------------------------------------------------------
估计是你要恢复的数据库创建的表空间容器与你当前机器上存在的其它数据库使用的表空间容器冲突(有可能使用相同的目录)。
  相关解决方案