DB2 database backup and Restoration

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

DB2 database backup restore db2 online backup command: www.2cto.com db2 connect to DBName user userName using passworddb2 update db cfg for DBName using logretain ondb2 force applications alldb2 backup db DBName online TODD: /db2bak can write the above four commands in a bat file. Each Command occupies one line and runs the bat file on the machine containing the DB2 database. If the DB2 version is 9, the backup file name is "DBName.0.DB2. node).catn2017.2013024251655.001 "If DB2 version is 8, the name of the backed up file is" 171655.001 ", this file is stored in the DB2 restoration command "DBName.0/db2/NODE0000/CATN0000/20130220/": db2 restore database DBName fromD: \ db2bak taken at 20130227143108 without rolling forward without prompting can write the command into a bat file to run and restore the command. Double quotation marks are added to the command, followed by "db2cmd ", that is, the db2cmd "db2 restore database DBName fromD: \ db2bak taken at 20130227143108 Out rolling forward without prompting "is written to a bat file. Run the bat file to restore it. If it is backed up by DB2 9, the path after from is written to the direct parent directory of the file. If it is backed up by DB2 8, the path after from is written to the direct parent directory of DBName.0.

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.