DB2图形化备份与恢复
一、数据库备份
本备份方式重点是为了只生成一个备份文件,如果再产生日志类的东西我嫌麻烦,
重点是以下图相关选项的设置(离线完全备份,并采用压缩格式):
点击显示命令,使用的是以下的命令进行的备份:
CONNECT TO AAQA;QUIESCE DATABASE IMMEDIATE FORCE CONNECTIONS;CONNECT RESET;BACKUP DATABASE AAQA TO "C:\" WITH 2 BUFFERS BUFFER 1024 PARALLELISM 1 COMPRESS WITHOUT PROMPTING;CONNECT TO AAQA;UNQUIESCE DATABASE;CONNECT RESET;
备份结果:
二、数据库的恢复:
以管理员的身份运行db2cmd命令,执行以下的命令:
db2=>RESTORE DATABASE AAQA FROM "c:\" TAKEN AT 20130903170500 TO "d:" INTO AAQA comprlib "D:\Program Files\IBM\SQLLIB\BIN\db2compr.dll"
db2=>rollforward db aaqa complete