DB2异机导入备份数据

请教,我从其他DB2数据库中的备份整个库然后导入到现在测试库实例中。一直无法导入,我看到网上有论坛中提到要与之前备份数据库的文件路径一致,然后我创建了跟之前备份数据库中的一样的文件目录。依然不能导入DB2数据。[db2inst1@localhost ~]$ db2 restore database qydb fr...显示全部
请教,我从其他DB2数据库中的备份整个库然后导入到现在测试库实例中。一直无法导入,我看到网上有论坛中提到要与之前备份数据库的文件路径一致,然后我创建了跟之前备份数据库中的一样的文件目录。依然不能导入DB2数据。


[db2inst1@localhost ~]$ db2 restore database qydb from /home/db2backup/QYDB.0.db2inst1.DBPART000.20150727010015.001
SQL2036N  The path for the file, named pipe, or device
"/home/db2backup/QYDB.0.db2inst1.DBPART000.20150727010015.001" is not valid.收起
参与17

查看其它 12 个回答alan9668的回答

alan9668alan9668系统运维工程师alan
我是在esxi 环境的虚拟机上,我还原机器重装过多次依然无法导入数据进去。以下是操作步骤。
[root@localhost ~]# mkdir /home/db2backup
[root@localhost ~]# mv QYDB.0.db2inst1.DBPART000.20150121010008.001 /home/db2backup/
[root@localhost ~]# chown -R db2inst1:db2iadm1 /home/db2backup/
[root@localhost ~]# chmod 755 /home/db2backup/
[db2inst1@localhost ~]$ db2 restore db qydb from /home/db2backup/
SQL2523W  Warning!  Restoring to an existing database that is different from
the database on the backup image, but have matching names. The target database
will be overwritten by the backup version.  The Roll-forward recovery logs
associated with the target database will be deleted.
Do you want to continue ? (y/n) y
SQL1051N  The path "/db2data/qydb/data" does not exist or is not valid.  
SQLSTATE=57019
---------------------------------------------------------------------------------------------------------
[db2inst1@localhost ~]$
[db2inst1@localhost ~]$ db2 restore database qydb from /home/db2backup/QYDB.0.db2inst1.DBPART000.20150121010008.001
SQL2036N  The path for the file, named pipe, or device
"/home/db2backup/QYDB.0.db2inst1.DBPART000.20150121010008.001" is not valid.
[db2inst1@localhost ~]$

----------------------------------------------------------------------------------------------
[db2inst1@localhost ~]$ db2 restore db qydb from /home/db2backup/QYDB.0.db2inst1.DBPART000.20150121010008.001
SQL2036N  The path for the file, named pipe, or device
"/home/db2backup/QYDB.0.db2inst1.DBPART000.20150121010008.001" is not valid.
互联网服务 · 2015-07-28
浏览2855

回答者

alan9668
系统运维工程师alan
擅长领域: Linux服务器系统管理

alan9668 最近回答过的问题

回答状态

  • 发布时间:2015-07-28
  • 关注会员:1 人
  • 回答浏览:2855
  • X社区推广