最后查看备库资源状态:
[grid@jystdrac1 ~]$ crsctl stat res -t -------------------------------------------------------------------------------- NAME TARGET STATE SERVER STATE_DETAILS -------------------------------------------------------------------------------- Local Resources -------------------------------------------------------------------------------- ora.DATA.dg ONLINE ONLINE jystdrac1 ONLINE ONLINE jystdrac2 ora.FRA.dg ONLINE ONLINE jystdrac1 ONLINE ONLINE jystdrac2 ora.LISTENER.lsnr ONLINE ONLINE jystdrac1 ONLINE ONLINE jystdrac2 ora.OCR.dg ONLINE ONLINE jystdrac1 ONLINE ONLINE jystdrac2 ora.asm ONLINE ONLINE jystdrac1 Started ONLINE ONLINE jystdrac2 Started ora.gsd OFFLINE OFFLINE jystdrac1 OFFLINE OFFLINE jystdrac2 ora.net1.network ONLINE ONLINE jystdrac1 ONLINE ONLINE jystdrac2 ora.ons ONLINE ONLINE jystdrac1 ONLINE ONLINE jystdrac2 ora.registry.acfs ONLINE ONLINE jystdrac1 ONLINE ONLINE jystdrac2 -------------------------------------------------------------------------------- Cluster Resources -------------------------------------------------------------------------------- ora.LISTENER_SCAN1.lsnr 1 ONLINE ONLINE jystdrac1 ora.cvu 1 ONLINE ONLINE jystdrac1 ora.jystdrac1.vip 1 ONLINE ONLINE jystdrac1 ora.jystdrac2.vip 1 ONLINE ONLINE jystdrac2 ora.mynas.db 1 ONLINE ONLINE jystdrac1 Open 2 ONLINE ONLINE jystdrac2 Open ora.oc4j 1 ONLINE ONLINE jystdrac1 ora.scan1.vip 1 ONLINE ONLINE jystdrac1 [grid@jystdrac1 ~]$确认开启ADG实时应用:
SQL> select name, database_role, open_mode from gv$database; NAME DATABASE_ROLE OPEN_MODE --------- ---------------- -------------------- JYZHAO PHYSICAL STANDBY READ ONLY JYZHAO PHYSICAL STANDBY READ ONLY SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE using current logfile disconnect from session; Database altered. SQL> select name, database_role, open_mode from gv$database; NAME DATABASE_ROLE OPEN_MODE --------- ---------------- -------------------- JYZHAO PHYSICAL STANDBY READ ONLY WITH APPLY JYZHAO PHYSICAL STANDBY READ ONLY WITH APPLY SQL> set lines 1000 SQL> select * from v$dataguard_stats; NAME VALUE UNIT TIME_COMPUTED DATUM_TIME -------------------------------- ---------------------------------------------------------------- ------------------------------ ------------------------------ ------------------------------ transport lag +00 00:00:00 day(2) to second(0) interval 08/10/2017 12:40:25 08/10/2017 12:40:22 apply lag +00 00:00:00 day(2) to second(0) interval 08/10/2017 12:40:25 08/10/2017 12:40:22 apply finish time day(2) to second(3) interval 08/10/2017 12:40:25 estimated startup time 30 second 08/10/2017 12:40:25 SQL> / NAME VALUE UNIT TIME_COMPUTED DATUM_TIME -------------------------------- ---------------------------------------------------------------- ------------------------------ ------------------------------ ------------------------------ transport lag +00 00:00:00 day(2) to second(0) interval 08/10/2017 12:43:04 08/10/2017 12:43:03 apply lag +00 00:00:00 day(2) to second(0) interval 08/10/2017 12:43:04 08/10/2017 12:43:03 apply finish time +00 00:00:00.000 day(2) to second(3) interval 08/10/2017 12:43:04 estimated startup time 30 second 08/10/2017 12:43:04 Reference