hellomylove

db2备份还原

还原步骤:创建好数据库后进入该数据库
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权限

分类:

技术点:

相关文章:

  • 2021-12-06
  • 2021-12-06
  • 2021-10-07
  • 2021-12-06
  • 2021-05-27
  • 2021-07-14
  • 2021-04-16
  • 2021-12-25
猜你喜欢
  • 2021-12-06
  • 2021-12-06
  • 2022-01-26
  • 2021-12-06
  • 2021-12-06
  • 2021-12-06
  • 2021-07-31
相关资源
相似解决方案