管理部分
成都創(chuàng)新互聯(lián)主要從事成都網(wǎng)站建設(shè)、網(wǎng)站制作、網(wǎng)頁設(shè)計(jì)、企業(yè)做網(wǎng)站、公司建網(wǎng)站等業(yè)務(wù)。立足成都服務(wù)江漢,十余年網(wǎng)站建設(shè)經(jīng)驗(yàn),價格優(yōu)惠、服務(wù)專業(yè),歡迎來電咨詢建站服務(wù):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" <增加定時任務(wù):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 <
網(wǎng)站欄目:dataguardoracle歸檔管理腳本
分享鏈接:http://weahome.cn/article/jpojsh.html