查看db2数据库名linux,【名说】DB2数据库备份与恢复(linux环境)
lslinux 下備份db2數(shù)據(jù)庫
1.SSH方式:登錄db2數(shù)據(jù)庫(因?yàn)槭莑inux環(huán)境 , putty就不錯)
2.進(jìn)入備份文件夾:
cd /home/backup/
db2 list application | grep 數(shù)據(jù)庫名
//(可能會有一些連接進(jìn)程,有則全部殺掉)
//殺進(jìn)程:db2 "force application(端口號1,端口號2) "
//開始備份
db2 backup db 數(shù)據(jù)庫名
//等待備份完成就行,完成會彈出:
Backup successful. The timestamp for this backup image is : 20181218225714
Backup successful. The timestamp for this backup image is : 20181220185850
3.恢復(fù)備份
db2 restore db 數(shù)據(jù)庫名 taken at 20181218225714
4.擴(kuò)充
db2stop force //停止數(shù)據(jù)庫
db2start //啟動數(shù)據(jù)庫
– 在線恢復(fù)數(shù)據(jù)庫
db2 restore db YIRPT into YI_B logtarget /home/backup/ireport
db2 “rollforward db YI_B to end of logs and stop overflow log path(/home/backup/ireport)”
總結(jié)
以上是生活随笔為你收集整理的查看db2数据库名linux,【名说】DB2数据库备份与恢复(linux环境)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 计算机网络安全应具备的功能,2016计算
- 下一篇: 软件生成问候图片_这些社交软件你玩过几个