For DB2 "SQL2421N does not allow tablespace-level backup because rollback and recovery are not enabled ." When backing up the tablespace in DB2, if the error "SQL2421N does not allow tablespace-level backup because rollback and recovery are not enabled" is reported, the cause and solution are as follows: the command -------------------------------- backup database STUDENT tablespace (syscatspace, userspace1) online to f:/ibmsoft_backup; offline backup database STUDENT tablespace (syscatspace, userspace1) online to f: /ibmsoft_backupSQL2421N table space-level backup is not allowed, Because rollback and recovery are not enabled. SQL2421N does not allow tablespace-level backup because rollback and recovery are not enabled. The error occurs when the preceding error occurs because the current database uses the cyclic log command ------------------------------ the input command ---------------------------- Db2 connect to studentdb2 get db cfg failed. The result is displayed as "portable DISK: store archived logs to disks. TSM: store archived logs to the TSM server BAR APIs: DB2, a product provided by a third-party vendor, adds the following configuration parameters in version 8.2: the first log archiving method (LOGARCHMETH1) = F logarchmeth1 option (LOGARCHOPT1) = second log archiving method (LOGARCHMETH2) = OFF logarchmeth2 option (LOGARCHOPT2) = failover log archiving path (FAILARCHPATH) = number of retries (NUMARCHRETRY) = 5 (seconds) (ARCHRETRYDELAY) = 20 (VENDOROPT) = warn OFF) indicates that the log archiving method is not used. If both logarchmeth1 and logarchmeth2 are set to OFF, it is assumed that the database is using cyclic log records and cannot roll back and restore. This is the default value. From this we can see that the database is a circular log, you must first modify the database to archive logs -------------------------- after the command export Db2 update db cfg for student using LOGARCHMETH1 logretainDb2 update db cfg for student using userexit on login is executed, run the command ------------------------------ enter the command ---------------------------- Db2 connect to studentdb2 get db cfg -------- ---------------------------------------------------------------------- The result shows: Portable DISK: stores the archived logs to the DISK. TSM: stores the archived logs to the TSM server BAR APIs: the following configuration parameters are added to the product DB2 provided by a third-party vendor in version 8.2: The first log archiving method (LOGARCHMETH1) = LOGRETAIN logarchmeth1 option (LOGARCHOPT1) = second log archiving method (LOGARCHMETH2) = OFF logarchmeth2 option (LOGARCHOPT2) = failover log archiving path (FAILARCHPATH) = retry logs when an error occurs Number of archives (NUMARCHRETRY) = 5 log archive retry delay (seconds) (ARCHRETRYDELAY) = 20 supplier option (VENDOROPT) = begin and then perform a full offline Backup of the database -------------------------- enter the command Backup database studentOffline toF:/ibmsoft_backup when the above two steps are completed, then ------------------------ ------ Input command ------------------------------ backup database STUDENT tablespace (syscatspace, userspace1) online to f:/ibmsoft_backup; then the command is successful. Note: All commands run in cmd-> db2cmd. Ibmasoft_backup must be a folder in drive F.