本文主要是介绍db2 数据库备份与还原,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
备份还原
备份
- 终止连接并取消激活数据库。
db2 terminate
DB20000I The TERMINATE command completed successfully.db2 deactivate db cmsdb
SQL1495W Deactivate database is successful, however, there is still a
connection to the database.db2 list application
db2 force application all
DB20000I The FORCE APPLICATION command completed successfully.
DB21024I This command is asynchronous and may not be effective immediately.
- 创建完整脱机备份。整个数据库会复制到指定位置中的备份文件
db2 backup database cmsdb to /home/db2inst1/20200612
Backup successful. The timestamp for this backup image is : 20200612115026
- 验证是否正确创建了备份文件
这篇关于db2 数据库备份与还原的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!