DB2 V9 Automatic Maintenance, part 2nd: Enable automatic backup function

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

Enable automatic backup feature

The database may become unusable due to a large number of hardware or software failures. Automatic database backup reduces DBA database backup management tasks, and it always ensures that the database performs the most recent full backup when needed, and it is necessary to note that automatic backups are full, not incremental or differential.

We then enable automatic backup for the sample database Db2test1 created in Listing 1 of part 1th, in the DB2CLP window environment, connect to the sample database Db2test1, and modify the automatic database backup by issuing the UPDATE DB CFG command (auto_db_ba ckup) parameter, set its value to on, as shown in Listing 1:

Listing 1. Modify sample Database Db2test1 parameters

C:\> db2 connect to db2test1
  数据库连接信息
数据库服务器     = DB2 / NT 9.1.0
SQL 授权标识     = RHETTE
本地数据库别名    = DB2TEST1
C:\> db2 update db cfg using AUTO_DB_BACKUP on
DB20000I UPDATE DATABASE CONFIGURATION命令成功 完成。

Once the command was successfully executed, we looked at the configuration parameters of the sample database again and found that automatic database backup (auto_db_backup) had been modified to on, so we turned on the Automatic database backup feature (another important switch auto_maint in creating the database Has been turned on by default). Note that we are using the circular log at this time, the LOGARCHMETH1 parameter is off, see the details of the sample database parameters as shown in Listing 2:

Listing 2. To view the sample database Db2test1 parameters

c:\> DB2 get DB CFG for Db2test1
Database db2test1 Database Configuration
Database configuration Release level = 0x0b00
Database Release level = 0X0B00
Database domain = CN
Database code page = 1386
Database Code set = GBK
Database country/Region code = 86
Database Collation order = UNIQUE
Standby finishing Order (alt_collate) =
Database Page size = 4096
. . . . . . . . . . . . . . . . . . . .
First Log archive method (LOGARCHMETH1) = Off
Logarchmeth1 option (LOGARCHOPT1) =
Second Log archive method (LOGARCHMETH2) = Off
Logarchmeth2 option (LOGARCHOPT2) =
Failover Log Archive path (failarchpath) =
Retry Log Archive count when error (numarchretry) = 5
Log Archive Retry delay (sec) (archretrydelay) = 20
Vendor option (vendoropt) =
. . . . . . . . . . . . . . . . . . . .
Automatic maintenance (auto_maint) = On
Automatic database backup (auto_db_backup) = On
Automatic table maintenance (auto_tbl_maint) = On
Automatic Runstats (auto_runstats) = On
Automatic statistical information profiling (AUTO_STATS_PROF) = Off
Automatic profile update (AUTO_PROF_UPD) = Off
Automatic reorganization (auto_reorg) = Off

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.