1、数据库备份命令
db2 connect to maxdb76 user db2admin using 密码
db2 connect to maxdb76 user db2admin using 密码
db2 backup db 数据库名
db2 backup db maxdb76
==在线备份==
DB2 backup db maxdb76 online to d:temp
==获取数据库环境信息==
db2 get db cfg for maxdb76
==恢复日志==
db2 rollforward db tony to end of logs and complete
db2 restore db MAXDB76 from d:\backup
db2 restore db MAXDB76 from d:\backup taken at 20211009183249
db2 restore db MAXDB76 taken at 20211009183249
db2 restore database MAXDB76 from d:\backup taken at 20211009183249 into MAXDB76
db2 rollforward db MAXDB76 to end of logs and complete
==创建db2数据库==
db2 create db MAXDB76 using codeset utf-8 territory CN
==连接数据库==
db2 connect to MAXDB76
grant dbadm on database to user Dbgly
db2 force application all
==db2注册==
db2licm -a D:\DB2\lic00000001.lic
db2licm -a D:\DB2\db2ese_t.lic