首页 > 数据库技术 > 详细

db2备份还原

时间:2017-10-17 21:14:32      阅读:274      评论:0      收藏:0      [点我收藏+]
还原步骤:创建好数据库后进入该数据库
1、restore db TSMESDB from D:\ICSS\dbData on D:\ICSS\dbData  into TSMESDB redirect2、list tablespaces 3set tablespace containers for 4 using (path “D:\DB2\NODE0000\TSMESDB\mycontainer") 4set tablespace containers for 5 using (path "D:\DB2\NODE0000\TSMESDB\mytemp") 5RESTORE db TSMESDB continue

语法: 

  restore db 数据库名 from 还原后存放的路径  (taken at 时间戳) on  还原文件路径  into 数据库名 redirect

  查看空间

  设置容器路径

  设置temp文件路径

  继续还原

如果是非管理员账号那么要重新给用户授权,否则不能做任何操作

如果windows没有启用administrator 需要启用 并设置密码 然后登陆到administrator用户下去给其他用户授权

adminitrator 启用如下图:

技术分享技术分享

登陆到administrator以后使用 打开db2cmd 给需要授权的用户授权

db2 => grant connect on database to user userCount  
DB20000I  The SQL command completed successfully.  
db2 => grant dbadm on database to user userCount  
DB20000I  The SQL command completed successfully.  
db2 => quit  

第一次还原db2数据,坑点:使用的是win10的网络用户,不是admin账户,导致没有db2admin权限

db2备份还原

原文:http://www.cnblogs.com/hellomylove/p/7683882.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!