修改成归档
db2 update db cfg for lddb using LOGARCHMETH1 "disk:/home/db2inst1/arch";
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
SQL1363W One or more of the parameters submitted for immediate modification
were not changed dynamically. For these configuration parameters, the database
must be shutdown and reactivated before the configuration parameter changes
become effective.
停止一次
[db2inst1@db2jh ~]$ db2 terminate
DB20000I The TERMINATE command completed successfully.
再登陆
[db2inst1@db2jh ~]$ db2 connect to lddb
Database Connection Information
Database server = DB2/LINUXX8664 10.5.6
SQL authorization ID = DB2INST1
Local database alias = LDDB
db2 backup db lddb to '/home/db2inst1';
SQL1035N The operation failed because the specified database cannot be
connected to in the mode requested. SQLSTATE=57019
登陆失败
[db2inst1@db2jh ~]$ db2 backup db lddb to '/home/db2inst1' online;
SQL0104N An unexpected token "online" was found following "
Expected tokens may include: "INCLUDE". SQLSTATE=42601