Example of DB2 Backup Recovery

Source: Internet
Author: User
The following CMDB is the name of the db2 database. This article has been verified by the test environment. 1. Online backup databases do not include archives: db2backupdbcmdbonlineto [path name] package

The following CMDB is the name of the db2 database. This article has been verified by the test environment. 1. online backup database does not include archive: db2 backup db cmdb online to [path name] package

Homepage → Database Technology

Background:

Read News

Example of DB2 Backup Recovery

[Date:] Source: Linux community Author: sunjiapeng [Font:]

The following CMDB is the name of the db2 database. This article has been verified by the test environment.

1. Online Database Backup

Archive not included:
Db2 backup db cmdb online to [path name]

Include archive:
Db2 backup db cmdb online to [path name] include logs

2. offline database backup

Db2 backup db cmdb to [path name]

3. Recovery from different databases (the backup source is offline backup)
Db2 "restore db cmdb from [path name] replace existing without rolling forward"
4. Recovery from different databases (the backup source is online backup)

Use on PATH redirect to relocate the tablespace PATH:
Db2 "restore db cmdb from [path name] on [path name] logtarget/tmp replace existing redirect"

View the tablespace and modify the tablespace and data files without redirection:
Db2pd-db cmdb-tablespace

Db2 "set tablespace containers for 3 using
(Path '/db2sys/db2inst1/NODE0000/CMDB/userspace2 ')"

Db2 "set tablespace containers for 5 using
(File '/db2sys/db2inst1/NODE0000/CMDB/CMSEXT001.LRG' 32736, File '/db2sys/db2inst1/NODE0000/CMDB/CMSEXT002.LRG' 32736 )"

Start recovery:
Db2 restore db cmdb continue


Restore archived logs:
Db2 "rollforward db cmdb to end of logs and stop overflow log path (/tmp/logs )"

  • 0
  • Sql00002c error occurs when DB2 data is restarted.

    Logminer log mining example

    DB2 DB2 backup

    Image Information

    View All comments in this article (0)

    Comments

    Latest Information

    Popular this week

    Introduction to Linux community-advertisement service-website map-help Info-contact us
    The articles published on this site (LinuxIDC) do not mean that they agree with the statement or description. They only provide more information and do not constitute any suggestions.


    Copyright©2006-2011 Linux community All rights reserved Zhejiang ICP backup No. 06018118

    ,

    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.