Data Guard 部署物理備庫的 8 大注意事項,這8點主要是面向 10g R2 以後的 DG 部署。
① 主庫設定為force logging模式
idle> select force_logging from v$database;
idle> alter database force logging;
② 主庫設定為歸檔模式
idle> archive log list;
idle> shutdown immediate;
idle> startup mount;
idle> alter database archivelog;
idle> archive log list;
③ 配置Standby Redo Log
配置 standby redo log
④ 建立密匙檔案(如果不存在的話)
先看文檔的解釋:
You must have SYSDBA system privileges for the user accounts that you use to manage the primary and standby database instances
Furthermore, the SYS user must have the same password on all databases in the configuration.
那麼如果password不一樣會怎樣?
案例如下:
Error 1031 received logging on to the standby
Errors in file /u01/app/Oracle/diag/rdbms/pri/orcl/trace/orcl_arcf_5769.trc:
ORA-01031: insufficient privileges
PING[ARCf]: Heartbeat failed to connect to standby 'std'. Error is 1031.
顯然、拋出 ORA-01031: insufficient privileges
使用 DBCA 建庫會在 $ORACLE_HOME/dbs 下自動建立密匙檔案
如若沒有、可使用 orapwd 命令列工具、其 file 和 password 為必填參數、
例如(假設目前的目錄是 $ORACLE_HOME/dbs ):
orapwd file=orapworcl password=oracle entries=30 (Linux/Unix 平台命名規則:orapw[sid])