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;
--force logging/nologging Test
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;
# #配置主库的归档删除策略
CONFIGURE ARCHIVELOG deletion POLICY to applied on STANDBY;
--Pass it over and delete it.
CONFIGURE ARCHIVELOG deletion POLICY to SHIPPED to STANDBY;
Repository Delete Script
VI delete_archive.sh
#!/bin/shsource/home/oracle/.bash_profileexport oracle_sid=standbytable= ' V$archived_log ' $ORACLE _home/bin/ Sqlplus-silent "/As Sysdba" <<eofset heading off;set pagesize 0;set term off;set feedback off;set linesize 199;set trims on; set Verif off;spool/home/oracle/scripts/del_arch.sh;select ' RM-RF ' | | Name from V\ $archived _log where deleted= ' NO ' and applied= ' YES '; spool off;exit; Eofchmod +x/home/oracle/scripts/del_arch.shsh/home/oracle/scripts/del_arch.shrman Target/<<EOFcrosscheck Archivelog all;delete noprompt expired Archivelog all;exit; Eof
Adding timed tasks: crontab-e
0 1 * * * su-oracle-c/home/oracle/scripts/delete_archive.sh 1
Prepare the Library self-start script:
Vi/etc/rc.local
Su-oracle-c/home/oracle/scripts/start_db.shvi Start_db.shsource/home/oracle/.bash_profilelsnrctl Startexport Oracle_sid=standbysqlplus/as sysdba <<eofstartup;recover managed standby database using current logfile Disconnec T from Session;exit
This article is from the "Snowhill" blog, make sure to keep this source http://snowhill.blog.51cto.com/339421/1923810
Dataguard Oracle Archive Management Scripts