Management Section
If database force logging is not enabled, the repository/*+ append */operation, nologging operation, will report the bad block;
Suggested table space Force logging or database force logging;
Test:
Select Force_logging, tablespace_name from Dba_tablespaces where Tablespace_name in (select Default_tablespace from Dba_users where username = ' SCOTT ');------------------------------force_loggingtablespace_namenotestcreate table T1 Noglogging as SELECT * from User_tables;
Standby query:
SELECT * FROM t1;ora-01578:oracle data block corrupted (file # 8, Block # 483) ora-01110:data file 8: '/DATA/DB/TEST1.DBF ' Ora-26040:data block was loaded using the nologging option
But here's what we can do.
SELECT * from t1 where rownum<1
The main library collects the following table information:
Begin Dbms_stats.gather_table_stats (ownname=> ' SCOTT ',tabname=> ' T1 ', cascade=>true); End
Select Table_name,num_rows,logging from User_tables where table_name= ' T1 ';
Statistical information is also synchronized, that is, the table structure is normal, that is, the table data synchronization is not;
Workaround:
The main library deletes the table for reconstruction, or restores the corresponding data files;
--related SQL
|
alter
database force
logging;
select force_logging
from
dba_tablespaces;
select
force_logging
from v$
database
;
alter
tablespace test
force logging;
select
logging,table_name,tablespace_name
from
user_tables
where table_name =
‘TEST‘
;
alter
tablespace test
no force
logging;
select tablespace_name,logging,force_logging
from
dba_tablespaces;
|
This article is from the "Snowhill" blog, make sure to keep this source http://snowhill.blog.51cto.com/339421/1940875
Oracle Dataguard's Nologing