亚洲激情专区-91九色丨porny丨老师-久久久久久久女国产乱让韩-国产精品午夜小视频观看

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

DG 日常管理命令匯總

發布時間:2020-08-09 10:52:11 來源:ITPUB博客 閱讀:277 作者:wwjfeng 欄目:關系型數據庫

1.啟動/停止MRP進程

  • log_archive_dest 為LGWR時需要創建standby redolog,為arch時無須設置standby redolog
  • --必須設置standby redolog,數據實時同步
  • alter database recover managed standby database using current controlfile disconnect;
  • --數據異步同步,當主庫切換歸檔時進行數據同步
  • alter database recover managed standby database disconnect from session;
  • --關閉MRP進程
  • alter database recover managed standby database cancel;

  • 2.檢查主備庫狀態

  • select OPEN_MODE,PROTECTION_MODE,ACTIVATION#,DATABASE_ROLE,SWITCHOVER#,SWITCHOVER_STATUS FROM V$DATABASE;
  • 確認主庫狀態為to standby或者為sessions active、保護模式應該maximum performance、角色為PRIMARY
  • 在備庫查詢時通常為not allowed 或者sessions active,角色為PHYSICAL STANDBY

  • 3.檢查數據同步情況

  • -查看應用日志延遲時間:
  • select value from v$dataguard_stats where name='apply lag';
  • -查看接收日志延遲時間:
  • select value from v$dataguard_stats where name='transport lag';
  • -查看主庫歸檔
  • Primary: SQL> select thread#, max(sequence#) "Last Primary Seq Generated"
  • from v$archived_log val, v$database vdb
  • where val.resetlogs_change# = vdb.resetlogs_change#
  • group by thread# order by 1;
  • -查看備庫已接收歸檔
  • PhyStdby:SQL> select thread#, max(sequence#) "Last Standby Seq Received"
  • from v$archived_log val, v$database vdb
  • where val.resetlogs_change# = vdb.resetlogs_change#
  • group by thread# order by 1;
  • -查看備庫已應用歸檔
  • PhyStdby:SQL>select thread#, max(sequence#) "Last Standby Seq Applied"
  • from v$archived_log val, v$database vdb
  • where val.resetlogs_change# = vdb.resetlogs_change#
  • and val.applied in ('YES','IN-MEMORY')
  • group by thread# order by 1;
  • -查看歸檔應用詳細情況
  • select first_time,sequence#,applied from v$archived_log;
  • -查看主備庫GAP
  • select * from v$archive_gap;

  • 4.查詢ASM Diskgroup 使用率

  • SET LINES 300 PAGES 9999
  • COL name FOR a15
  • COL USED_PERCENT FOR a15
  • SELECT GROUP_NUMBER,
  • NAME,
  • TOTAL_MB / 1024 total_gb,
  • FREE_MB / 1024,
  • USABLE_FILE_MB / 1024,
  • ROUND ( (TOTAL_MB - USABLE_FILE_MB) * 100 / TOTAL_MB) || '%'
  • USED_PERCENT
  • FROM V$ASM_DISKGROUP
  • ORDER BY 1;

  • 5.檢查進程

    1. 主庫(確認ARCH進程正常)
    2. SQL> SELECT PROCESS, CLIENT_PROCESS, SEQUENCE#, STATUS FROM V$MANAGED_STANDBY;
    3. PROCESS CLIENT_PROCESS SEQUENCE# STATUS
    4. ------------------ ---------------- ---------- ------------------------
    5. ARCH ARCH 731 CLOSING
    6. DGRD N/A 0 ALLOCATED
    7. DGRD N/A 0 ALLOCATED
    8. ARCH ARCH 732 CLOSING
    9. ARCH ARCH 733 CLOSING
    10. ARCH ARCH 734 CLOSING
    11. LNS LNS 735 WRITING
    12. DGRD N/A 0 ALLOCATED
    13. DGRD N/A 0 ALLOCATED
    14. 備庫(要確認存在MRP、ARCH、RFS進程)
    15. SQL> SELECT PROCESS, CLIENT_PROCESS, SEQUENCE#, STATUS FROM V$MANAGED_STANDBY;
    16. PROCESS CLIENT_PROCESS SEQUENCE# STATUS
    17. ------------------ ---------------- ---------- ------------------------
    18. ARCH ARCH 735 CLOSING
    19. DGRD N/A 0 ALLOCATED
    20. DGRD N/A 0 ALLOCATED
    21. ARCH ARCH 731 CLOSING
    22. ARCH ARCH 693 CLOSING
    23. ARCH ARCH 692 CLOSING
    24. RFS LGWR 736 IDLE
    25. RFS UNKNOWN 0 IDLE
    26. RFS UNKNOWN 0 IDLE
    27. RFS Archival 0 IDLE
    28. RFS LGWR 694 IDLE
    29. PROCESS CLIENT_PROCESS SEQUENCE# STATUS
    30. ------------------ ---------------- ---------- ------------------------
    31. MRP0 N/A 736 APPLYING_LOG
    32. RFS UNKNOWN 0 IDLE
    33. RFS Archival 0 IDLE


    6.查詢,添加standby log

    點擊(此處)折疊或打開

    1. select GROUP#, DBID db_id, THREAD#, SEQUENCE#, BYTES, USED, ARCHIVED, STATUS, FIRST_CHANGE#, NEXT_CHANGE#,LAST_CHANGE# from v$standby_log ;
    2. alter database add standby logfile thread 1 group 7 size xxx ,group 8 size xxx ,group 9 size xxx,group 10 size xxx ;







    向AI問一下細節

    免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

    AI

    长宁区| 安平县| 班戈县| 平凉市| 云安县| 思南县| 安龙县| 盐边县| 清新县| 塔河县| 旬邑县| 台湾省| 江门市| 平定县| 白银市| 汨罗市| 武乡县| 宁乡县| 宜宾市| 哈巴河县| 杭锦后旗| 沙雅县| 壶关县| 炎陵县| 威远县| 耿马| 林西县| 钟山县| 宕昌县| 班玛县| 新巴尔虎右旗| 伽师县| 龙里县| 延寿县| 芒康县| 仁怀市| 商河县| 太和县| 清苑县| 德江县| 荆门市|