管理部分
成都创新互联主要从事成都网站建设、网站制作、网页设计、企业做网站、公司建网站等业务。立足成都服务江汉,十余年网站建设经验,价格优惠、服务专业,欢迎来电咨询建站服务:18980820575
如果没有启用database force logging,则备库对/*+ append */操作,nologging操作,会报坏块;
建议表空间force logging或者database force logging;
--force logging /nologging 测试
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;
--传过去就删除
CONFIGURE ARCHIVELOG DELETION POLICY TO SHIPPED TO STANDBY;
备库删除脚本
vi delete_archive.sh
#!/bin/sh source /home/oracle/.bash_profile export ORACLE_SID=standby TABLE='v$archived_log' $ORACLE_HOME/bin/sqlplus -silent "/ as sysdba" <增加定时任务:crontab -e
0 1 * * * su - oracle -c /home/oracle/scripts/delete_archive.sh 1备库自启动脚本:
vi /etc/rc.local
su - oracle -c /home/oracle/scripts/start_db.sh vi start_db.sh source /home/oracle/.bash_profile lsnrctl start export ORACLE_SID=standby sqlplus / as sysdba <
文章名称:dataguardoracle归档管理脚本
文章URL:http://njwzjz.com/article/jpojsh.html