DB2 Database Backup

Source: Internet
Author: User
Tags db2

One, offline backup

DB2 List database directory-----See which databases you need to back up

DB2 Disconnect current-----Disconnect from the database, and if there are other services connected, you also need to disconnect

DB2 list application for DB dbname------View all connections

DB2 Force application All-----forcing all apps to disconnect from the database

DB2 Backup DB dbname directory-----Back up the database, a timestamp is returned when the backup succeeds

DB2 Restore DB dbname from backup file directory taken at time-----Recovery database

Second, offline backup

First open the database configuration parameters that support Online backup

DB2 Update DB CFG for dbname using UserExit on-----Enable user egress

DB2 Update DB CFG for dbname using Logretain on-----Enable archive logging

DB2 Update DB CFG for dbname using TRACKMOD on-----Enable incremental backup functionality

DB2 Backup DB dbname Online

Third, restart the database

DB2 list application for DB dbname-----See if there are active connections

Db2stop-----Stop Instance

Db2start-----Launch Instance

DB2 list Active Databases-----to see if there is an active database

DB2 Activate database dbname-----activating target databases

DB2 Database Backup

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.