db2备份与还原


备份

db2stop force  
db2start  
db2 backup db dbname to /home/db2inst1/off_back 


还原
db2 restore db dbname from /home/db2inst1/on_back taken at 20070608



如果运行backup命令时报错

SQL1035N  The database is currently in use.  SQLSTATE=57019

可以输入db2 force application all,这样就停止了DB2

然后输入 db2start启动db2 重新做备份

你可能感兴趣的:(java,db2)