1. 系統(tǒng)參數(shù)設置:
查看AIX用戶進程數(shù)限制
lsattr -E -l sys0| grep maxuproc
修改AIX用戶進程數(shù)限制
chdev -l sys0 -a maxuproc=16384
如果進程數(shù)達到上限會報錯:
TNS-12500: TNS:listener failed to start a dedicated server process
TNS-12540: TNS:internal limit restriction exceeded
TNS-12560: TNS:protocol adapter error
TNS-00510: Internal limit restriction exceeded
IBM/AIX RISC System/6000 Error: 11: Resource temporarily unavailable
2. Oracle 參數(shù)設置:
首先恢復主庫最新的備份至備庫词顾,然后創(chuàng)建standby control file:
SQL> ALTER DATABASE CREATE STANDBY CONTROLFILE AS '/home/oracle/standby.ctl'
使用standby control file將數(shù)據(jù)庫啟動至mount狀態(tài)娜搂。
主庫備庫增加standby log files,數(shù)量和在線日志相同:
SQL> alter database add standby logfile group 11 ('/lv_emr/logfiles/stdby01_1','/lv_emr/logfiles/stdby01_2') size 50M;
其他參數(shù):
*.db_file_name_convert='/u01/app/oracle/oradata/rmyyzemr/','/lv_emr/datafile/'
*.db_name='rmyyzemr'
*.db_unique_name='RMYYZEMR_S'
*.fal_client='RMYYZEMR_S'
*.fal_server='RMYYZEMR'
*.log_archive_config='dg_config=(rmyyzemr,rmyyzemr_s)'
*.log_archive_dest_1='location=/lv_emr/arch valid_for=(all_logfiles,all_roles) db_unique_name=rmyyzemr_s'
*.log_archive_dest_2='service=rmyyzemr LGWR ASYNC valid_for=(online_logfiles,primary_role) db_unique_name=rmyyzemr'
*.log_file_name_convert='/u01/app/oracle/oradata/rmyyzemr/','/lv_emr/logfile/'
*.remote_login_passwordfile='EXCLUSIVE'
3. DataGuard 啟動及監(jiān)控:
啟動日志應用:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;
停止恢復:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
確認歸檔目的地有效性:
SQL> select DEST_ID, STATUS, DESTINATION, ERROR from V$ARCHIVE_DEST where DEST_ID<=2;
查看日志應用狀態(tài):
SQL> select SEQUENCE#, FIRST_TIME, NEXT_TIME, APPLIED, ARCHIVED from V$ARCHIVED_LOG order by FIRST_TIME;
進程活動狀態(tài):
SQL> select PROCESS,CLIENT_PROCESS,SEQUENCE#,STATUS from V$MANAGED_STANDBY;
重做日志缺口:
SQL> select STATUS, GAP_STATUS from V$ARCHIVE_DEST_STATUS where DEST_ID = 2;
DataGuard 狀態(tài)日志表:
SQL> select * from V$DATAGUARD_STATUS order by TIMESTAMP;