Simulation of nologging problems caused by a rman recovery
Test environment:
Oracle 11.2.0.4
SLES 11SP4
The conclusions are as follows:
No force logging,table nologging, dml nologging, ora-26040 appears
No force logging,table logging, dml nologging, no ora-26040
Force logging, table nologging/logging dml nologging, no ora-26040
Force logging, table nologging dml logging, no ora-26040
Force logging, table nologging dml nologging, no ora-26040
Only in the case of no force logging, table nologging and dml nologging, ora-26040 will appear in recover data, and all other conditions are normal.
The test process is as follows:
SQL > create table gyc01 as select * from dba_users
Table created.
SQL > insert into gyc01 select * from gyc01
30 rows created.
SQL > /
60 rows created.
SQL > commit
Commit complete.
SQL > select table_name,logging from dba_tables where table_name='GYC01'
TABLE_NAME LOG
-
GYC01 YES
SQL > alter table gyc01 nologging
Table altered.
SQL > select table_name,logging from dba_tables where table_name='GYC01'
TABLE_NAME LOG
-
GYC01 NO
SQL > select count (*) from gyc01
COUNT (*)
-
one hundred and twenty
SQL > alter system switch logfile
System altered.
SQL > /
System altered.
SQL > /
System altered.
SQL > create table gyc02 nologging as select * from gyc01 nologging
Table created.
SQL > select count (*) from gyc02
COUNT (*)
-
one hundred and twenty
SQL > insert into gyc02 select * from gyc01 nologging
120 rows created.
SQL > commit
Commit complete.
SQL > alter system switch logfile
System altered.
SQL > /
System altered.
SQL > /
/
System altered.
SQL >
System altered.
SQL > shutdown medium ^ Cs
SQL >
SQL > select name from v$datafile
NAME
/ app/oracle/product/10.2.0/oradata/gycdb/system01.dbf
/ app/oracle/product/10.2.0/oradata/gycdb/sysaux01.dbf
/ app/oracle/product/10.2.0/oradata/gycdb/undotbs01.dbf
/ app/oracle/product/10.2.0/oradata/gycdb/users01.dbf
SQL > shutdown immediate
; Database closed.
Database dismounted.
ORACLE instance shut down.
SQL > startup mount
SP2-0734: unknown command beginning "; startup m..."-rest of line ignored.
SQL >
SQL >
SQL > startup
^ C
ORA-00443: background process "VKTM" did not start
SQL > shutdown immediate
ORA-01012: not logged on
SQL > conn / as sysdba
Connected to an idle instance.
SQL > startup mount
ORACLE instance started.
Total System Global Area 2137886720 bytes
Fixed Size 2230072 bytes
Variable Size 503318728 bytes
Database Buffers 1627389952 bytes
Redo Buffers 4947968 bytes
RMAN > recover database
Starting recover at 07-MAY-18
Using channel ORA_DISK_1
Starting media recovery
Archived log for thread 1 with sequence 4 is already on disk as file / arch/1_4_975518966.dbf
Archived log for thread 1 with sequence 5 is already on disk as file / arch/1_5_975518966.dbf
Archived log for thread 1 with sequence 6 is already on disk as file / arch/1_6_975518966.dbf
Archived log for thread 1 with sequence 7 is already on disk as file / arch/1_7_975518966.dbf
Archived log for thread 1 with sequence 8 is already on disk as file / arch/1_8_975518966.dbf
Archived log for thread 1 with sequence 9 is already on disk as file / arch/1_9_975518966.dbf
Archived log for thread 1 with sequence 10 is already on disk as file / arch/1_10_975518966.dbf
Archived log file name=/arch/1_4_975518966.dbf thread=1 sequence=4
Archived log file name=/arch/1_5_975518966.dbf thread=1 sequence=5
Archived log file name=/arch/1_6_975518966.dbf thread=1 sequence=6
Archived log file name=/arch/1_7_975518966.dbf thread=1 sequence=7
Archived log file name=/arch/1_8_975518966.dbf thread=1 sequence=8
Archived log file name=/arch/1_9_975518966.dbf thread=1 sequence=9
Archived log file name=/arch/1_10_975518966.dbf thread=1 sequence=10
RMAN-00571: =
RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =
RMAN-00571: =
RMAN-03002: failure of recover command at 05/07/2018 18:46:50
ORA-00283: recovery session canceled due to errors
RMAN-11003: failure during parse/execution of SQL statement: alter database recover logfile'/ arch/1_10_975518966.dbf'
ORA-00283: recovery session canceled due to errors
ORA-00313: open failed for members of log group 2 of thread 1
ORA-00312: online log 2 thread 1:'/ app/oracle/product/10.2.0/oradata/gycdb/redo02.log'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
RMAN > recover database
Starting recover at 07-MAY-18
Using channel ORA_DISK_1
Starting media recovery
Media recovery complete, elapsed time: 00:00:00
Finished recover at 07-MAY-18
RMAN >
Database mounted.
SQL > alter database open
Database altered.
SQL > select count (*) from gyc02
Select count (*) from gyc02
*
ERROR at line 1:
ORA-01578: ORACLE data block corrupted (file # 1, block # 89241)
ORA-01110: data file 1:'/ app/oracle/product/10.2.0/oradata/gycdb/system01.dbf'
ORA-26040: Data block was loaded using the NOLOGGING option
SQL > select count (*) from gyc01
COUNT (*)
-
one hundred and twenty
= = conclusion: no force logging,table nologging, dml nologging, ora-26040 appears
RMAN > restore database
Starting restore at 07-MAY-18
Allocated channel: ORA_DISK_1
Channel ORA_DISK_1: SID=189 device type=DISK
Channel ORA_DISK_1: starting datafile backup set restore
Channel ORA_DISK_1: specifying datafile (s) to restore from backup set
Channel ORA_DISK_1: restoring datafile 00001 to / app/oracle/product/10.2.0/oradata/gycdb/system01.dbf
Channel ORA_DISK_1: restoring datafile 00002 to / app/oracle/product/10.2.0/oradata/gycdb/sysaux01.dbf
Channel ORA_DISK_1: restoring datafile 00003 to / app/oracle/product/10.2.0/oradata/gycdb/undotbs01.dbf
Channel ORA_DISK_1: restoring datafile 00004 to / app/oracle/product/10.2.0/oradata/gycdb/users01.dbf
Channel ORA_DISK_1: reading from backup piece / backup/gycdb_01t2afu8_1_1.bak
Channel ORA_DISK_1: piece handle=/backup/gycdb_01t2afu8_1_1.bak tag=TAG20180507T174128
Channel ORA_DISK_1: restored backup piece 1
Channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
Finished restore at 07-MAY-18
RMAN > recover database
Starting recover at 07-MAY-18
Using channel ORA_DISK_1
Starting media recovery
Archived log for thread 1 with sequence 4 is already on disk as file / arch/1_4_975518966.dbf
Archived log for thread 1 with sequence 5 is already on disk as file / arch/1_5_975518966.dbf
Archived log for thread 1 with sequence 6 is already on disk as file / arch/1_6_975518966.dbf
Archived log for thread 1 with sequence 7 is already on disk as file / arch/1_7_975518966.dbf
Archived log for thread 1 with sequence 8 is already on disk as file / arch/1_8_975518966.dbf
Archived log for thread 1 with sequence 9 is already on disk as file / arch/1_9_975518966.dbf
Archived log for thread 1 with sequence 10 is already on disk as file / arch/1_10_975518966.dbf
Archived log for thread 1 with sequence 11 is already on disk as file / arch/1_11_975518966.dbf
Archived log for thread 1 with sequence 12 is already on disk as file / arch/1_12_975518966.dbf
Archived log for thread 1 with sequence 13 is already on disk as file / arch/1_13_975518966.dbf
Archived log for thread 1 with sequence 14 is already on disk as file / arch/1_14_975518966.dbf
Archived log file name=/arch/1_4_975518966.dbf thread=1 sequence=4
Archived log file name=/arch/1_5_975518966.dbf thread=1 sequence=5
Archived log file name=/arch/1_6_975518966.dbf thread=1 sequence=6
Archived log file name=/arch/1_7_975518966.dbf thread=1 sequence=7
Archived log file name=/arch/1_8_975518966.dbf thread=1 sequence=8
Archived log file name=/arch/1_9_975518966.dbf thread=1 sequence=9
Archived log file name=/arch/1_10_975518966.dbf thread=1 sequence=10
Archived log file name=/arch/1_11_975518966.dbf thread=1 sequence=11
Archived log file name=/arch/1_12_975518966.dbf thread=1 sequence=12
Media recovery complete, elapsed time: 00:00:01
Finished recover at 07-MAY-18
SQL > create table gyc03 as select * from gyc01
Table created.
SQL > alter system switch logfile
System altered.
SQL > select table_name,logging from dba_tables where table_name like 'GYC%'
TABLE_NAME LOG
-
GYC03 YES
GYC01 NO
SQL > truncate table gyc03
Table truncated.
SQL > insert into gyc03 select * from gyc01 nologging
120 rows created.
SQL > /
120 rows created.
SQL > /
120 rows created.
SQL > commit
Commit complete.
SQL > alter system switch logfile
System altered.
SQL > /
System altered.
SQL > /
System altered.
SQL > shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL > startup mount
ORACLE instance started.
Total System Global Area 2137886720 bytes
Fixed Size 2230072 bytes
Variable Size 503318728 bytes
Database Buffers 1627389952 bytes
Redo Buffers 4947968 bytes
Database mounted.
SQL > alter database open
Database altered.
SQL > select count (*) from gyc03
COUNT (*)
-
three hundred and sixty
SQL > cAccord 3 Compact 1
1 * select count (*) from gyc01
SQL > /
COUNT (*)
-
one hundred and twenty
SQL >
= = conclusion: no force logging,table logging, dml nologging, no ora-26040
Force logging table nologging dml nologging
Force logging table nologging dml nologging
SQL > select FORCE_LOGGING from v$database
FOR
-
NO
SQL > select table_name,logging from dba_tables where table_name like 'GYC%'
TABLE_NAME LOG
-
GYC01 NO
GYC03 YES
SQL > create table gyc02 nologging as select * from gyc01
Table created.
SQL > select table_name,logging from dba_tables where table_name like 'GYC%'
TABLE_NAME LOG
-
GYC01 NO
GYC03 YES
GYC02 NO
SQL > alter system switch logfie
Alter system switch logfie
*
ERROR at line 1:
ORA-01900: LOGFILE keyword expected
SQL > alter system switch logfile
System altered.
SQL > insert into gyc02 select * from gyc03 logging ^ C
SQL >
SQL > alter database force logging
Database altered.
SQL > select FORCE_LOGGING from v$database
FOR
-
YES
SQL > select table_name,logging from dba_tables where table_name like 'GYC%'
TABLE_NAME LOG
-
GYC01 NO
GYC03 YES
GYC02 NO
SQL > select count (*) from gyc02
COUNT (*)
-
one hundred and twenty
SQL > truncate table gyc02
Table truncated.
SQL > select count (*) from gyc02
COUNT (*)
-
0
SQL > insert into gyc02 select * from gyc03 nologging
360 rows created.
SQL > /
360 rows created.
SQL > commit
Commit complete.
SQL > alter system switch logfile
System altered.
SQL > alter system switch logfile
Alter system switch logfile
System altered.
SQL >
System altered.
SQL >
SQL > create table gyc04 as select * from gyc01 where 1: 2
Table created.
SQL > select table_name,logging from dba_tables where table_name like 'GYC%'
TABLE_NAME LOG
-
GYC01 NO
GYC04 YES
GYC03 YES
GYC02 NO
SQL > select count (*) from gyc04
COUNT (*)
-
0
SQL > insert into gyc04 select * from gyc03 nologging
360 rows created.
SQL > /
360 rows created.
SQL > commit
Commit complete.
SQL > alter system switch logfile
System altered.
SQL > /
System altered.
SQL > shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL > startup mount
ORACLE instance started.
Total System Global Area 2137886720 bytes
Fixed Size 2230072 bytes
Variable Size 503318728 bytes
Database Buffers 1627389952 bytes
Redo Buffers 4947968 bytes
Database mounted.
SQL >
Recovery Manager complete.
[oracle@DBA180321R00P ~] $rman target /
Recovery Manager: Release 11.2.0.3.0-Production on Tue May 8 10:38:24 2018
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to target database: GYCDB (DBID=1624787828, not open)
RMAN > restore database
Starting restore at 08-MAY-18
Using target database control file instead of recovery catalog
Allocated channel: ORA_DISK_1
Channel ORA_DISK_1: SID=189 device type=DISK
Channel ORA_DISK_1: starting datafile backup set restore
Channel ORA_DISK_1: specifying datafile (s) to restore from backup set
Channel ORA_DISK_1: restoring datafile 00001 to / app/oracle/product/10.2.0/oradata/gycdb/system01.dbf
Channel ORA_DISK_1: restoring datafile 00002 to / app/oracle/product/10.2.0/oradata/gycdb/sysaux01.dbf
Channel ORA_DISK_1: restoring datafile 00003 to / app/oracle/product/10.2.0/oradata/gycdb/undotbs01.dbf
Channel ORA_DISK_1: restoring datafile 00004 to / app/oracle/product/10.2.0/oradata/gycdb/users01.dbf
Channel ORA_DISK_1: reading from backup piece / backup/gycdb_01t2afu8_1_1.bak
Channel ORA_DISK_1: piece handle=/backup/gycdb_01t2afu8_1_1.bak tag=TAG20180507T174128
Channel ORA_DISK_1: restored backup piece 1
Channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
Finished restore at 08-MAY-18
RMAN > recover database
Starting recover at 08-MAY-18
Using channel ORA_DISK_1
Starting media recovery
Archived log for thread 1 with sequence 4 is already on disk as file / arch/1_4_975518966.dbf
Archived log for thread 1 with sequence 5 is already on disk as file / arch/1_5_975518966.dbf
Archived log for thread 1 with sequence 6 is already on disk as file / arch/1_6_975518966.dbf
Archived log for thread 1 with sequence 7 is already on disk as file / arch/1_7_975518966.dbf
Archived log for thread 1 with sequence 8 is already on disk as file / arch/1_8_975518966.dbf
Archived log for thread 1 with sequence 9 is already on disk as file / arch/1_9_975518966.dbf
Archived log for thread 1 with sequence 10 is already on disk as file / arch/1_10_975518966.dbf
Archived log for thread 1 with sequence 11 is already on disk as file / arch/1_11_975518966.dbf
Archived log for thread 1 with sequence 12 is already on disk as file / arch/1_12_975518966.dbf
Archived log for thread 1 with sequence 13 is already on disk as file / arch/1_13_975518966.dbf
Archived log for thread 1 with sequence 14 is already on disk as file / arch/1_14_975518966.dbf
Archived log for thread 1 with sequence 15 is already on disk as file / arch/1_15_975518966.dbf
Archived log for thread 1 with sequence 16 is already on disk as file / arch/1_16_975518966.dbf
Archived log for thread 1 with sequence 17 is already on disk as file / arch/1_17_975518966.dbf
Archived log for thread 1 with sequence 18 is already on disk as file / arch/1_18_975518966.dbf
Archived log for thread 1 with sequence 19 is already on disk as file / arch/1_19_975518966.dbf
Archived log for thread 1 with sequence 20 is already on disk as file / arch/1_20_975518966.dbf
Archived log for thread 1 with sequence 21 is already on disk as file / arch/1_21_975518966.dbf
Archived log file name=/arch/1_4_975518966.dbf thread=1 sequence=4
Archived log file name=/arch/1_5_975518966.dbf thread=1 sequence=5
Archived log file name=/arch/1_6_975518966.dbf thread=1 sequence=6
Archived log file name=/arch/1_7_975518966.dbf thread=1 sequence=7
Archived log file name=/arch/1_8_975518966.dbf thread=1 sequence=8
Archived log file name=/arch/1_9_975518966.dbf thread=1 sequence=9
Archived log file name=/arch/1_10_975518966.dbf thread=1 sequence=10
Archived log file name=/arch/1_11_975518966.dbf thread=1 sequence=11
Archived log file name=/arch/1_12_975518966.dbf thread=1 sequence=12
Archived log file name=/arch/1_13_975518966.dbf thread=1 sequence=13
Archived log file name=/arch/1_14_975518966.dbf thread=1 sequence=14
Archived log file name=/arch/1_15_975518966.dbf thread=1 sequence=15
Archived log file name=/arch/1_16_975518966.dbf thread=1 sequence=16
Archived log file name=/arch/1_17_975518966.dbf thread=1 sequence=17
Archived log file name=/arch/1_18_975518966.dbf thread=1 sequence=18
Archived log file name=/arch/1_19_975518966.dbf thread=1 sequence=19
Media recovery complete, elapsed time: 00:00:03
Finished recover at 08-MAY-18
SQL > alter database open
Database altered.
SQL > select count (*) from gyc02
COUNT (*)
-
seven hundred and twenty
SQL > cpact 2 Compact 4
1 * select count (*) from gyc04
SQL > /
COUNT (*)
-
seven hundred and twenty
SQL > select count (*) from gyc02
COUNT (*)
-
seven hundred and twenty
SQL >
Conclusion force logging, table nologging/logging dml nologging, data have no effect.
Force logging, table nologging dml logging
SQL > create table gyc05 nologging as select * from gyc01 where 1: 2
Table created.
SQL > select table_name,logging from dba_tables where table_name like 'GYC%'
TABLE_NAME LOG
-
GYC01 NO
GYC04 YES
GYC03 YES
GYC02 NO
GYC05 NO
SQL > insert into gyc05 select * from gyc01
120 rows created.
SQL > /
120 rows created.
SQL > commit
Commit complete.
SQL > alter system switch logfile
System altered.
SQL > /
System altered.
SQL > /
Shut
System altered.
SQL > down immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL > startup mount
ORACLE instance started.
Total System Global Area 2137886720 bytes
Fixed Size 2230072 bytes
Variable Size 503318728 bytes
Database Buffers 1627389952 bytes
Redo Buffers 4947968 bytes
Database mounted.
RMAN > restore database
Starting restore at 08-MAY-18
Using target database control file instead of recovery catalog
Allocated channel: ORA_DISK_1
Channel ORA_DISK_1: SID=189 device type=DISK
Channel ORA_DISK_1: starting datafile backup set restore
Channel ORA_DISK_1: specifying datafile (s) to restore from backup set
Channel ORA_DISK_1: restoring datafile 00001 to / app/oracle/product/10.2.0/oradata/gycdb/system01.dbf
Channel ORA_DISK_1: restoring datafile 00002 to / app/oracle/product/10.2.0/oradata/gycdb/sysaux01.dbf
Channel ORA_DISK_1: restoring datafile 00003 to / app/oracle/product/10.2.0/oradata/gycdb/undotbs01.dbf
Channel ORA_DISK_1: restoring datafile 00004 to / app/oracle/product/10.2.0/oradata/gycdb/users01.dbf
Channel ORA_DISK_1: reading from backup piece / backup/gycdb_01t2afu8_1_1.bak
Channel ORA_DISK_1: piece handle=/backup/gycdb_01t2afu8_1_1.bak tag=TAG20180507T174128
Channel ORA_DISK_1: restored backup piece 1
Channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
Finished restore at 08-MAY-18
RMAN > recover database
Starting recover at 08-MAY-18
Using channel ORA_DISK_1
Starting media recovery
Archived log for thread 1 with sequence 4 is already on disk as file / arch/1_4_975518966.dbf
Archived log for thread 1 with sequence 5 is already on disk as file / arch/1_5_975518966.dbf
Archived log for thread 1 with sequence 6 is already on disk as file / arch/1_6_975518966.dbf
Archived log for thread 1 with sequence 7 is already on disk as file / arch/1_7_975518966.dbf
Archived log for thread 1 with sequence 8 is already on disk as file / arch/1_8_975518966.dbf
Archived log for thread 1 with sequence 9 is already on disk as file / arch/1_9_975518966.dbf
Archived log for thread 1 with sequence 10 is already on disk as file / arch/1_10_975518966.dbf
Archived log for thread 1 with sequence 11 is already on disk as file / arch/1_11_975518966.dbf
Archived log for thread 1 with sequence 12 is already on disk as file / arch/1_12_975518966.dbf
Archived log for thread 1 with sequence 13 is already on disk as file / arch/1_13_975518966.dbf
Archived log for thread 1 with sequence 14 is already on disk as file / arch/1_14_975518966.dbf
Archived log for thread 1 with sequence 15 is already on disk as file / arch/1_15_975518966.dbf
Archived log for thread 1 with sequence 16 is already on disk as file / arch/1_16_975518966.dbf
Archived log for thread 1 with sequence 17 is already on disk as file / arch/1_17_975518966.dbf
Archived log for thread 1 with sequence 18 is already on disk as file / arch/1_18_975518966.dbf
Archived log for thread 1 with sequence 19 is already on disk as file / arch/1_19_975518966.dbf
Archived log for thread 1 with sequence 20 is already on disk as file / arch/1_20_975518966.dbf
Archived log for thread 1 with sequence 21 is already on disk as file / arch/1_21_975518966.dbf
Archived log for thread 1 with sequence 22 is already on disk as file / arch/1_22_975518966.dbf
Archived log for thread 1 with sequence 23 is already on disk as file / arch/1_23_975518966.dbf
Archived log for thread 1 with sequence 24 is already on disk as file / arch/1_24_975518966.dbf
Archived log file name=/arch/1_4_975518966.dbf thread=1 sequence=4
Archived log file name=/arch/1_5_975518966.dbf thread=1 sequence=5
Archived log file name=/arch/1_6_975518966.dbf thread=1 sequence=6
Archived log file name=/arch/1_7_975518966.dbf thread=1 sequence=7
Archived log file name=/arch/1_8_975518966.dbf thread=1 sequence=8
Archived log file name=/arch/1_9_975518966.dbf thread=1 sequence=9
Archived log file name=/arch/1_10_975518966.dbf thread=1 sequence=10
Archived log file name=/arch/1_11_975518966.dbf thread=1 sequence=11
Archived log file name=/arch/1_12_975518966.dbf thread=1 sequence=12
Archived log file name=/arch/1_13_975518966.dbf thread=1 sequence=13
Archived log file name=/arch/1_14_975518966.dbf thread=1 sequence=14
Archived log file name=/arch/1_15_975518966.dbf thread=1 sequence=15
Archived log file name=/arch/1_16_975518966.dbf thread=1 sequence=16
Archived log file name=/arch/1_17_975518966.dbf thread=1 sequence=17
Archived log file name=/arch/1_18_975518966.dbf thread=1 sequence=18
Archived log file name=/arch/1_19_975518966.dbf thread=1 sequence=19
Archived log file name=/arch/1_20_975518966.dbf thread=1 sequence=20
Archived log file name=/arch/1_21_975518966.dbf thread=1 sequence=21
Archived log file name=/arch/1_22_975518966.dbf thread=1 sequence=22
Media recovery complete, elapsed time: 00:00:04
Finished recover at 08-MAY-18
SQL > alter database open
Database altered.
SQL > select count (*) from gyc03
COUNT (*)
-
three hundred and sixty
SQL > cAccord 3 Compact 5
1 * select count (*) from gyc05
SQL > /
COUNT (*)
-
two hundred and forty
Conclusion force logging, table nologging dml nlogging, data have no effect.
Force nologging, table logging/nologging dml nologging
QSQL > create table gyc6 nologging as select * from dba_users nologging
Table created.
SQL > insert into gyc6 select * from gyc6 nlogging
30 rows created.
SQL > /
60 rows created.
SQL > commit
Commit complete.
SQL >
SQL >
SQL >
SQL > create table gyc7 as select * from dba_users nologging
Table created.
SQL > insert into gyc7 select * from gyc7 nlogging
30 rows created.
SQL > /
60 rows created.
SQL > create table gyc8 nologging as select * from dba_users nologging
Table created.
SQL > insert into gyc8 select * from gyc8 nologging
30 rows created.
SQL > /
60 rows created.
SQL > /
120 rows created.
SQL > commit
Commit complete.
SQL >
SQL >
SQL > create table gyc9 as select * from dba_users nologging
Table created.
SQL > insert into gyc9 select * from gyc9 nologging
30 rows created.
SQL > /
60 rows created.
SQL > /
120 rows created.
SQL > commit
Commit complete.
SQL > alter system switch logfile
System altered.
SQL > /
System altered.
SQL > /
/
System altered.
SQL >
System altered.
SQL >
SQL >
SQL > shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
RMAN > restore database
Starting restore at 08-MAY-18
Using target database control file instead of recovery catalog
Allocated channel: ORA_DISK_1
Channel ORA_DISK_1: SID=189 device type=DISK
Channel ORA_DISK_1: starting datafile backup set restore
Channel ORA_DISK_1: specifying datafile (s) to restore from backup set
Channel ORA_DISK_1: restoring datafile 00001 to / app/oracle/product/10.2.0/oradata/gycdb/system01.dbf
Channel ORA_DISK_1: restoring datafile 00002 to / app/oracle/product/10.2.0/oradata/gycdb/sysaux01.dbf
Channel ORA_DISK_1: restoring datafile 00003 to / app/oracle/product/10.2.0/oradata/gycdb/undotbs01.dbf
Channel ORA_DISK_1: restoring datafile 00004 to / app/oracle/product/10.2.0/oradata/gycdb/users01.dbf
Channel ORA_DISK_1: reading from backup piece / backup/gycdb_01t2afu8_1_1.bak
Channel ORA_DISK_1: piece handle=/backup/gycdb_01t2afu8_1_1.bak tag=TAG20180507T174128
Channel ORA_DISK_1: restored backup piece 1
Channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
Finished restore at 08-MAY-18
RMAN > recover database
Starting recover at 08-MAY-18
Using channel ORA_DISK_1
Starting media recovery
Archived log for thread 1 with sequence 4 is already on disk as file / arch/1_4_975518966.dbf
Archived log for thread 1 with sequence 5 is already on disk as file / arch/1_5_975518966.dbf
Archived log for thread 1 with sequence 6 is already on disk as file / arch/1_6_975518966.dbf
Archived log for thread 1 with sequence 7 is already on disk as file / arch/1_7_975518966.dbf
Archived log for thread 1 with sequence 8 is already on disk as file / arch/1_8_975518966.dbf
Archived log for thread 1 with sequence 9 is already on disk as file / arch/1_9_975518966.dbf
Archived log for thread 1 with sequence 10 is already on disk as file / arch/1_10_975518966.dbf
Archived log for thread 1 with sequence 11 is already on disk as file / arch/1_11_975518966.dbf
Archived log for thread 1 with sequence 12 is already on disk as file / arch/1_12_975518966.dbf
Archived log for thread 1 with sequence 13 is already on disk as file / arch/1_13_975518966.dbf
Archived log for thread 1 with sequence 14 is already on disk as file / arch/1_14_975518966.dbf
Archived log for thread 1 with sequence 15 is already on disk as file / arch/1_15_975518966.dbf
Archived log for thread 1 with sequence 16 is already on disk as file / arch/1_16_975518966.dbf
Archived log for thread 1 with sequence 17 is already on disk as file / arch/1_17_975518966.dbf
Archived log for thread 1 with sequence 18 is already on disk as file / arch/1_18_975518966.dbf
Archived log for thread 1 with sequence 19 is already on disk as file / arch/1_19_975518966.dbf
Archived log for thread 1 with sequence 20 is already on disk as file / arch/1_20_975518966.dbf
Archived log for thread 1 with sequence 21 is already on disk as file / arch/1_21_975518966.dbf
Archived log for thread 1 with sequence 22 is already on disk as file / arch/1_22_975518966.dbf
Archived log for thread 1 with sequence 23 is already on disk as file / arch/1_23_975518966.dbf
Archived log for thread 1 with sequence 24 is already on disk as file / arch/1_24_975518966.dbf
Archived log for thread 1 with sequence 25 is already on disk as file / arch/1_25_975518966.dbf
Archived log for thread 1 with sequence 26 is already on disk as file / arch/1_26_975518966.dbf
Archived log for thread 1 with sequence 27 is already on disk as file / arch/1_27_975518966.dbf
Archived log for thread 1 with sequence 28 is already on disk as file / arch/1_28_975518966.dbf
Archived log for thread 1 with sequence 29 is already on disk as file / arch/1_29_975518966.dbf
Archived log for thread 1 with sequence 30 is already on disk as file / arch/1_30_975518966.dbf
Archived log for thread 1 with sequence 31 is already on disk as file / arch/1_31_975518966.dbf
Archived log for thread 1 with sequence 32 is already on disk as file / arch/1_32_975518966.dbf
Archived log for thread 1 with sequence 33 is already on disk as file / arch/1_33_975518966.dbf
Archived log for thread 1 with sequence 34 is already on disk as file / arch/1_34_975518966.dbf
Archived log for thread 1 with sequence 35 is already on disk as file / arch/1_35_975518966.dbf
Archived log for thread 1 with sequence 36 is already on disk as file / arch/1_36_975518966.dbf
Archived log file name=/arch/1_4_975518966.dbf thread=1 sequence=4
Archived log file name=/arch/1_5_975518966.dbf thread=1 sequence=5
Archived log file name=/arch/1_6_975518966.dbf thread=1 sequence=6
Archived log file name=/arch/1_7_975518966.dbf thread=1 sequence=7
Archived log file name=/arch/1_8_975518966.dbf thread=1 sequence=8
Archived log file name=/arch/1_9_975518966.dbf thread=1 sequence=9
Archived log file name=/arch/1_10_975518966.dbf thread=1 sequence=10
Archived log file name=/arch/1_11_975518966.dbf thread=1 sequence=11
Archived log file name=/arch/1_12_975518966.dbf thread=1 sequence=12
Archived log file name=/arch/1_13_975518966.dbf thread=1 sequence=13
Archived log file name=/arch/1_14_975518966.dbf thread=1 sequence=14
Archived log file name=/arch/1_15_975518966.dbf thread=1 sequence=15
Archived log file name=/arch/1_16_975518966.dbf thread=1 sequence=16
Archived log file name=/arch/1_17_975518966.dbf thread=1 sequence=17
Archived log file name=/arch/1_18_975518966.dbf thread=1 sequence=18
Archived log file name=/arch/1_19_975518966.dbf thread=1 sequence=19
Archived log file name=/arch/1_20_975518966.dbf thread=1 sequence=20
Archived log file name=/arch/1_21_975518966.dbf thread=1 sequence=21
Archived log file name=/arch/1_22_975518966.dbf thread=1 sequence=22
Archived log file name=/arch/1_23_975518966.dbf thread=1 sequence=23
Archived log file name=/arch/1_24_975518966.dbf thread=1 sequence=24
Archived log file name=/arch/1_25_975518966.dbf thread=1 sequence=25
Archived log file name=/arch/1_26_975518966.dbf thread=1 sequence=26
Archived log file name=/arch/1_27_975518966.dbf thread=1 sequence=27
Archived log file name=/arch/1_28_975518966.dbf thread=1 sequence=28
Archived log file name=/arch/1_29_975518966.dbf thread=1 sequence=29
Archived log file name=/arch/1_30_975518966.dbf thread=1 sequence=30
Archived log file name=/arch/1_31_975518966.dbf thread=1 sequence=31
Archived log file name=/arch/1_32_975518966.dbf thread=1 sequence=32
Archived log file name=/arch/1_33_975518966.dbf thread=1 sequence=33
Archived log file name=/arch/1_34_975518966.dbf thread=1 sequence=34
Media recovery complete, elapsed time: 00:00:06
Finished recover at 08-MAY-18
SQL > startup mount
ORACLE instance started.
Total System Global Area 2137886720 bytes
Fixed Size 2230072 bytes
Variable Size 503318728 bytes
Database Buffers 1627389952 bytes
Redo Buffers 4947968 bytes
Database mounted.
SQL > alter database open
Database altered.
SQL > select count (*) from gyc9
COUNT (*)
-
two hundred and forty
SQL > cAccord 9 Compact 8
1 * select count (*) from gyc8
SQL > /
Select count (*) from gyc8
*
ERROR at line 1:
ORA-01578: ORACLE data block corrupted (file # 1, block # 89305)
ORA-01110: data file 1:'/ app/oracle/product/10.2.0/oradata/gycdb/system01.dbf'
ORA-26040: Data block was loaded using the NOLOGGING option
SQL > cAccord 8 Compact 7
1 * select count (*) from gyc7
SQL > /
COUNT (*)
-
one hundred and twenty
SQL > cAccord 7 Compact 6
1 * select count (*) from gyc6
SQL > /
Select count (*) from gyc6
*
ERROR at line 1:
ORA-01578: ORACLE data block corrupted (file # 1, block # 89289)
ORA-01110: data file 1:'/ app/oracle/product/10.2.0/oradata/gycdb/system01.dbf'
ORA-26040: Data block was loaded using the NOLOGGING option
= conclusion noforce logging, table nologging dml nologging, Datagram ora-26040