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

Oracle insignificant RMAN-06054

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

RMAN> backup incremental level=0 database format '/home/oracle/rman/%U';

SYS@prod>create table test as select * from dba_objects;

Table created.

SYS@prod>insert into test select * from test;

86959 rows created.

SYS@prod>/

173918 rows created.

SYS@prod>/

347836 rows created.

SYS@prod>insert into test select * from test;

695672 rows created.

SYS@prod>commit;

Commit complete

SYS@prod>select count(*) from test;

COUNT(*)

----------

1391344

SYS@prod>select group#,status from v$log;

GROUP# STATUS

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

1 ACTIVE

2 ACTIVE

3 CURRENT

View current control file header and data file header SCN number:

SYS@prod>select checkpoint_change# from v$datafile;

CHECKPOINT_CHANGE#

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

1198910

1198910

1198910

1198910

1198910

SYS@prod>select checkpoint_change# from v$datafile_header;

CHECKPOINT_CHANGE#

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

1198984

1198984

1198984

1198984

1198984

Make an incremental backup:

RMAN> backup incremental level=1 database format '/home/oracle/rman/%U';

Then check SCN again:

SYS@prod>select checkpoint_change# from v$datafile;

CHECKPOINT_CHANGE#

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

1199201

1199201

1199201

1199201

1199201

SYS@prod>select checkpoint_change# from v$datafile;

CHECKPOINT_CHANGE#

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

1199201

1199201

1199201

1199201

1199201

SYS@prod>select group#,status from v$log;

GROUP# STATUS

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

1 INACTIVE

2 INACTIVE

3 CURRENT

It can be seen that SCN number is refreshed synchronously, log group status changes, RMAN backup is the same as hot backup, and a complete checkpoint will be made before backup to refresh dirty blocks back to data files.

Delete all files for recovery:

[oracle@service1 prod]$ ls

control01.ctl redo01.log redo03.log system01.dbf undotbs01.dbf

example01.dbf redo02.log sysaux01.dbf temp01.dbf users01.dbf

[oracle@service1 prod]$ rm -rf *

[oracle@service1 ~]$ sqlplus / as sysdba

SYS@prod>shutdown abort;

SYS@prod>startup nomount;

[oracle@service1 ~]$ rman target /

RMAN> restore controlfile from '/home/oracle/rman/1mv1thi1_1_1';

RMAN> sql ' alter database mount';

RMAN> restore database;

RMAN> recover database

Starting recover at 04-JUN-20

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=125 device type=DISK

channel ORA_DISK_1: starting incremental datafile backup set restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

destination for restore of datafile 00001: /u01/app/oracle/oradata/prod/system01.dbf

destination for restore of datafile 00002: /u01/app/oracle/oradata/prod/sysaux01.dbf

destination for restore of datafile 00003: /u01/app/oracle/oradata/prod/undotbs01.dbf

destination for restore of datafile 00004: /u01/app/oracle/oradata/prod/users01.dbf

destination for restore of datafile 00005: /u01/app/oracle/oradata/prod/example01.dbf

channel ORA_DISK_1: reading from backup piece /home/oracle/rman/1lv1thgk_1_1

channel ORA_DISK_1: piece handle=/home/oracle/rman/1lv1thgk_1_1 tag=TAG20200604T130939

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:07

starting media recovery

unable to find archived log

archived log thread=1 sequence=6

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of recover command at 06/04/2020 13:17:35

RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 6 and starting SCN of 1199201

What is the cause of this error:

(redo log is unavailable, control file cannot find redo log as end, so it will keep reading archive until it cannot be found, irrelevant error, you can check SCN to determine whether it is consistent)

If redo logs are available during an RMAN recovery, then RMAN can locate them and apply them. If redo logs are not available, the until clause is required to specify the target time for repair, SCN or log sequence number, which is before the first SCN of the online redo log, or an RMAN-6054 error occurs.

If the last archive log created has sequence number n, then specifying until sequence n+1 for recovery does not cause errors.

Solution:

Run{

Restore database

Set until sequence 6

Recover database

}

SYS@prod>select checkpoint_change# from v$datafile;

CHECKPOINT_CHANGE#

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

1199201

1199201

1199201

1199201

1199201

SYS@prod>select checkpoint_change# from v$datafile_header;

CHECKPOINT_CHANGE#

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

1199201

1199201

1199201

1199201

1199201

SYS@prod>alter database open resetlogs;

Database altered.

SYS@prod>select count(*) from test;

COUNT(*)

----------

1391344

No data loss.

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