现在的位置: 首页 > 综合 > 正文

DB2 恢复与备份捣鼓篇

2014年09月15日 ⁄ 综合 ⁄ 共 595字 ⁄ 字号 评论关闭

db2 

db2在出现dead lock的时候  会用到force application all 

force application all,断开所有连接到这个库的连接, 然后那些连接再继续连这个库,还是可以连的

force完了后   照样可以连接 
不需要重启 
直接连接  只要数据库没有被停止

list application show detail  你可以看到当前所有连接的信息 

db2 list applications
查看连接数

恢复数据库:
db2 restore  database etl from /home/odsuser/backup/ taken at 20140319095439 to /home/odsuser/ERDDDATA/DATABASE into test01

db2 create database test01 automatic storage yes  using codeset UTF-8 territory cn pagesize 32768

db2 restore  database etl from /home/odsuser/backup/ taken at 20140319095439 into test01
重定向恢复
db2 restore db etl from /home/odsuser/backup/ taken at 20140319095439 into test01 redirect generate script redirect_etl.sql 

抱歉!评论已关闭.