Vous êtes sur la page 1sur 10

8/8/2018 Upgrading to Oracle Database 12cR2 Using Transient Logical Standby Method - ORACLE-HELP

Home / ARTICLES  / ORACLE CLOUD  / SCRIPTS / About

Have a question? Ask or enter a search term.  SEARCH

ALL Categories
 Upgrading to Oracle
Database 12cR2 Using ARTICLES

Transient Logical Standby BACKUP AND RECOVERY

Method DATAGUARD

GOLDENGATE
 / DATAGUARD / Upgrading to Oracle Database 12cR2
Using Transient Logical Standby Method MongoDB

Multitenant
March 12, 2018  Arun Gupta DATAGUARD  1 Comment
ORA-ERRORS

ORACLE 11G
Rolling upgrade with Transient ORACLE 12C
Logical Standby is known as a MAA
ORACLE 12CR2
(Maximum Availability
Oracle 18c
Architecture) technique, to
minimize downtime during upgrade ORACLE APPS DBA
of Oracle database.  ORACLE CLOUD

ORACLE DATABASE
This note will document the steps for performing the Advanced
ORACLE DBAAS
Data Guard method of Transient Logical Rolling Upgrade.
ORACLE HCM CLOUD
The following picture provides the general ow for an example ORACLE RAC
migration of on-premise database to Oracle Cloud.  This
SCRIPTS
document will focus on steps 2 and 4 from the image.

Oracle OCM 12C

http://oracle-help.com/dataguard/upgrading-to-oracle-database-12cr2-using-transient-logical-standby-method/ 1/10
8/8/2018 Upgrading to Oracle Database 12cR2 Using Transient Logical Standby Method - ORACLE-HELP

Oracle Database 12c


Administrat…
Issuer: Oracle
Provided by
Acclaim

Migration and upgrade of Production database with a


minimum downtime by using physru.sh script.
ORANA
Use the physru.sh script

From Oracle Support document  Oracle11g Data Guard:


Database Rolling Upgrade Shell Script (Doc ID 949322.1) you can
Top 60 Oracle Blogs
download the physru.sh script

The assumptions are below:

1. Create a Physical Standby database with “Duplicate


target database for standby from active database”

2. Recover managed standby database disconnect.

3. Standby database must be in sync and put the


database into Maximum Availability or Maximum Latest Posts
Protection mode
 Upgrade and Patch
4. Convert physical standby to logical standby. Application in
Application Container
Before running the physru.sh script, we have to do some
 Creating Application
checks PDB and Syncing with
Application Root
At Primary
 Application Container
Creation and
1. Flashback must be ON
http://oracle-help.com/dataguard/upgrading-to-oracle-database-12cr2-using-transient-logical-standby-method/ 2/10
8/8/2018 Upgrading to Oracle Database 12cR2 Using Transient Logical Standby Method - ORACLE-HELP

1 alter database flashback on; Installation of


Application
2. DG Broker set to False
 Introduction to
1 alter system set dg_broker_start=false;
Application Container
3. Standby le management=auto
 Manually Create and
1 alter system set standby_file_management=auto scope= con gure CDB
database and PDB
4. Production database in read write mode.
database

At Standby
Archives
1. Flashback must be ON

1 alter database flashback on;


 August 2018 (20)

 July 2018 (67)
2. DG Broker set to False
 June 2018 (12)
1 alter system set dg_broker_start=false;
 May 2018 (48)
3. Standby le management=auto
 April 2018 (46)
1 alter system set standby_file_management=auto scope=
 March 2018 (43)
4. Active standby database recovery must be stopped
 February 2018 (32)
1 Alter database recover managed standby database canc
 January 2018 (35)
5. Standby database must be on Mount Stage
 December 2017 (27)
1 Startup mount;
 November 2017 (47)
Arguments  October 2017 (64)

 September 2017 (56)
physru accepts the following arguments:
 August 2017 (55)

 July 2017 (66)
<username> = sys should be used
 <primary_tns> = tns service name to primary
 June 2017 (7)

<standby_tns> = tns service name to physical  May 2017 (8)

standby  March 2017 (34)


<primary_name> = db_unique_name of
 February 2017 (13)
primary (or any identifying string)
<standby_name> = db_unique_name of
standby (or any identifying string) Translate
<upgrade_version> = target rdbms version
Select Language

http://oracle-help.com/dataguard/upgrading-to-oracle-database-12cr2-using-transient-logical-standby-method/ 3/10
8/8/2018 Upgrading to Oracle Database 12cR2 Using Transient Logical Standby Method - ORACLE-HELP

Note: Click on images to read the content. Apologies for improper resolution Powered by Translate

On Primary Side Author

we can run the script on primary side.


Anuradha

1 [oracle@oracle Desktop]$ ./physru.sh sys finance finan fina


Mudgal
2  
3 Please enter the sysdba password:
Advantage Of RMAN in
Oracle

TNS-12547: TNS:lost
contact

Arun Gupta

Upgrading to Oracle
Database 12cR2 Using
Transient Logical Standby
Method

Database Cloning without


RMAN on windows

Ashish

Harbhajanka

Oracle HCM Cloud


Concepts – Part 1
(Colored E-Book)

Batmunkh

Moltov

At Standby database Recover a data le from


copy

Check the database role and name. Recover control le

Jagruti

Jasleniya

Upgrade and Patch


Application in Application
http://oracle-help.com/dataguard/upgrading-to-oracle-database-12cr2-using-transient-logical-standby-method/ 4/10
8/8/2018 Upgrading to Oracle Database 12cR2 Using Transient Logical Standby Method - ORACLE-HELP

Container

Creating Application PDB


and Syncing with
Application Root

Kunjan Sureja

Scenario 1 – Recover a
Member of a Multiplexed
Online Redo Log Group

Catalog Database
Con gure
Now Upgrade the logical database by dbua or Manually ,
we will upgraded the database with DBUA.
Nitin Kashiv

Cloud Computing How do


I Look

Skant Gupta

Oracle Cloud
Infrastructure (1Z0-932)

Accessing the Oracle 18c


Database in Vagrant VM

Skant Gupta
Finally logical database upgrade successfully.
dbaascli listener start

dbaascli listener status

Vinay Magrania

MongoDB Pro ler

MongoDB Statistics

Blog Stats

461,205 hits

http://oracle-help.com/dataguard/upgrading-to-oracle-database-12cr2-using-transient-logical-standby-method/ 5/10
8/8/2018 Upgrading to Oracle Database 12cR2 Using Transient Logical Standby Method - ORACLE-HELP

Next step is to OPEN the standby database in read write


mode as suggested by the Physru.sh script

Now at the Primary Site Run again  Physru script

In this step, the primary database will become the logical


standby database and logical standby database become
primary database but it has db_unique_name= nan which
is running on 12.2.0.1.0.

It has applied all the update which are made to the


database while upgrading the standby logical database into
12c and then it will switch-over the roles.

Now I will mount my primary database, which is currently


has Physical Standby database role with new binary.

1 [oracle@oracle Desktop]$ export ORACLE_HOME=/u01/app/oracl


2 [oracle@oracle Desktop]$ export PATH=$PATH:$ORACLE_HOME/bi
3 [oracle@oracle Desktop]$ export ORACLE_SID=finance
4 [oracle@oracle ~]$ sqlplus / as sysdba
5 SQL*Plus: Release 12.2.0.1.0 Production on Tue Mar 13 00:4
6 Copyright (c) 1982, 2016, Oracle. All rights reserved.
7 Connected to:
8 Oracle Database 12c Enterprise Edition Release 12.2.0.1.0
9  
10 SQL> startup mount
11 ORACLE instance started.
12 Total System Global Area 1660944384 bytes
13 Fixed Size 8621376 bytes
14 Variable Size 1056965312 bytes
15 Database Buffers 587202560 bytes
16 Redo Buffers 8155136 bytes
17 Database mounted.
18  
19 SQL> select name,dbid,database_role from v$database;
http://oracle-help.com/dataguard/upgrading-to-oracle-database-12cr2-using-transient-logical-standby-method/ 6/10
8/8/2018 Upgrading to Oracle Database 12cR2 Using Transient Logical Standby Method - ORACLE-HELP

20  
21 NAME       DBID      DATABASE_ROLE
22 --------- ---------- ----------------
23 FINANCE   1324657    PHYSICAL STANDBY

Third call of the script will ashback the Primary to the


guaranteed restore point, created at the rst call of the script.

1 [oracle@oracle Desktop]$ ./physru sys finance finan financ


2 Please enter the sysdba password:
3  
4 ### Initialize script to either start over or resume execu
5 Mar 12 10:08:02 2011 [0-1] Identifying rdbms software vers
6 Mar 12 10:08:02 2011 [0-1] database finance is at version
7 Mar 12 10:08:02 2011 [0-1] database finan is at version 12
8 Mar 12 10:08:04 2011 [0-1] verifying flashback database is
9 Mar 12 10:08:04 2011 [0-1] verifying available flashback r
10 Mar 12 10:08:05 2011 [0-1] verifying DG Broker is disabled
11 Mar 12 10:08:05 2011 [0-1] looking up prior execution hist
12 Mar 12 10:08:06 2011 [0-1] last completed stage [5-4] usin
13 Mar 12 10:08:06 2011 [0-1] resuming execution of script
14  
15 ### Stage 6: Run media recovery through upgrade redo
16 Mar 12 10:08:08 2011 [6-1] upgrade redo region identified
17 Mar 12 10:08:08 2011 [6-1] starting media recovery on fina
18 Mar 12 10:08:15 2011 [6-1] confirming media recovery is ru
19 Mar 12 10:09:04 2011 [6-1] waiting for media recovery to i
20 Mar 12 10:09:35 2011 [6-1] monitoring media recovery's pro
21 Mar 12 10:09:38 2011 [6-2] last applied scn 199813 is appr
22 Mar 12 10:10:14 2011 [6-3] recovery of upgrade redo at 01%
23 Mar 12 10:10:30 2011 [6-3] recovery of upgrade redo at 16%
24 Mar 12 10:10:46 2011 [6-3] recovery of upgrade redo at 25%
25 Mar 12 10:11:02 2011 [6-3] recovery of upgrade redo at 33%
26 Mar 12 10:11:18 2011 [6-3] recovery of upgrade redo at 45%
27 Mar 12 10:11:34 2011 [6-3] recovery of upgrade redo at 48%
28 Mar 12 10:11:51 2011 [6-3] recovery of upgrade redo at 56%
29 Mar 12 10:12:07 2011 [6-3] recovery of upgrade redo at 60%
30 Mar 12 10:12:24 2011 [6-3] recovery of upgrade redo at 68%
31 Mar 12 10:12:40 2011 [6-3] recovery of upgrade redo at 70%
32 Mar 12 10:12:56 2011 [6-3] recovery of upgrade redo at 74%
33 Mar 12 10:13:13 2011 [6-3] recovery of upgrade redo at 82%
34 Mar 12 10:13:29 2011 [6-3] recovery of upgrade redo at 87%
35 Mar 12 10:13:46 2011 [6-3] recovery of upgrade redo at 96%
36 Mar 12 10:14:04 2011 [6-4] media recovery has finished rec
37  
38 ### Stage 7: Switch back to the original roles prior to th
39 NOTE: At this point, you have the option to perform a swit
40 which will restore finance back to a primary database and
41 finan back to a physical standby database. If you answer '
42 to the question below, finance will remain a physical stan
43 database and finan will remain a primary database.
44  
45 Do you want to perform a switchover? (y/n):n
46  
47 SUCCESS: The physical rolling upgrade is complete

http://oracle-help.com/dataguard/upgrading-to-oracle-database-12cr2-using-transient-logical-standby-method/ 7/10
8/8/2018 Upgrading to Oracle Database 12cR2 Using Transient Logical Standby Method - ORACLE-HELP

Finally , Upgrade completed successfully.

Thank you for giving your valuable time to read the above
information.

If you want to be updated with all our articles send us the


Invitation or Follow us:

Skant Gupta’s LinkedIn: www.linkedin.com/in/skantali/

Joel Perez’s LinkedIn: Joel Perez’s Pro le

Anuradha’s LinkedIn: Anuradha’s Pro le

LinkedIn Group: Oracle Cloud DBAAS

Facebook Page: OracleHelp

Share this:

  
53

Like this:

Like
Be the first to like this.

Using Oracle Active Data Bene ts of


DBMS_ROLLING to Guard Overview & Implementing a
http://oracle-help.com/dataguard/upgrading-to-oracle-database-12cr2-using-transient-logical-standby-method/ 8/10
8/8/2018 Upgrading to Oracle Database 12cR2 Using Transient Logical Standby Method - ORACLE-HELP

Upgrade the Oracle Architecture Logical Standby


Database May 15, 2018 Database
August 5, 2018 In "DATAGUARD" May 27, 2018
In "DATAGUARD" In "DATAGUARD"

Tagged: dbua Logical Standby Physru.sh Upgrade

Related Articles

 Creating Data Guard with 2  Using DBMS_ROLLING to


node RAC Primary and 2 node Upgrade the Oracle Database

RAC standby  Upgrading Oracle Database


with a Physical Standby Database

 Recover Data le in Standby  Managing Client Connectivity


Database in Data Guard using DBMS_SERVICE package and

Environment After Startup Trigger

 Understanding and managing


client connectivity

Comments

Pingback: Transient Logical Standby - Rolling Upgrades -


Overview

Leave a Reply

Enter your comment here...

This site uses Akismet to reduce spam. Learn how your


comment data is processed.

http://oracle-help.com/dataguard/upgrading-to-oracle-database-12cr2-using-transient-logical-standby-method/ 9/10
8/8/2018 Upgrading to Oracle Database 12cR2 Using Transient Logical Standby Method - ORACLE-HELP

Tags Social Oracle Help

ASM BACKUP backup   


OracleHelp
optimization Cloud Database 1,065 likes

DATAGUARD Data
Guard DBAAS dbaascli DBCA

DBVERIFY expdp GCS GES Like Page

Goldengate impdp Index Installation

multitenant OEM Oracle


ORACLE 11g Oracle11g
ORACLE 12.2
ORACLE 12C
Oracle12c ORACLE 12C2
ORACLE 12CR2
Oracle 18c ORACLE
ASM ORACLE
CLOUD Oracle
Database ORACLE
DBAAS Oracle OEM
ORACLE RAC PDB

RAC RECOVER
RECOVERY Restapi RMAN
scripts Tablespace Upgrade
Wait Event

ORACLE DBAAS / ORACLE CLOUD / ORACLE 12C / ORACLE 12CR2 / Privacy Policy

© Copyright, oracle-help.com

http://oracle-help.com/dataguard/upgrading-to-oracle-database-12cr2-using-transient-logical-standby-method/ 10/10

Vous aimerez peut-être aussi