In Primary Database
SQL> Alter system switch logfile;
SQL> show parameter log_archive_dest_state_2
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_state_2 string ENABLE
SQL> show parameter log_archive_dest_2
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2 string SERVICE=REMOTE_P1ASFWMP LGWR A
SYNC VALID_FOR=(ONLINE_LOGFILE
S,PRIMARY_ROLE) DB_UNIQUE_NAME
=P1ASFWMP
Alter system set log_archive_dest_state_2=defer scope=both;
Check standby database alert log and make sure you see "in trasit" as below:
Archived Log entry 11243 added for thread 1 sequence 42540 rlc 758314963 ID 0xa9df544e dest 2: RFS[4]: Opened log for thread 1 sequence 42541 dbid -1444945839 branch 758314963
Tue Mar 18 11:14:09 2014
Media Recovery Log +FRA/p1asfwmp/archivelog/2014_03_18/thread_1_seq_42540.3729.842511625 Media Recovery Waiting for thread 1 sequence 42541 (in transit)
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
SQL> shutdown immediate
In Primary database.
Setup xwindow using xming for GUI.
Set the oracle_home to new home. oracle@host1.com-/home/oracle/>. oraenv ORACLE_SID = [P1ASFWMP] ? P1ASFWMP
Now we have to set the Standby environment:
Copy the tnsnames.ora file to new home
SQL> Alter system switch logfile;
SQL> show parameter log_archive_dest_state_2
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_state_2 string ENABLE
SQL> show parameter log_archive_dest_2
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2 string SERVICE=REMOTE_P1ASFWMP LGWR A
SYNC VALID_FOR=(ONLINE_LOGFILE
S,PRIMARY_ROLE) DB_UNIQUE_NAME
=P1ASFWMP
Alter system set log_archive_dest_state_2=defer scope=both;
Check standby database alert log and make sure you see "in trasit" as below:
Archived Log entry 11243 added for thread 1 sequence 42540 rlc 758314963 ID 0xa9df544e dest 2: RFS[4]: Opened log for thread 1 sequence 42541 dbid -1444945839 branch 758314963
Tue Mar 18 11:14:09 2014
Media Recovery Log +FRA/p1asfwmp/archivelog/2014_03_18/thread_1_seq_42540.3729.842511625 Media Recovery Waiting for thread 1 sequence 42541 (in transit)
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
SQL> shutdown immediate
In Primary database.
Setup xwindow using xming for GUI.
The Oracle base remains unchanged with value /u01/app/oracle oracle@host1.searshc.com-/home/oracle/>echo $ORACLE_HOME /u01/app/oracle/product/11.2.4/db_1
oracle@host1.com-/home/oracle/>
oracle@host1.com-/home/oracle/>dbua
Now we have to set the Standby environment:
Copy the tnsnames.ora file to new home
Change /etc/oratab
Startup the database from new oracle home.
Start the MRP process on standby
Sql>alter database recover
managed standby database disconnect from session;
In Primary database now
enable the log_archive_dest
Alter system set
log_archive_dest_state_2=enable scope=both;
On the standby you see the log is in
transit. On alert log.
Run the query to make sure standy have
upgraded too.
--------------------------------Completed--------------------------------------------
No comments:
Post a Comment