Featured

    Featured Posts

How to Convert a Physical Standby to Snapshot Standby with SQL*Plus






1- Confirm that you have Flashback feature enabled
If that is not enabled, perform the following steps:

1- Review and set (if needed) the db_recovery parameters on both database(standby & primary) and then activate flashback
On Primary
SQL> show parameters db_recovery;
NAME                          TYPE        VALUE
----------------------------  ----------  -------------------------

db_recovery_file_dest         string
   
db_recovery_file_dest_size    big integer 0

SQL> alter system set db_recovery_file_dest_size=50g scope=both;
SQL> alter system set db_recovery_file_dest=’+ASM_PROD_FRA’ scope=both;
SQL> alter system set db_flashback_retention_target=60 scope=both;

SQL> shutdown immediate

On Standby
SQL> show parameters db_recovery;
NAME                          TYPE        VALUE
----------------------------  ----------  -------------------------

db_recovery_file_dest         string
   
db_recovery_file_dest_size    big integer 0

SQL> alter system set db_recovery_file_dest_size=50g scope=both;
SQL> Alter system set db_recovery_file_dest=’+ASM_STDBY_FRA’ scope=both;
SQL> alter system set db_flashback_retention_target=60 scope=both;

SQL> shutdown immediate;

SQL> startup mount;

SQL> alter database flashback on;
SQL> select name,database_role,flashback_on from v$database;

On Primary
SQL> startup mount

SQL> alter database flashback on;

SQL> alter database open;

SQL> select name,database_role,flashback_on from v$database;


2- Convert the Standby in Snapshot Standby
After the conversion takes place, internally a guaranteed restore point has been created and the database has been opened in read-write mode
SQL> shutdown immediate

SQL> startup mount

SQL> ALTER DATABASE CONVERT TO SNAPSHOT STANDBY;


After that you are ready to perform any DDL and DML operations on it.
SQL> shutdown immediate;

SQL> startup;

As you can see, this process is very simple, you just type a few commands, re-start your DB and you are ready to test this amazing feature!!!



Facebook like and share

Related Posts You might be Interested:

Do you like this post? Please share this article.

HTML Link Code:

Post a Comment

https://marthadba.blogspot.in/

Copyright © MARTHADBA|About Us |Disclaimer | Contact Us |Sitemap |Designed By CodeNirvana