Customise Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorised as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyse the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customised advertisements based on the pages you visited previously and to analyse the effectiveness of the ad campaigns.

No cookies to display.

Convert Physical Standby To Snapshot Standby Using Dgmgrl

Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
  • User AvatarKiran Dalvi
  • 27 Sep, 2023
  • 0 Comments
  • 2 Mins Read

Convert Physical Standby To Snapshot Standby Using Dgmgrl

Convert Physical Standby To Snapshot Standby Using Dgmgrl

Follow the below steps to Convert Physical Standby To Snapshot Standby Using Dgmgrl :

 

1. Make sure flashback is on on standby database.
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
SQL> show parameter db_recovery
 
NAME                                 TYPE
------------------------------------ --------------------------------
VALUE
------------------------------
db_recovery_file_dest                string
+FRA
db_recovery_file_dest_size           big integer
200G
SQL> select flashback_on from v$database;
 
FLASHBACK_ON
------------------
NO
 
 
SQL> select open_mode from v$database;
 
OPEN_MODE
--------------------
READ ONLY WITH APPLY
SQL> alter database flashback on;
alter database flashback on
*
ERROR at line 1:
ORA-01153: an incompatible media recovery is active
 
 
SQL> recover managed standby database cancel;
Media recovery complete.
SQL> alter database flashback on;
 
Database altered.
 
SQL>  select flashback_on from v$database;
 
FLASHBACK_ON
------------------
YES
 
 
SQL> alter database recover managed standby database using current logfile disconnect from session;
 
Database altered.
2. Check the configuration:
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
DGMGRL>  show configuration
 
Configuration - dg_config_prim
 
  Protection Mode: MaxPerformance
  Members:
  PRIM      - Primary database
    PRIM    - Physical standby database
      Error: ORA-16810: multiple errors or warnings detected for the member
 
 
Fast-Start Failover: DISABLED
 
Configuration Status:
ERROR   (status updated 46 seconds ago)
 
 
DGMGRL> validate database PRIM
 
  Database Role:     Physical standby database
  Primary Database:  PRIM
 
  Ready for Switchover:  Yes
  Ready for Failover:    Yes (Primary Running)
 
  Flashback Database Status:
    PRIM  :  Off
    PRIM:  On
Managed by Clusterware:
    PRIM  :  YES
    PRIM:  YES
 
DGMGRL> show configuration
 
Configuration - dg_config_prim
 
  Protection Mode: MaxPerformance
  Members:
  PRIM      - Primary database
    PRIM    - Physical standby database
 
Fast-Start Failover: DISABLED
 
Configuration Status:
SUCCESS   (status updated 6 seconds ago)
3. Convert physical to snapshot standby. :
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
DGMGRL> convert database PRIM to snapshot standby;
Converting database "PRIM" to a Snapshot Standby database, please wait...
Database "PRIM" converted successfully
DGMGRL> show configuration
 
Configuration - dg_config_prim
 
  Protection Mode: MaxPerformance
  Members:
  PRIM      - Primary database
    PRIM    - Snapshot standby database
 
Fast-Start Failover: DISABLED
 
Configuration Status:
SUCCESS   (status updated 52 seconds ago)
 
 
 
 
SQL> select open_mode,database_role from v$database;
 
OPEN_MODE            DATABASE_ROLE
-------------------- ----------------
READ WRITE           SNAPSHOT STANDBY

Now the database is open in read write mode. So you can do any changes or testing on the database.

Once your activity is done, you can revert it back to physical standby.

4. Convert snapshot to physical standby
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
DGMGRL> convert database PRIM to physical standby;
Converting database "PRIM" to a Physical Standby database, please wait...
Operation requires a connection to database "ne"
Connecting ...
Connected to "PRIM"
Connected as SYSDBA.
Oracle Clusterware is restarting database "PRIM" ...
Connected to "PRIM"
Connected to "PRIM"
Continuing to convert database "PRIM" ...
Database "PRIM" converted successfully
DGMGRL>
 
 
 
 
DGMGRL> show configuration;
 
Configuration - dg_config_prim
 
  Protection Mode: MaxPerformance
  Members:
  PRIM      - Primary database
    PRIM    - Physical standby database
 
Fast-Start Failover: DISABLED
 
Configuration Status:
SUCCESS   (status updated 4 seconds ago)
 
DGMGRL>

Hope it Helps!