Monday, 16 December 2019

Creation of LOGICAL STANDBY on standalone database 12c

Creation of  LOGICAL STANDBY on standalone database 12c


Step-1 > On Standby First we have to cancel the recovery process 
SQL>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

Step-2 > Add the log_archive_dest_3 at primary database for future , when you make primary database to 
logical standby
SQL>ALTER SYSTEM SET log_archive_dest_3='LOCATION=/u01/app/oracle/oradata/archivelog/
VALID_FOR=(STANDBY_LOGFILES, STANDBY_ROLE) DB_UNIQUE_NAME=orcl';
Step-3 > Build a Dictionary in the Redo Data
SQL> EXECUTE DBMS_LOGSTDBY.BUILD;
The DBMS_LOGSTDBY.BUILD procedure uses Flashback Query to obtain a consistent snapshot
 of the data dictionary that is then logged in the redo stream. Oracle recommends setting the
UNDO_RETENTION 
initialization parameter to 3600 on both the primary and logical standby databases.

Step-4 > To continue applying redo data to the physical standby database until it is ready to convert to a 
logical standby database , issue the following SQL statement:
SQL> ALTER DATABASE RECOVER TO LOGICAL STANDBY orcldr;
Step-5> Create a new password File 
Step-6> On the logical standby database, shutdown the instance and issue the STARTUP MOUNT statement
to start and mount the database. Do not open the database; it should remain closed to user access 
 until later in the creation process
In pfile Change the ------------(db_name=orcldr)
SQL> Startup mount pfile=’?/dbs/pfile.ora’
SQL> create spfile from pfile='?/dbs/pfile.ora';
SQL> shut immediate
SQL> startup mount
Step-7 > Add the log_archive_dest_3 at Logical standby database  
SQL> ALTER SYSTEM SET log_archive_dest_3 ='LOCATION=/u01/app/oracle/oradata/archivelog/  
VALID_FOR=(STANDBY_LOGFILES, STANDBY_ROLE) DB_UNIQUE_NAME=orcldr';
Step-8 > Open the Logical Database 
SQL> ALTER DATABASE OPEN RESETLOGS;
Step-9 > Issue the following statement to begin applying redo data to the logical standby database
SQL>  ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE;



No comments:

Post a Comment