Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Db2 rollforward session

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Separate the AND. For example, to roll forward to the end of the log and then complete, you can use the following separate commands:

Db2 rollforward db sample to end of logs and complete although the two methods are equivalent, it is recommended that you do this in two steps. It is important to verify that the roll forward operation is progressing as expected before stopping the roll forward operation so as not to lose any logs.

If the roll forward command encounters an error, the roll forward operation cannot be completed. In this case, the error is returned so that you can correct the error and reissue the above command. However, if you cannot fix the error, you can force roll forward by issuing the following command:

Example 2 roll forward the database to the end of the log (two tablespaces have been restored):

In example 3, after recovering three tablespaces, roll forward one of them to the end of the log and the other two to a certain point in time. All operations need to be performed online:

Example 4 after restoring the database, roll forward to a certain point in time and use OVERFLOW LOG PATH to specify the directory in which the user exit is used to save the archived logs:

Example 5 in the following example, there is a database called sample. Back up the database, including the recovery log in the backup image, restore the database, and then roll forward the database to the end of the backup timestamp.

Back up the database and include the recovery log in the backup image:

Db2 restore db sample rolls forward the database to the end of the backup timestamp:

Example 6 (partitioned database environment) has three database partitions: 0, 1, and 2. Define tablespaces TBS1 on all database partitions and define tablespaces TBS2 on database partitions 0 and 2. After restoring the database on database partition 1 and TBS1 on database partition 0 and 2, roll forward the database on database partition 1:

Db2 rollforward db sample to end of logs this command rolls forward TBS1 on database partitions 0 and 2. In this case, the clause TABLESPACE (TBS1) is optional.

Db2 backup db sample on all nodes online include logs restores the database on all database partitions:

Db2 rollforward db sample to end of backup on all nodes db2_all "db2 backup db sample include logs to / shared/dir/" restores the database on all database partitions:

Db2 rollforward db sample to end of backup on all nodes db2 rollforward db sample to end of logs ignores database partition 1.

Db2 rollforward db sample to end of logs on dbpartitionnums (0,2) tablespace (TBS1) completed successfully.

Db2 rollforward db sample to 1998-04-03-14.21.56 and stop tablespace (TBS1) completed successfully.

AND STOP . The roll forward operation is still in progress. Cancel and roll forward to PIT1:

Example 11 (partitioned database environment) rollforward recovery db2 rollforward database dwtest to end of logs tablespace (tssprodt) rollforward recovery to the end of the log (not a point in time) completed successfully. It is not necessary to specify the database partition where the tablespace is located. The utility defaults to example 12 (partitioned database environment) roll forward to restore six small tablespaces on a single database partition database partition group (on database partition 6):

Example 13 (partitioned table-rolls forward to the end of the log on all data partitions) creates a partitioned table using table spaces tbsp1, tbsp2, and tbsp3, with indexes in tbsp0. Later, the user added data partitions to the tables in tbsp4 and joined the data partitions from the tables in tbsp5. You can roll forward all tablespaces to the end of the log.

Example 14 (partitioned table-rolls forward to the end of the log on a tablespace) initially creates a partitioned table using tablespaces tbsp1, tbsp2, and tbsp3, with indexes in tbsp0. Later, the user added data partitions to the tables in tbsp4 and joined the data partitions from the tables in tbsp5. The tablespace tbsp4 is corrupted and requires recovery and rollforward to the end of the log.

Example 15 (partitioned tables-rolls forward to a point in time on all data partitions, including those that have been added, connected, detached, or indexed) creates a partitioned table using table spaces tbsp1, tbsp2, and tbsp3, with indexes in tbsp0. Later, the user added data partitions to the tables in tbsp4, joined data partitions from tables in tbsp5, and detached data partitions from tbsp1. The user rolls forward to PIT on all tablespaces used by partitioned tables, including those specified in the INDEX IN clause.

Example 16 (partitioned tables-rolls forward to PIT on a small number of table spaces) creates a partitioned table using three table spaces (tbsp1, tbsp2, and tbsp3). Later, the user detached all data partitions from the tbsp3. Rolling forward to PIT is only allowed on tbsp1 and tbsp2.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report