真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

DG日常管理命令匯總

1.啟動(dòng)/停止MRP進(jìn)程

為平潭等地區(qū)用戶提供了全套網(wǎng)頁(yè)設(shè)計(jì)制作服務(wù),及平潭網(wǎng)站建設(shè)行業(yè)解決方案。主營(yíng)業(yè)務(wù)為成都網(wǎng)站設(shè)計(jì)、成都網(wǎng)站制作、外貿(mào)網(wǎng)站建設(shè)、平潭網(wǎng)站設(shè)計(jì),以傳統(tǒng)方式定制建設(shè)網(wǎng)站,并提供域名空間備案等一條龍服務(wù),秉承以專業(yè)、用心的態(tài)度為用戶提供真誠(chéng)的服務(wù)。我們深信只要達(dá)到每一位用戶的要求,就會(huì)得到認(rèn)可,從而選擇與我們長(zhǎng)期合作。這樣,我們也可以走得更遠(yuǎn)!

  • log_archive_dest 為L(zhǎng)GWR時(shí)需要?jiǎng)?chuàng)建standby redolog,為arch時(shí)無(wú)須設(shè)置standby redolog
  • --必須設(shè)置standby redolog,數(shù)據(jù)實(shí)時(shí)同步
  • alter database recover managed standby database using current controlfile disconnect;
  • --數(shù)據(jù)異步同步,當(dāng)主庫(kù)切換歸檔時(shí)進(jìn)行數(shù)據(jù)同步
  • alter database recover managed standby database disconnect from session;
  • --關(guān)閉MRP進(jìn)程
  • alter database recover managed standby database cancel;

  • 2.檢查主備庫(kù)狀態(tài)

  • select OPEN_MODE,PROTECTION_MODE,ACTIVATION#,DATABASE_ROLE,SWITCHOVER#,SWITCHOVER_STATUS FROM V$DATABASE;
  • 確認(rèn)主庫(kù)狀態(tài)為to standby或者為sessions active、保護(hù)模式應(yīng)該maximum performance、角色為PRIMARY
  • 在備庫(kù)查詢時(shí)通常為not allowed 或者sessions active,角色為PHYSICAL STANDBY
  • 3.檢查數(shù)據(jù)同步情況

  • -查看應(yīng)用日志延遲時(shí)間:
  • select value from v$dataguard_stats where name='apply lag';
  • -查看接收日志延遲時(shí)間:
  • select value from v$dataguard_stats where name='transport lag';
  • -查看主庫(kù)歸檔
  • 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;
  • -查看備庫(kù)已接收歸檔
  • 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;
  • -查看備庫(kù)已應(yīng)用歸檔
  • 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;
  • -查看歸檔應(yīng)用詳細(xì)情況
  • select first_time,sequence#,applied from v$archived_log;
  • -查看主備庫(kù)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.檢查進(jìn)程

    1. 主庫(kù)(確認(rèn)ARCH進(jìn)程正常)
    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. 備庫(kù)(要確認(rèn)存在MRP、ARCH、RFS進(jìn)程)
    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

    點(diǎn)擊(此處)折疊或打開(kāi)

    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 ;







    網(wǎng)站名稱:DG日常管理命令匯總
    轉(zhuǎn)載來(lái)于:http://weahome.cn/article/pgsgsj.html

    其他資訊

    在線咨詢

    微信咨詢

    電話咨詢

    028-86922220(工作日)

    18980820575(7×24)

    提交需求

    返回頂部