DBA Hub

📋Steps in this guide1/1

Dataguard Switchover Using DGMGRL Utility

Step1 :- Check the Primary Database DGMGRL> SHOW DATABASE VERBOSE 'prim'; Database - prim Role: PRIMARY Intended State: TRANSPORT-ON Instance(s): prim

oracle configurationintermediate
by OracleDba
15 views
1

Overview

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
DGMGRL>  SHOW DATABASE VERBOSE 'prim';

Database - prim

  Role:               PRIMARY
  Intended State:     TRANSPORT-ON
  Instance(s):
    prim

  Properties:
    DGConnectIdentifier             = 'prim'
    ObserverConnectIdentifier       = ''
    FastStartFailoverTarget         = ''
    PreferredObserverHosts          = ''
    LogShipping                     = 'ON'
    RedoRoutes                      = ''
    LogXptMode                      = 'ASYNC'
    DelayMins                       = '0'
    Binding                         = 'optional'
    MaxFailure                      = '0'
    ReopenSecs                      = '300'
    NetTimeout                      = '30'
    RedoCompression                 = 'DISABLE'
    PreferredApplyInstance          = ''
    ApplyInstanceTimeout            = '0'
    ApplyLagThreshold               = '30'
    TransportLagThreshold           = '30'
    TransportDisconnectedThreshold  = '30'
    ApplyParallel                   = 'AUTO'
    ApplyInstances                  = '0'
    StandbyFileManagement           = ''
    ArchiveLagTarget                = '0'
    LogArchiveMaxProcesses          = '0'
    LogArchiveMinSucceedDest        = '0'
    DataGuardSyncLatency            = '0'
    LogArchiveTrace                 = '0'
    LogArchiveFormat                = ''
    DbFileNameConvert               = ''
    LogFileNameConvert              = ''
    ArchiveLocation                 = ''
    AlternateLocation               = ''
    StandbyArchiveLocation          = ''
    StandbyAlternateLocation        = ''
    InconsistentProperties          = '(monitor)'
    InconsistentLogXptProps         = '(monitor)'
    LogXptStatus                    = '(monitor)'
    SendQEntries                    = '(monitor)'
    RecvQEntries                    = '(monitor)'
    HostName                        = 'test.learnomate.org'
    StaticConnectIdentifier         = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=test.learnomate.org)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=prim_DGMGRL)(INSTANCE_NAME=prim)(SERVER=DEDICATED)))'
    TopWaitEvents                   = '(monitor)'
    SidName                         = '(monitor)'

  Log file locations:
    Alert log               : /data/app/oracle/diag/rdbms/prim/prim/trace/alert_prim.log
    Data Guard Broker log   : /data/app/oracle/diag/rdbms/prim/prim/trace/drcprim.log

Database Status:
SUCCESS

DGMGRL>  SHOW DATABASE 'stand';

Database - stand

  Role:               PHYSICAL STANDBY
  Intended State:     APPLY-ON
  Transport Lag:      0 seconds (computed 0 seconds ago)
  Apply Lag:          0 seconds (computed 1 second ago)
  Average Apply Rate: 0 Byte/s
  Real Time Query:    OFF
  Instance(s):
    stand

Database Status:
SUCCESS

DGMGRL> VALIDATE DATABASE 'prim';

  Database Role:    Primary database

  Ready for Switchover:  Yes

  Flashback Database Status:
    prim:  Off

  Managed by Clusterware:
    prim:  NO
    Validating static connect identifier for the primary database prim...
    The static connect identifier allows for a connection to database "prim".



DGMGRL> VALIDATE DATABASE 'stand';

  Database Role:     Physical standby database
  Primary Database:  prim

  Ready for Switchover:  Yes
  Ready for Failover:    Yes (Primary Running)

  Flashback Database Status:
    prim :  Off
    stand:  Off

DGMGRL> switchover to 'stand';
Performing switchover NOW, please wait...
Operation requires a connection to database "stand"
Connecting ...
Connected to "stand"
Connected as SYSDBA.
New primary database "stand" is opening...
Operation requires start up of instance "prim" on database "prim"
Starting instance "prim"...
Connected to an idle instance.
ORACLE instance started.
Connected to "prim"
Database mounted.
Connected to "prim"
Switchover succeeded, new primary is "stand"

DGMGRL> show configuration

Configuration - prim

  Protection Mode: MaxPerformance
  Members:
  stand - Primary database
    prim  - Physical standby database

Fast-Start Failover:  Disabled

Configuration Status:
SUCCESS   (status updated 12 seconds ago)

Comments (0)

Please to add comments

No comments yet. Be the first to comment!