使用重定向恢复克隆DB2数据库,抱语法错误
我利用重定向的方法来克隆一个新的数据库
原数据库备份放在 /home/db2inst1/db2backupx
执行
db2 restore db freshman from /home/db2inst1/db2backupx taken at 20070608223731 into test redirect
系统提示备份会覆盖目标数据,我选择Y,然后执行成功并给出了成功提示。
然后我执行
db2 set tablespace containers for 0 using (path '/home/db2inst1/tbs1')
声明,我已经建立了'/home/db2inst1/tbs1'目录。但是,系统提示
-bash:syntax error near unexpected token '('
因为我是照着网上描述的去做的,所以一直不清楚哪里有问题。知道的朋友请不吝指点,谢谢!