For DB2 "SQL2421N does not allow tablespace-level backup because rollback and recovery are not enabled ." Solution

Source: Internet
Author: User
Tags db2 connect db2 connect to

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.