測試環境:RHEL 5.4 + Oracle 11.2.0.3 DG
現象:起初是在使用DG Broker進行switchover切換測試時,報錯ORA-16775,提示有可能有數據丟失,不容許switchover.數據庫
DGMGRL> switchover to prod1 Performing switchover NOW, please wait... Error: ORA-16775: target standby database in broker operation has potential data loss Failed. Unable to switchover, primary database is still "sbdb1"
進一步查詢歸檔傳輸狀況,發現最新的幾個歸檔都沒有傳輸成功,此時alert尚未報錯,但能夠經過查詢v$archive_dest確認錯誤信息:oracle
SQL> select error from v$archive_dest where dest_id = 2; ERROR ----------------------------------------------------------------- ORA-00088: command cannot be executed by shared server
錯誤的提示很是明確了,再看下oerr的幫助:測試
$ oerr ora 88 00088, 00000, "command cannot be executed by shared server " // *Cause: Debug command issued on shared server. // *Action: Reissue the command using a dedicated server.
問題明確了,處理起來也很是簡單,進一步檢查發現tnsnames.ora中的配置沒有顯示指定(SERVER = DEDICATED),而剛好數據庫配置了共享鏈接。因此咱們只須要修改顯示指定(SERVER = DEDICATED)便可,例如這樣:code
PROD1 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = xxx01.example.com)(PORT = 1521)) ) (CONNECT_DATA = (SERVER = DEDICATED) --這裏顯示指定 (SERVICE_NAME = PROD1.us.oracle.com) ) )
注意主備庫都須要同步修改,修改完成後,沒有再進行任何操做,就能夠看到以前沒有傳輸的歸檔自動傳輸成功。
此時再次進行switchover切換測試就能夠成功了。orm