一,环境简介
Oracle RMAN 备份的恢复分2个步骤:RESTRE 和 RECOVER。在这里回复的时候是依赖者归档文件的,当周一完成数据全备,保留归档的情况下,后期数据有问题,恢复的时候发现少了一个归档文件,理论上我们只能恢复到确实归档之前。如果我们跳过这个归档的话,让数据库继续恢复,但是数据会有所丢失
测试:
创建测试表并且刷写归档
SQL> select sequence# from v$log where thread#=1; SEQUENCE# ---------- 2464 2465 2463 2462 SQL> create table kingle as select * from dba_users; Table created. SQL> alter system switch logfile; System altered. SQL> select sequence# from v$log where thread#=1; SEQUENCE# ---------- 2464 2465 2463 2466 SQL> create table kingle2 as select * from dba_users; Table created. SQL> alter system switch logfile; System altered. SQL> select sequence#,status from v$log where thread#=1; SEQUENCE# STATUS ---------- ---------------- 2464 INACTIVE 2465 ACTIVE 2467 CURRENT 2466 ACTIVE
删除归档文件
[root@oracle01 ~]# ll /u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/ |grep 2464 -rw-r----- 1 oracle oinstall 1827840 May 14 15:33 1_2464_1000748999.dbf [root@oracle01 ~]# mv 1_2464_1000748999.dbf 1_2464_1000748999.dbf mv: cannot stat ‘1_2464_1000748999.dbf’: No such file or directory [root@oracle01 ~]# mv 1_2464_1000748999.dbf 1_2464_1000748999.dbf.bak mv: cannot stat ‘1_2464_1000748999.dbf’: No such file or directory [root@oracle01 ~]# mv /u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_2464_1000748999.dbf 1_2464_1000748999.dbf.bak --我这里移动是以防万一
二,恢复
关闭数据库启动到mount
SQL> shut immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> startup mount ORACLE instance started. Total System Global Area 2505338880 bytes Fixed Size 2255832 bytes Variable Size 939525160 bytes Database Buffers 1543503872 bytes Redo Buffers 20054016 bytes Database mounted. SQL>
数据恢复:
---这里没有---
恢复归档日志:
restore archivelog all;
archived log for thread 1 with sequence 2482 is already on disk as file /u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/
1_2482_1000748999.dbf RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of restore command at 05/14/2019 17:42:05 RMAN-06026: some targets not found - aborting restore RMAN-06025: no backup of archived log for thread 1 with sequence 1638 and starting SCN of 8860802 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1637 and starting SCN of 8857121 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1636 and starting SCN of 8853638 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1635 and starting SCN of 8852770 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1634 and starting SCN of 8848176 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1633 and starting SCN of 8844605 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1632 and starting SCN of 8841053 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1631 and starting SCN of 8837508 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1630 and starting SCN of 8833967 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1629 and starting SCN of 8830533 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1628 and starting SCN of 8826861 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1627 and starting SCN of 8823448 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1626 and starting SCN of 8818727 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1625 and starting SCN of 8815164 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1624 and starting SCN of 8811588 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1623 and starting SCN of 8808053 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1622 and starting SCN of 8804420 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1621 and starting SCN of 8801002 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1620 and starting SCN of 8797288 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1619 and starting SCN of 8793729 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1618 and starting SCN of 8789156 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1617 and starting SCN of 8785730 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1616 and starting SCN of 8782010 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1615 and starting SCN of 8778445 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1614 and starting SCN of 8774880 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1613 and starting SCN of 8771255 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1612 and starting SCN of 8767665 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1611 and starting SCN of 8764066 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1610 and starting SCN of 8759280 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1609 and starting SCN of 8755853 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1608 and starting SCN of 8752090 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1607 and starting SCN of 8748450 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1606 and starting SCN of 8744912 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1605 and starting SCN of 8741505 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1604 and starting SCN of 8737866 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1603 and starting SCN of 8734342 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1602 and starting SCN of 8727101 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1601 and starting SCN of 8723685 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1600 and starting SCN of 8719993 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1599 and starting SCN of 8716462 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1598 and starting SCN of 8712913 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1597 and starting SCN of 8709312 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1596 and starting SCN of 8705771 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1595 and starting SCN of 8702310 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1594 and starting SCN of 8698463 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1593 and starting SCN of 8695035 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1592 and starting SCN of 8691317 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1591 and starting SCN of 8687901 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1590 and starting SCN of 8684037 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1589 and starting SCN of 8680454 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1588 and starting SCN of 8676467 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1587 and starting SCN of 8672496 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1586 and starting SCN of 8672329 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1585 and starting SCN of 8670609 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1584 and starting SCN of 8663248 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1583 and starting SCN of 8659638 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1582 and starting SCN of 8656175 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1581 and starting SCN of 8652608 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1580 and starting SCN of 8649126 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1579 and starting SCN of 8645516 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1578 and starting SCN of 8642051 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1577 and starting SCN of 8638482 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1576 and starting SCN of 8634933 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1575 and starting SCN of 8631289 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1574 and starting SCN of 8627884 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1573 and starting SCN of 8624237 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1572 and starting SCN of 8620795 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1571 and starting SCN of 8617215 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1570 and starting SCN of 8613655 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1569 and starting SCN of 8610024 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1568 and starting SCN of 8606577 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1567 and starting SCN of 8602959 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1566 and starting SCN of 8599490 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1565 and starting SCN of 8595867 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1564 and starting SCN of 8592429 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1563 and starting SCN of 8588872 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1562 and starting SCN of 8585371 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1561 and starting SCN of 8581695 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1560 and starting SCN of 8578189 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1559 and starting SCN of 8574531 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1558 and starting SCN of 8571069 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1557 and starting SCN of 8567558 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1556 and starting SCN of 8564028 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1555 and starting SCN of 8560411 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1554 and starting SCN of 8556974 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1553 and starting SCN of 8553311 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1552 and starting SCN of 8549871 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1551 and starting SCN of 8546328 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1550 and starting SCN of 8542795 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1549 and starting SCN of 8539288 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1548 and starting SCN of 8535727 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1547 and starting SCN of 8532002 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1546 and starting SCN of 8528543 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1545 and starting SCN of 8524811 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1544 and starting SCN of 8521305 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1543 and starting SCN of 8517634 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1542 and starting SCN of 8514101 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1541 and starting SCN of 8510378 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1540 and starting SCN of 8506855 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1539 and starting SCN of 8503155 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1538 and starting SCN of 8499699 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1537 and starting SCN of 8495910 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1536 and starting SCN of 8489725 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1535 and starting SCN of 8486214 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1534 and starting SCN of 8482682 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1533 and starting SCN of 8479131 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1532 and starting SCN of 8475595 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1531 and starting SCN of 8472101 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1530 and starting SCN of 8468556 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1529 and starting SCN of 8465028 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1528 and starting SCN of 8461480 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1527 and starting SCN of 8457956 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1526 and starting SCN of 8454400 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1525 and starting SCN of 8450973 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1524 and starting SCN of 8447276 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1523 and starting SCN of 8443867 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1522 and starting SCN of 8440183 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1521 and starting SCN of 8436770 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1520 and starting SCN of 8433111 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1519 and starting SCN of 8429683 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1518 and starting SCN of 8426012 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1517 and starting SCN of 8422599 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1516 and starting SCN of 8418953 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1515 and starting SCN of 8415528 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1514 and starting SCN of 8411857 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1513 and starting SCN of 8408444 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1512 and starting SCN of 8404701 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1511 and starting SCN of 8401286 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1510 and starting SCN of 8397589 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1509 and starting SCN of 8394043 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1508 and starting SCN of 8391803 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1507 and starting SCN of 8388323 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1506 and starting SCN of 8384799 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1505 and starting SCN of 8381271 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1504 and starting SCN of 8377627 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1503 and starting SCN of 8374122 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1502 and starting SCN of 8370552 found to restore RMAN-06025: no backup of archived log for thread 1 with sequence 1501 and starting SCN of 8367094 found to restore RMAN-00567: Recovery Manager could not print some error messages RMAN>
发现这个归档也不知道怎么没得,我认真的删除一直存在,但是呢如果这个不搞定,后面没办法恢复。
SQL> select checkpoint_change# from v$database; - System Checkpoint SCN: CHECKPOINT_CHANGE# ------------------ 11852434 SQL> select name,checkpoint_change# from v$datafile; --- Datafile CheckpointSCN: NAME -------------------------------------------------------------------------------- CHECKPOINT_CHANGE# ------------------ /u01/app/oracle/oradata/oracle01/system01.dbf 11852434 /u01/app/oracle/oradata/oracle01/sysaux01.dbf 11852434 /u01/app/oracle/oradata/oracle01/undotbs01.dbf 11852434 NAME -------------------------------------------------------------------------------- CHECKPOINT_CHANGE# ------------------ /u01/app/oracle/oradata/oracle01/users01.dbf 11852434 /u01/app/oracle/oradata/oracle01/example01.dbf 11852434 /u01/app/oracle/oradata/oracle01/test101.dbf 11852434 NAME -------------------------------------------------------------------------------- CHECKPOINT_CHANGE# ------------------ /u01/app/oracle/oradata/oracle01/undo2.dbf 11852434 /u01/app/oracle/oradata/oracle01/demo01.dbf 11852434 8 rows selected. SQL> select name,checkpoint_change# from v$datafile_header; ---START SCN: NAME -------------------------------------------------------------------------------- CHECKPOINT_CHANGE# ------------------ /u01/app/oracle/oradata/oracle01/system01.dbf 11850434 /u01/app/oracle/oradata/oracle01/sysaux01.dbf 11850432 /u01/app/oracle/oradata/oracle01/undotbs01.dbf 11850434 NAME -------------------------------------------------------------------------------- CHECKPOINT_CHANGE# ------------------ /u01/app/oracle/oradata/oracle01/users01.dbf 11850432 /u01/app/oracle/oradata/oracle01/example01.dbf 11850434 /u01/app/oracle/oradata/oracle01/test101.dbf 11850434 NAME -------------------------------------------------------------------------------- CHECKPOINT_CHANGE# ------------------ /u01/app/oracle/oradata/oracle01/undo2.dbf 11850432 /u01/app/oracle/oradata/oracle01/demo01.dbf 11850432 8 rows selected.
+++++SCN号与数据库启动:
在数据库启动过程中,当SystemCheckpoint SCN、Datafile Checkpoint SCN和Start SCN号都相同时,数据库可以正常启动,
不需要做mediarecovery.三者当中有一个不同时,则需要做media recovery。如果在启动的过程中,EndSCN号为NULL,
则需要做instance recovery。ORACLE在启动过程中首先检查是否需要media recovery,然后再检查是否需要instance recovery。
在进行recovery的时候,我们根据归档,推进START SCN,但是归档缺失,导致无法推荐,数据库也无法启动。
我们这里缺失的是153的归档,我们只需要手工的修改datafile header,让数据库认为这个归档已经恢复了,即可。 这是一种欺骗行为,
虽然可以继续,但还是会出现问题。可以使用如下方法确定具体缺失的归档SCN,然后使用BBED 跳过这些SCN 即可。 SQL> select sequence#,first_change#,next_change# from v$archived_log; SEQUENCE# FIRST_CHANGE# NEXT_CHANGE# ---------- ------------- ------------
1501 8367094 8370552 1501 8367094 8370552 1502 8370552 8374122 1502 8370552 8374122 SEQUENCE# FIRST_CHANGE# NEXT_CHANGE# ---------- ------------- ------------ 1503 8374122 8377627 1503 8374122 8377627 1504 8377627 8381271 1504 8377627 8381271 1505 8381271 8384799 1505 8381271 8384799 1506 8384799 8388323 1506 8384799 8388323 1507 8388323 8391803 1507 8388323 8391803 1508 8391803 8394043 SEQUENCE# FIRST_CHANGE# NEXT_CHANGE# ---------- ------------- ------------ 1508 8391803 8394043 1509 8394043 8397589 1509 8394043 8397589 1510 8397589 8401286 1510 8397589 8401286 1511 8401286 8404701 1511 8401286 8404701 1512 8404701 8408444 1512 8404701 8408444 1513 8408444 8411857 1513 8408444 8411857 SEQUENCE# FIRST_CHANGE# NEXT_CHANGE# ---------- ------------- ------------ 1514 8411857 8415528 1514 8411857 8415528 1515 8415528 8418953 1515 8415528 8418953 1516 8418953 8422599 1516 8418953 8422599 1517 8422599 8426012 1517 8422599 8426012 1518 8426012 8429683 1518 8426012 8429683 1519 8429683 8433111 SEQUENCE# FIRST_CHANGE# NEXT_CHANGE# ---------- ------------- ------------ 1519 8429683 8433111 1520 8433111 8436770 1520 8433111 8436770 1521 8436770 8440183 1521 8436770 8440183 1522 8440183 8443867 1522 8440183 8443867 1523 8443867 8447276 1523 8443867 8447276 1524 8447276 8450973 1524 8447276 8450973 SEQUENCE# FIRST_CHANGE# NEXT_CHANGE# ---------- ------------- ------------ 1525 8450973 8454400 1525 8450973 8454400 1526 8454400 8457956 1526 8454400 8457956 1527 8457956 8461480 1527 8457956 8461480 1528 8461480 8465028 1528 8461480 8465028 1529 8465028 8468556 1529 8465028 8468556 1530 8468556 8472101 SEQUENCE# FIRST_CHANGE# NEXT_CHANGE# ---------- ------------- ------------ 1530 8468556 8472101 1531 8472101 8475595 1531 8472101 8475595 1532 8475595 8479131 1532 8475595 8479131 1533 8479131 8482682 1533 8479131 8482682 1534 8482682 8486214 1534 8482682 8486214 1535 8486214 8489725 1535 8486214 8489725 SEQUENCE# FIRST_CHANGE# NEXT_CHANGE# ---------- ------------- ------------ 1536 8489725 8495910 1536 8489725 8495910 1537 8495910 8499699 1537 8495910 8499699 1538 8499699 8503155 1538 8499699 8503155 1539 8503155 8506855 1539 8503155 8506855 1540 8506855 8510378 1540 8506855 8510378 1541 8510378 8514101 SEQUENCE# FIRST_CHANGE# NEXT_CHANGE# ---------- ------------- ------------ 1541 8510378 8514101 1542 8514101 8517634 1542 8514101 8517634 1543 8517634 8521305 1543 8517634 8521305 1544 8521305 8524811 1544 8521305 8524811 1545 8524811 8528543 1545 8524811 8528543 1546 8528543 8532002 1546 8528543 8532002 SEQUENCE# FIRST_CHANGE# NEXT_CHANGE# ---------- ------------- ------------ 1547 8532002 8535727 1547 8532002 8535727 1548 8535727 8539288 1548 8535727 8539288 1549 8539288 8542795 1549 8539288 8542795 1550 8542795 8546328 1550 8542795 8546328 1551 8546328 8549871 1551 8546328 8549871 1552 8549871 8553311 SEQUENCE# FIRST_CHANGE# NEXT_CHANGE# ---------- ------------- ------------ 1552 8549871 8553311 1553 8553311 8556974 1553 8553311 8556974 1554 8556974 8560411 1554 8556974 8560411 1555 8560411 8564028 1555 8560411 8564028 1556 8564028 8567558 1556 8564028 8567558 1557 8567558 8571069 1557 8567558 8571069 SEQUENCE# FIRST_CHANGE# NEXT_CHANGE# ---------- ------------- ------------ 1558 8571069 8574531 1558 8571069 8574531 1559 8574531 8578189 1559 8574531 8578189 1560 8578189 8581695 1560 8578189 8581695 1561 8581695 8585371 1561 8581695 8585371 1562 8585371 8588872 1562 8585371 8588872 1563 8588872 8592429 SEQUENCE# FIRST_CHANGE# NEXT_CHANGE# ---------- ------------- ------------ 1563 8588872 8592429 1564 8592429 8595867 1564 8592429 8595867 1565 8595867 8599490 1565 8595867 8599490 1566 8599490 8602959 1566 8599490 8602959 1567 8602959 8606577 1567 8602959 8606577 1568 8606577 8610024 1568 8606577 8610024 SEQUENCE# FIRST_CHANGE# NEXT_CHANGE# ---------- ------------- ------------ 1569 8610024 8613655 1569 8610024 8613655 1570 8613655 8617215 1570 8613655 8617215 1571 8617215 8620795 1571 8617215 8620795 1572 8620795 8624237 1572 8620795 8624237 1573 8624237 8627884 1573 8624237 8627884 1574 8627884 8631289 SEQUENCE# FIRST_CHANGE# NEXT_CHANGE# ---------- ------------- ------------ 1574 8627884 8631289 1575 8631289 8634933 1575 8631289 8634933 1576 8634933 8638482 1576 8634933 8638482 1577 8638482 8642051 1577 8638482 8642051 1578 8642051 8645516 1578 8642051 8645516 1579 8645516 8649126 1579 8645516 8649126 SEQUENCE# FIRST_CHANGE# NEXT_CHANGE# ---------- ------------- ------------ 1580 8649126 8652608 1580 8649126 8652608 1581 8652608 8656175 1581 8652608 8656175 1582 8656175 8659638 1582 8656175 8659638 1583 8659638 8663248 1583 8659638 8663248 1584 8663248 8670609 1584 8663248 8670609 1585 8670609 8672329 SEQUENCE# FIRST_CHANGE# NEXT_CHANGE# ---------- ------------- ------------ 1585 8670609 8672329 1586 8672329 8672496 1586 8672329 8672496 1587 8672496 8676467 1587 8672496 8676467 1588 8676467 8680454 1588 8676467 8680454 1589 8680454 8684037 1589 8680454 8684037 1590 8684037 8687901 1590 8684037 8687901 SEQUENCE# FIRST_CHANGE# NEXT_CHANGE# ---------- ------------- ------------ 1591 8687901 8691317 1591 8687901 8691317 1592 8691317 8695035 1592 8691317 8695035 1593 8695035 8698463 1593 8695035 8698463 1594 8698463 8702310 1594 8698463 8702310 1595 8702310 8705771 1595 8702310 8705771 1596 8705771 8709312 SEQUENCE# FIRST_CHANGE# NEXT_CHANGE# ---------- ------------- ------------ 1596 8705771 8709312 1597 8709312 8712913 1597 8709312 8712913 1598 8712913 8716462 1598 8712913 8716462 1599 8716462 8719993 1599 8716462 8719993 1600 8719993 8723685 1600 8719993 8723685 1601 8723685 8727101 1601 8723685 8727101 SEQUENCE# FIRST_CHANGE# NEXT_CHANGE# ---------- ------------- ------------ 1602 8727101 8734342 1602 8727101 8734342 1603 8734342 8737866 1603 8734342 8737866 1604 8737866 8741505 1604 8737866 8741505 1605 8741505 8744912 1605 8741505 8744912 1606 8744912 8748450 1606 8744912 8748450 1607 8748450 8752090 SEQUENCE# FIRST_CHANGE# NEXT_CHANGE# ---------- ------------- ------------ 1607 8748450 8752090 1608 8752090 8755853 1608 8752090 8755853 1609 8755853 8759280 1609 8755853 8759280 1610 8759280 8764066 1610 8759280 8764066 1611 8764066 8767665 1611 8764066 8767665 1612 8767665 8771255 1612 8767665 8771255 SEQUENCE# FIRST_CHANGE# NEXT_CHANGE# ---------- ------------- ------------ 1613 8771255 8774880 1613 8771255 8774880 1614 8774880 8778445 1614 8774880 8778445 1615 8778445 8782010 1615 8778445 8782010 1616 8782010 8785730 1616 8782010 8785730 1617 8785730 8789156 1617 8785730 8789156 1618 8789156 8793729 SEQUENCE# FIRST_CHANGE# NEXT_CHANGE# ---------- ------------- ------------ 1618 8789156 8793729 1619 8793729 8797288 1619 8793729 8797288 1620 8797288 8801002 1620 8797288 8801002 1621 8801002 8804420 1621 8801002 8804420 1622 8804420 8808053 1622 8804420 8808053 1623 8808053 8811588 1623 8808053 8811588 SEQUENCE# FIRST_CHANGE# NEXT_CHANGE# ---------- ------------- ------------ 1624 8811588 8815164 1624 8811588 8815164 1625 8815164 8818727 1625 8815164 8818727 1626 8818727 8823448 1626 8818727 8823448 1627 8823448 8826861 1627 8823448 8826861 1628 8826861 8830533 1628 8826861 8830533 1629 8830533 8833967 SEQUENCE# FIRST_CHANGE# NEXT_CHANGE# ---------- ------------- ------------ 1629 8830533 8833967 1630 8833967 8837508 1630 8833967 8837508 1631 8837508 8841053 1631 8837508 8841053 1632 8841053 8844605 1632 8841053 8844605 1633 8844605 8848176 1633 8844605 8848176 1634 8848176 8852770 1634 8848176 8852770 SEQUENCE# FIRST_CHANGE# NEXT_CHANGE# ---------- ------------- ------------ 1635 8852770 8853638 1635 8852770 8853638 1636 8853638 8857121 1636 8853638 8857121 1637 8857121 8860802 1637 8857121 8860802 1638 8860802 8864218 1638 8860802 8864218 1639 8864218 8868033 1639 8864218 8868033 1640 8868033 8871448 SEQUENCE# FIRST_CHANGE# NEXT_CHANGE# ---------- ------------- ------------ 1640 8868033 8871448 1641 8871448 8875025 1641 8871448 8875025 1642 8875025 8878593 1642 8875025 8878593 1643 8878593 8882186 1643 8878593 8882186 1644 8882186 8885736 1644 8882186 8885736 1645 8885736 8889299
SQL> select to_char('8864218','xxxxxxxxx') from dual; TO_CHAR('8 ---------- 8741da SQL> select to_char('8367094','xxxxxxxxx') from dual; TO_CHAR('8 ---------- 7fabf6
因此我们的kscnbas 的新值是:0x008741da。
但是注意,对于little-endian的format,他存储是先存储低位的,因此实际block 存储的是:da417800.
我们需要使用BBED 将所有datafileheader 的@484 的值修改成:da417800。
https://blog.csdn.net/tianlesoftware/article/details/12900185