Incomplete recovery using the Logminer tool in Oracle

Source: Internet
Author: User
Tags commit

Before we go through the incomplete recovery case walkthrough, we need to learn how to use the Logminer tool. The tool mainly digs the redo log to find out the DDL or DML operations made at a point in time (including: Point-in-time, DataBlock SCN, SQL statement)

1. Analysis of DML

Sql> select * from SCOTT.TB01;

Id

----------

1

2

3

3 Rows selected.

Sql> Delete from scott.tb01;

3 rows deleted.

Sql> commit;

Commit complete.

sql> INSERT into SCOTT.TB01 values (111);

1 row created.

sql> INSERT into SCOTT.TB01 values (222);

1 row created.

sql> INSERT into SCOTT.TB01 values (333);

1 row created.

Sql> commit;

Commit complete.

Sql> select * from SCOTT.TB01;

Id

----------

111

222

333

3 Rows selected.

(1) View the current log group

Sql> select * from V$log;

group# thread# sequence# BYTES members archived STATUS first_change#

---------- ---------- ---------- ---------- ---------- --------- ---------- ------------- -------------------

1 1 1 104857600 3 YES INACTIVE 846224 2012-03-22 15:46:28

4 1 0 104857600 3 YES unused 0

3 1 3 104857600 3 NO current 847894 2012-03-22 16:30:10

2 1 2 104857600 3 YES INACTIVE 846225 2012-03-22 15:47:06

Sql> alter system archive Log current;--archive the current log group

System altered.

Sql> select * from V$log;

group# thread# sequence# BYTES members archived STATUS first_change#

---------- ---------- ---------- ---------- ---------- --------- ---------- ------------- -------------------

1 1 5 104857600 3 NO current 849696 2012-03-22 17:36:01

4 1 4 104857600 3 YES ACTIVE 849665 2012-03-22 17:34:34

3 1 3 104857600 3 YES ACTIVE 847894 2012-03-22 16:30:10

2 1 2 104857600 3 YES INACTIVE 846225 2012-03-22 15:47:06

4 rows selected.

Above case 1***********************************

2. Enable LOGMNR

(1) Add Database supplemental log

17:13:47 sql> ALTER DATABASE add supplemental log data; --Error not added after

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.