DB2 database backup and Recovery _db2

Source: Internet
Author: User
Tags db2
The DB2 tutorial you are looking at is: DB2 database backup and recovery. Recently, I have restored a database. One of the hard to say, I want to write some of the statements I used, and encounter the same problems XDJM mutual encouragement.
First talk about DB2 database backup, I use the backup command.
DB2 Backup database name (my library is Jsdb)
I forgot to mention that you need to stop the database you want to back up before backup, I used the db2stop force (the reason why I use the force parameter is because it's so easy to stop lazy:) and Db2start. This ensures that backup will be successful.
After the backup completes, DB2 will tell you a timestamp, for example: 20040831 (after several) this will create a folder name in the current directory that is the same as your database name, for example: Jsdb. This folder directory hierarchy is important, if you are wrong, you will be prompted to not find the file on recovery.
After the backup is complete, I have restored, and I am using the restore command.
DB2 RESTORE Database name (JSDB) taken at timestamp (20040831)
To implement this statement to note two: 1, to the backup folder to the current directory (I used a CD C:\ command to set the current directory for C disk, the Jsdb folder into the C-packing directory); 2, the timestamp should be consistent with the JSDB directory.
In this way, the recovery database is complete.
<

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.