Skip navigation

By Joel Peréz ACED.gifSkant Gupta

 

This article is brought by en.enmotech.com

 

Full Index of Oracle Cloud Articles:

Sir.CloudDBaaSjoelperez

 

If you want to be updated with all our articles send us the Invitation or Follow us:

Joel Perez’s LinkedIn: www.linkedin.com/in/SirDBaaSJoelPerez

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

or Join our LinkedIn group: Oracle Cloud DBaaS

 

There are a lot of methods to move our "On-Prem" databases to Cloud using RMAN, such us:

 

  • RMAN Cross-Platform Transportable PDB

#12 Oracle Cloud (DBaaS): Migration “On-prem” database to Cloud Using RMAN Cross-Platform Transportable PDB

 

  • RMAN CONVERT Transportable Tablespace with Data Pump
  • RMAN Cross-Platform Transportable Tablespace Backup Sets
  • RMAN Transportable Tablespace with Data Pump

 

If you want to read about Oracle18c New Features for RMAN, you can go go here:

#16 Oracle 18c: RMAN New Features.. What’s NEWS..

 

Very soon we will post here the links of our articles showing how to move databases to Cloud using the methods already mentioned.

 

As a topic related you can read here one of our hotest articles:

#10 Oracle 18c: “Oracle 18c and its impact on DBAs”

 

Now, Let's continue with this one:

The method to be worked in this article is based on the tradicional backup/restore/recover database. It has been one of the methods most effective to migrate/move an Oracle Database from one host to another host or even in the same host. The advantages of this method are several, one of them is that the downtime normally is almost zero, depending on the archive redo log generation of the "On-prem" or source database.

 

When to use this method?

 

  • No Cross-Endian
  • No structural changes
  • No upgrade to a new version
  • Source version 11.2.0.4, 12.1.0.2, 12.2.0.1

 

The objective of this article is not highlight the typical advantages of the method, since is very well known, the objective of this article is to realise how we can use it to move a database to Cloud.

Please use following steps to migrate on-premise database to Oracle cloud.

 

Backup source Database

 

1. Backup the source database

[oracle@PREMISE premise]$ rman target /

 

Recovery Manager: Release 11.2.0.4.0 - Production on Tue Aug 8 04:34:16 2017

 

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

 

connected to target database: ORCL (DBID=1478563967)

 

RMAN> run

{

allocate channel c1 type DISK FORMAT '/u01/bkp/premise/%d_FULL_C_DISK_%T_%s_%p';

allocate channel c2 type DISK FORMAT '/u01/bkp/premise/%d_FULL_C_DISK_%T_%s_%p';

allocate channel c3 type DISK FORMAT '/u01/bkp/premise/%d_FULL_C_DISK_%T_%s_%p';

allocate channel c4 type DISK FORMAT '/u01/bkp/premise/%d_FULL_C_DISK_%T_%s_%p';

BACKUP AS COMPRESSED BACKUPSET DATABASE PLUS ARCHIVELOG;

backup spfile format '/u01/bkp/premise/spfile_%d_%s_%T_dbid%I.rman';

backup current controlfile format '/u01/bkp/premise/Controlfile_%d_%T_dbid%I_s%s_p%p';

release channel c1;

release channel c2;

release channel c3;

release channel c4;

}

 

using target database control file instead of recovery catalog

allocated channel: c1

channel c1: SID=146 device type=DISK

 

allocated channel: c2

channel c2: SID=33 device type=DISK

 

allocated channel: c3

channel c3: SID=150 device type=DISK

 

allocated channel: c4

channel c4: SID=17 device type=DISK

 

Starting backup at 08-AUG-17

current log archived

skipping archived logs of thread 1 from sequence 7 to 8; already backed up

channel c1: starting compressed archived log backup set

channel c1: specifying archived log(s) in backup set

input archived log thread=1 sequence=9 RECID=9 STAMP=951453273

channel c1: starting piece 1 at 08-AUG-17

channel c1: finished piece 1 at 08-AUG-17

piece handle=/u01/bkp/premise/ORCL_FULL_C_DISK_20170808_9_1 tag=TAG20170808T043433 comment=NONE

channel c1: backup set complete, elapsed time: 00:00:01

Finished backup at 08-AUG-17

 

Starting backup at 08-AUG-17

channel c1: starting compressed full datafile backup set

channel c1: specifying datafile(s) in backup set

input datafile file number=00001 name=/u02/app/oracle/oradata/ORCL/system01.dbf

channel c1: starting piece 1 at 08-AUG-17

channel c2: starting compressed full datafile backup set

channel c2: specifying datafile(s) in backup set

input datafile file number=00002 name=/u02/app/oracle/oradata/ORCL/sysaux01.dbf

input datafile file number=00004 name=/u02/app/oracle/oradata/ORCL/users01.dbf

channel c2: starting piece 1 at 08-AUG-17

channel c3: starting compressed full datafile backup set

channel c3: specifying datafile(s) in backup set

input datafile file number=00005 name=/u02/app/oracle/oradata/ORCL/example01.dbf

input datafile file number=00003 name=/u02/app/oracle/oradata/ORCL/undotbs01.dbf

channel c3: starting piece 1 at 08-AUG-17

channel c3: finished piece 1 at 08-AUG-17

piece handle=/u01/bkp/premise/ORCL_FULL_C_DISK_20170808_12_1 tag=TAG20170808T043434 comment=NONE

channel c3: backup set complete, elapsed time: 00:00:07

channel c1: finished piece 1 at 08-AUG-17

piece handle=/u01/bkp/premise/ORCL_FULL_C_DISK_20170808_10_1 tag=TAG20170808T043434 comment=NONE

channel c1: backup set complete, elapsed time: 00:00:25

channel c2: finished piece 1 at 08-AUG-17

piece handle=/u01/bkp/premise/ORCL_FULL_C_DISK_20170808_11_1 tag=TAG20170808T043434 comment=NONE

channel c2: backup set complete, elapsed time: 00:00:25

Finished backup at 08-AUG-17

 

Starting backup at 08-AUG-17

current log archived

channel c1: starting compressed archived log backup set

channel c1: specifying archived log(s) in backup set

input archived log thread=1 sequence=10 RECID=10 STAMP=951453301

channel c1: starting piece 1 at 08-AUG-17

channel c1: finished piece 1 at 08-AUG-17

piece handle=/u01/bkp/premise/ORCL_FULL_C_DISK_20170808_13_1 tag=TAG20170808T043501 comment=NONE

channel c1: backup set complete, elapsed time: 00:00:01

Finished backup at 08-AUG-17

 

Starting backup at 08-AUG-17

channel c1: starting full datafile backup set

channel c1: specifying datafile(s) in backup set

including current SPFILE in backup set

channel c1: starting piece 1 at 08-AUG-17

channel c1: finished piece 1 at 08-AUG-17

piece handle=/u01/bkp/premise/spfile_ORCL_14_20170808_dbid1478563967.rman tag=TAG20170808T043502 comment=NONE

channel c1: backup set complete, elapsed time: 00:00:01

Finished backup at 08-AUG-17

 

Starting backup at 08-AUG-17

channel c1: starting full datafile backup set

channel c1: specifying datafile(s) in backup set

including current control file in backup set

channel c1: starting piece 1 at 08-AUG-17

channel c1: finished piece 1 at 08-AUG-17

piece handle=/u01/bkp/premise/Controlfile_ORCL_20170808_dbid1478563967_s15_p1 tag=TAG20170808T043503 comment=NONE

channel c1: backup set complete, elapsed time: 00:00:01

Finished backup at 08-AUG-17

 

Starting Control File and SPFILE Autobackup at 08-AUG-17

piece handle=/u03/app/oracle/fast_recovery_area/ORCL/autobackup/2017_08_08/o1_mf_s_951453306_drlhvton_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 08-AUG-17

 

released channel: c1

 

released channel: c2

 

released channel: c3

 

released channel: c4

 

RMAN>

RMAN> exit

Recovery Manager complete.

[oracle@PREMISE premise]$

 

2. Check the backup sets

[oracle@PREMISE premise]$ cd /u01/bkp/premise

[oracle@PREMISE premise]$ ls

Controlfile_ORCL_20170808_dbid1478563967_s15_p1  ORCL_FULL_C_DISK_20170808_11_1  ORCL_FULL_C_DISK_20170808_13_1  spfile_ORCL_14_20170808_dbid1478563967.rman

ORCL_FULL_C_DISK_20170808_10_1                   ORCL_FULL_C_DISK_20170808_12_1  ORCL_FULL_C_DISK_20170808_9_1

[oracle@PREMISE premise]$

 

Create the new Cloud Database Service

a) Login to your Oracle cloud services account, go to the "Oracle Database Cloud Service" page and create a new service.

  • For Service Name, select PREMISE.
  • From the Service Level list, select Oracle Database Cloud Service.
  • From the Metering Frequency list, select whatever frequency is appropriate for your environment.
  • From the Software Release list, select Oracle Database 11g Release2.
  • From the Software Edition list, select Enterprise Edition.
  • From the Database Type list, select Single Instance.

Then click Next to continue.

figura1.JPG

Figure1. Creating a new service (PREMISE)

 

b) In the Service Details screen, do the following:

  • For DB Name (SID), enter ORCL.
  • Set an administrative password of your choice and confirm the password (this will be your sys password).
  • For Usable Database Storage (GB), enter 25.
  • From the Compute Shape list, select OC3 -1 OCPU, 7.5GB RAM (this is the bare minimum required).
  • For SSH Public Key, enter rsa-key-20170111.pub.

Then click Next to continue.

figura2.JPG

Figure 2. Specifying the service details

 

c) Finally, review the configuration and click Create to create your cloud database.

figura3.JPG

Figure 3. Creating the cloud database instance

 

After a few minutes, the cloud database instance has been created successfully.

figura4.JPG

Figure 4. The cloud database has been created

 

d) Click the service name (PREMISE) to open the main page of the database.

figura5.JPG

Figure 5. Main page of the cloud database

 

Connect the Cloud Database

1. Open the instance of the PuTTY executable and connect to the machine using SSH public key.

figura6.jpg

Figure 6. Connecting to machine using PuTTY

 

Copy backup to Oracle Cloud compute Node

 

1. Copy the backup set to cloud database

[oracle@Cloud ~]$ mkdir –p /u01/app/premise/

[oracle@PREMISE ~]$ scp -i rsa-key-20170111.ssh /u01/app/premise/* oracle@141.144.32.52:/u01/app/premise

 

2. Delete the dummy database of cloud

[oracle@Cloud ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Tue Aug 8 04:37:45 2017

 

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

With the Partitioning and Real Application Testing options

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup mount exclusive restrict

ORACLE instance started.

 

Total System Global Area 2755870720 bytes

Fixed Size                  2256432 bytes

Variable Size             637534672 bytes

Database Buffers         2030043136 bytes

Redo Buffers               86036480 bytes

Database mounted.

SQL> drop database;

Database dropped.

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

With the Partitioning and Real Application Testing options

SQL>

 

Restore backup to Oracle Cloud Instance

        

1. Startup database in nomount mode

[oracle@Cloud ~]$ mkdir -p /u01/app/oracle/admin/ORCL/adump

[oracle@Cloud ~]$ sqlplus / as sysdba

 

SQL*Plus: Release 11.2.0.4.0 Production on Tue Aug 8 04:41:09 2017

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup nomount;

ORACLE instance started.

 

Total System Global Area 2755870720 bytes

Fixed Size                  2256432 bytes

Variable Size             637534672 bytes

Database Buffers         2030043136 bytes

Redo Buffers               86036480 bytes

SQL> exit

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

With the Partitioning and Real Application Testing options

[oracle@Cloud ~]$ ps -ef|grep pmon

oracle   23518     1  0 04:41 ?        00:00:00 ora_pmon_ORCL

oracle   23649 18890  0 04:41 pts/0    00:00:00 grep pmon

 

2. Restore control file and mount database

[oracle@Cloud ~]$ rman target /

Recovery Manager: Release 11.2.0.4.0 - Production on Tue Aug 8 04:42:34 2017

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORCL (not mounted)

RMAN> RESTORE CONTROLFILE from '/u01/bkp/premise/Controlfile_ORCL_20170808_dbid1478563967_s15_p1';

Starting restore at 08-AUG-17

using channel ORA_DISK_1

 

channel ORA_DISK_1: restoring control file

channel ORA_DISK_1: restore complete, elapsed time: 00:00:01

output file name=/u02/app/oracle/oradata/ORCL/control01.ctl

output file name=/u03/app/oracle/fast_recovery_area/ORCL/control02.ctl

Finished restore at 08-AUG-17

RMAN>

RMAN> alter database mount;

database mounted

released channel: ORA_DISK_1

RMAN>

 

3. Catalog backup if location is different

RMAN> catalog start with '/u01/bkp/premise/';

Starting implicit crosscheck backup at 08-AUG-17

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=134 device type=DISK

Crosschecked 14 objects

Finished implicit crosscheck backup at 08-AUG-17

Starting implicit crosscheck copy at 08-AUG-17

using channel ORA_DISK_1

Finished implicit crosscheck copy at 08-AUG-17

searching for all files in the recovery area

cataloging files...

cataloging done

List of Cataloged Files

=======================

File Name: /u03/app/oracle/fast_recovery_area/ORCL/autobackup/2017_08_08/o1_mf_s_951453306_drlhvton_.bkp

 

searching for all files that match the pattern /u01/bkp/premise/

List of Files Unknown to the Database

=====================================

File Name: /u01/bkp/premise/Controlfile_ORCL_20170808_dbid1478563967_s15_p1

Do you really want to catalog the above files (enter YES or NO)? y

cataloging files...

cataloging done

List of Cataloged Files

=======================

File Name: /u01/bkp/premise/Controlfile_ORCL_20170808_dbid1478563967_s15_p1

RMAN>

 

4. Restore Database

RMAN> RUN {

SET NEWNAME FOR DATABASE TO '/u02/app/oracle/oradata/ORCL/%U';

RESTORE DATABASE;

SWITCH DATAFILE ALL;

}

executing command: SET NEWNAME

Starting restore at 08-AUG-17

using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile backup set restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

channel ORA_DISK_1: restoring datafile 00003 to /u02/app/oracle/oradata/ORCL/data_D-ORCL_TS-UNDOTBS1_FNO-3

channel ORA_DISK_1: restoring datafile 00005 to /u02/app/oracle/oradata/ORCL/data_D-ORCL_TS-EXAMPLE_FNO-5

channel ORA_DISK_1: reading from backup piece /u01/bkp/premise/ORCL_FULL_C_DISK_20170808_12_1

channel ORA_DISK_1: piece handle=/u01/bkp/premise/ORCL_FULL_C_DISK_20170808_12_1 tag=TAG20170808T043434

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:15

channel ORA_DISK_1: starting datafile backup set restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

channel ORA_DISK_1: restoring datafile 00002 to /u02/app/oracle/oradata/ORCL/data_D-ORCL_TS-SYSAUX_FNO-2

channel ORA_DISK_1: restoring datafile 00004 to /u02/app/oracle/oradata/ORCL/data_D-ORCL_TS-USERS_FNO-4

channel ORA_DISK_1: reading from backup piece /u01/bkp/premise/ORCL_FULL_C_DISK_20170808_11_1

channel ORA_DISK_1: piece handle=/u01/bkp/premise/ORCL_FULL_C_DISK_20170808_11_1 tag=TAG20170808T043434

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:25

channel ORA_DISK_1: starting datafile backup set restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

channel ORA_DISK_1: restoring datafile 00001 to /u02/app/oracle/oradata/ORCL/data_D-ORCL_TS-SYSTEM_FNO-1

channel ORA_DISK_1: reading from backup piece /u01/bkp/premise/ORCL_FULL_C_DISK_20170808_10_1

channel ORA_DISK_1: piece handle=/u01/bkp/premise/ORCL_FULL_C_DISK_20170808_10_1 tag=TAG20170808T043434

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:35

Finished restore at 08-AUG-17

 

datafile 1 switched to datafile copy

input datafile copy RECID=6 STAMP=951454265 file name=/u02/app/oracle/oradata/ORCL/data_D-ORCL_TS-SYSTEM_FNO-1

datafile 2 switched to datafile copy

input datafile copy RECID=7 STAMP=951454266 file name=/u02/app/oracle/oradata/ORCL/data_D-ORCL_TS-SYSAUX_FNO-2

datafile 3 switched to datafile copy

input datafile copy RECID=8 STAMP=951454266 file name=/u02/app/oracle/oradata/ORCL/data_D-ORCL_TS-UNDOTBS1_FNO-3

datafile 4 switched to datafile copy

input datafile copy RECID=9 STAMP=951454266 file name=/u02/app/oracle/oradata/ORCL/data_D-ORCL_TS-USERS_FNO-4

datafile 5 switched to datafile copy

input datafile copy RECID=10 STAMP=951454266 file name=/u02/app/oracle/oradata/ORCL/data_D-ORCL_TS-EXAMPLE_FNO-5

 

RMAN>

 

5. Recover database and open it with resetlogs

RMAN> recover database;

Starting recover at 08-AUG-17

using channel ORA_DISK_1

starting media recovery

archived log for thread 1 with sequence 10 is already on disk as file /u03/app/oracle/fast_recovery_area/ORCL/archivelog/2017_08_08/o1_mf_1_10_drlhvnw3_.arc

archived log file name=/u03/app/oracle/fast_recovery_area/ORCL/archivelog/2017_08_08/o1_mf_1_10_drlhvnw3_.arc thread=1 sequence=10

unable to find archived log

archived log thread=1 sequence=11

RMAN-03002: failure of recover command at 08/08/2017 05:01:05

RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 11 and starting SCN of 2519715

RMAN> alter database open resetlogs;

database opened

RMAN> exit

Recovery Manager complete.

[oracle@Cloud ~]$

 

6. Check the database instance

[oracle@Cloud ~]$ ps -ef | grep smon

oracle     945 18890  0 05:01 pts/0    00:00:00 grep smon

oracle   31545     1  0 04:57 ?        00:00:00 ora_smon_ORCL

[oracle@Cloud ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Tue Aug 8 05:02:14 2017

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

With the Partitioning and Real Application Testing options

SQL> select name,open_mode from v$database;

NAME      OPEN_MODE

--------- --------------------

ORCL      READ WRITE

 

Conclusion

So, now you know  it's very easy to perform Migration On-premises database to Cloud Using RMAN.

We hope this article is useful and we invite you to continue reading our next publications focused on Oracle Cloud.

 

If you want to be updated with all our articles send us the Invitation or Follow us:

Joel Perez’s LinkedIn: www.linkedin.com/in/SirDBaaSJoelPerez

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

or Join our LinkedIn group: Oracle Cloud DBaaS

 

Full Index of Oracle Cloud Articles:

Sir.CloudDBaaSjoelperez

 

Author Bios:

 

Joel Pérez is an Expert DBA ( Oracle ACE Director, Maximum Availability OCM, OCM Cloud Admin. & OCM12c/11g ) with over 17 years of Real World Experience in Oracle Technology, specialised in design and implement solutions of: High Availability, Disaster Recovery, Upgrades, Replication, Cloud and all area related to Oracle Databases. International consultant with duties, conferences & activities in more than 50 countries and countless clients around the world. Habitual and one of leading writers of Technical Oracle articles for: OTN Spanish, Portuguese, English and more. Regular Speaker in worldwide Oracle events  like: OTN LAD (Latin America), OTN MENA (Middle East & Africa), OTN APAC ( Asian Pacific), DTCC China, Oracle Code.. . Joel has always been known for being a pioneer in Oracle technology since the early days of his career being the first Latin American awarded as “OTN Expert” at year 2003 by Oracle Corp., one of the first “Oracle ACE” globally in the Oracle ACE Program at year 2004. He was honoured as one of the first “OCM Database Cloud Administrator” & Maximum Availability OCM in the world. Currently Joel works as Senior Cloud Database Architect in “Yunhe Enmo (Beijing) Technology Co.,Ltd”., company located in Beijing, China En.enmotech.com

 

Skant Gupta is an Oracle Certified Cloud Professional in Oracle Database 12c, an Oracle Certified Expert in Oracle Real Application Clusters (Oracle RAC) in Oracle Database 11g and 12c, and an Oracle Exadata Certified and an Oracle Certified Professional in Oracle Database 10g, 11g, and 12c. He works at Vodafone Technology in the UK and formerly worked as a senior DBA at Etisalat in Dubai. He has six years of experience with various Oracle technologies, focusing mainly on Cloud, database, and high availability solutions, Oracle WebLogic Suite, Oracle Exadata and Oracle GoldenGate. He has presented at several Oracle user groups worldwide, most recently in the US, the United Arab Emirates, and the India. Skant website link: oracle-help.com

By Joel Peréz ACED.gifSkant Gupta

 

This article is brought by en.enmotech.com

Subscribe to our Oracle Cloud Blog: blog.enmotech.com

 

Full Index of Oracle Cloud Articles:

Sir.CloudDBaaSjoelperez

 

If you want to be updated with all our articles send us the Invitation or Follow us:

Joel Perez’s LinkedIn: www.linkedin.com/in/SirDBaaSJoelPerez

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

or Join our LinkedIn group: Oracle Cloud DBaaS

 

Hi Readers

 

Security is one of the main issues that customers think at the time of moving or having the databases, applications and more into the Cloud. Security has many layers, areas, sections and more. When we work with databases “On-Prem”, security in many tasks and configurations is optional but when we work in Cloud, many of them are mandatory.

 

In this article our focused will be based on Oracle Advanced Security TDE and PDB working in DBCS (Database Cloud Service).

 

Oracle Advanced Security TDE provides the ability to encrypt sensitive application data on storage media completely transparent to the application itself. TDE addresses encryption requirements associated with public and private privacy

and security mandates such as PCI and California SB1386. Oracle Advanced Security TDE column encryption was introduced in Oracle Database 10g Release 2, enabling encryption of application table columns, containing credit card or social security numbers. Oracle Advanced Security TDE tablespace encryption was introduced with Oracle Database 11gR1, being the main focus of our article.


Oracle Multitenant Architecture is one of the key points for having a great scalability for moving and upgrades databases into the Cloud. Moving, creating PDB databases in “On-prem” does not have too much complexity if we are not working with security features but if we are.. we have to take into account additional things.


When you create your CDB database using DBCS is mandatory to have at least a PDB in the minimal configuration, that PDB has already a TDE Master Key created to fulfil conditions related to secure our data but when we create a new PDB into that CDB the TDE Master Key is not created by default, however we can create it without no problem. Later when you will create the first user-defined tablespace is when you will receive an error if the TDE Master Key is not already created for that new PDB.

 

The first time We were creating a new PDB and a new tablespace within it We got this problem, this article shows how to solve it and the procedure to administer TDE Master Keys working with PDB.

 

This article shows how to move the PDB in different DBCS Multitenant environment wit exporting TDE master key.

Steps:

     1. Create the Database Cloud Service database.

     2. Create New PDB in Multitenant environment.

     3. Create new master key and create demo table

     4. Unplug the PDB whilst exporting the TDE master key

     5. Move the data unplugged PDB to different DBCS

     6. Plug-in the unplugged PDB and show TDE master key

 

Create the new Cloud Database Service

a) Login to your Oracle cloud services account, go to the "Oracle Database Cloud Service" page and create a new service.

 

  • For Service Name, select PDB-Security.
  • From the Service Level list, select Oracle Database Cloud Service.
  • From the Metering Frequency list, select whatever frequency is appropriate for your environment.
  • From the Software Release list, select Oracle Database 12c Release2.
  • From the Software Edition list, select Enterprise Edition.
  • From the Database Type list, select Single Instance.

 

Then click Next to continue.

1.JPG

Figure1. Creating a new service (PDB-Security)

 

b) In the Service Details screen, do the following:

  • For DB Name (SID), enter ORCL.
  • For PDB Name, enter PDB1.
  • Set an administrative password of your choice and confirm the password (this will be your sys password and master key password).
  • For Usable Database Storage (GB), enter 25.
  • From the Compute Shape list, select OC3 -1 OCPU, 7.5GB RAM (this is the bare minimum required).
  • For SSH Public Key, enter rsa-key-20170111.pub.

 

Then click Next to continue.

2.JPG

Figure 2. Specifying the service details

 

c) Finally, review the configuration and click Create to create your cloud database.

3.JPG

Figure 3. Creating the cloud database instance

 

c) After a few minutes, the cloud database instance has been created successfully.

4.JPG

Figure 4. The cloud database has been created

 

d) Click the service name (PDB-Security) to open the main page of the database.

5.JPG

Figure 5. Main page of the cloud database

 

Connect the Cloud Database

1. Open the instance of the PuTTY executable and connect to the machine using SSH public key.

6.JPG

Figure 6. Connecting to machine using PuTTY

 

Create New PDB in Multitenant environment

 

a. On the cloud database host, invoke SQL*Plus and log in to the cloud  database as the SYS user.

[oracle@PDB-Security ~]$ sqlplus / as sysdba

 

SQL*Plus: Release 12.1.0.2.0 Production on Fri Aug 11 18:53:09 2017

 

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Connected to:

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Partitioning, Oracle Label Security, OLAP, Advanced Analytics

and Real Application Testing options

 

SQL>

 

b. Create the new NEWPDB PDB in the DBaaS CDB

SQL> create pluggable database newpdb admin user admin identified by "Welcome_1";

 

Pluggable database created.

 

c. Open the new PDB in the DBaaS CDB and check the status of PDB

SQL> alter pluggable database newpdb open read write;

 

Pluggable database altered.

 

SQL> show pdbs;

 

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED

---------- ------------------------------ ---------- ----------

         2 PDB$SEED                            READ ONLY       NO

         3 PDB1                                     READ WRITE     NO

         4 NEWPDB                               READ WRITE     NO

 

Create a new master key and dummy table

 

a. Open the wallet for new PDB

SQL>alter session set container=newpdb;

 

Session altered.

 

SQL>administer key management set keystore open force keystore identified by "MyKey#123";

 

keystore altered.

 

b. Create the new master key of new PDB

SQL> administer key management set key force keystore identified by "MyKey#123" with backup;

 

keystore altered.

 

c. Check the new master created for New PDB.

SQL> select pdb.name, e.key_id, to_char(e.creation_time,'DD-MON-YY HH24:MI:SS') created from v$encryption_keys e, v$pdbs pdb  where pdb.con_id=e.con_id order by pdb.name desc, created;

 

NAME                 KEY_ID                                                                         CREATED

-------------------- ------------------------------------------------------------------------------ ---------------------------

PDB1                 Abw1aBB/Pk8Cvwxg6bwJKcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAA                           10-AUG-17 14:17:54

NEWPDB               AXkR6FF3pU+xv5FJLzWyerMAAAAAAAAAAAAAAAAAAAAAAAAAAAAA                           11-AUG-17 19:08:18

 

d. Now create the tablespace in newpdb

SQL>create tablespace test;

 

Tablespace created.

 

e. Now create the new user

SQL>create user demo identified by demo account unlock;

 

User created.

 

SQL>grant connect, resource, unlimited tablespace to demo;

 

Grant succeeded.

 

SQL>alter user demo default tablespace test;

 

User altered.

 

f. Connect with new user and create dummy table and load some data into  it.

SQL>connect demo/demo@localhost/newpdb.gbvodafone.oraclecloud.internal

Connected.

 

SQL>show user

USER is "DEMO"

SQL>create table test as select table_name from all_tables;

 

Table created.

 

SQL>select count(*) from test;

 

  COUNT(*)

----------

       110

 

Unplug the PDB while exporting the TDE master key

 

a. On the cloud database host, invoke SQL*Plus and log in to the cloud  database as the SYS user.

[oracle@PDB-Security  ~]$ sqlplus / as sysdba

 

SQL*Plus: Release 12.2.0.1.0 Production on Fri Aug 11 19:36:34 2017

 

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

 

 

Connected to:

Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

 

SQL>alter session set container=cdb$root;

 

Session altered.

 

b. Close the NEWPDB PDB.

SQL>alter pluggable database newpdb close immediate;

 

Pluggable database altered.

 

c. Unplug the PDB. The following command generates the XML file with TDE master key.

SQL>alter pluggable database newpdb unplug into '/tmp/newpdb.xml' encrypt using "MasterKey";

 

Pluggable database altered.

 

Move the data unplugged PDB to different DBCS

 

a. On the another Database Cloud Service compute node ,create a directory for XML and database files. We can not repeat the steps for creating new Database Cloud Instance.

[oracle@PDB-Security ~]$echo "mkdir -p /u02/app/oracle/oradata/ORCL/NEWPDB" | ssh -i /home/oracle/key.ssh oracle@141.144.32.70

Enter passphrase for key '/home/oracle/key.ssh':

 

b. Tar the datafile for PDB and use the SCP utility to transfer the XML and datafiles to another instance.

[oracle@PDB-Security ~]$ cd /u02/app/oracle/oradata/ORCL/NEWPDB/datafile

 

[oracle@PDB-Security ~]$ tar -cvzf /tmp/newpdb.tar.gz *

 

[oracle@PDB-Security ~]$  scp -i /home/oracle/key.ssh /tmp/newpdb* oracle@141.144.32.70:/u02/app/oracle/oradata/ORCL/NEWPDB

 

Enter passphrase for key '/home/oracle/key.ssh':

newpdb.tar.gz 100%  244MB 243.7MB/s   00:01

newpdb.xml 100%   13KB  13.2KB/s   00:00

 

c. Untar the file on destination server

[oracle@PDB-Security ~]$ echo "cd /u02/app/oracle/oradata/ORCL/NEWPDB ; tar xvzf newpdb.tar.gz" | ssh -i  /home/oracle/key.ssh oracle@141.144.32.70

Enter passphrase for key '/home/oracle/key.ssh':

o1_mf_sysaux_drvzxbhr_.dbf

o1_mf_system_drvzxbhh_.dbf

o1_mf_temp_drvzxbhw_.dbf

o1_mf_test_drw05q9c_.dbf

o1_mf_undotbs1_drvzxbht_.dbf

 

Plug-in the unplugged PDB and show TDE master key

 

a. On the destination cloud database host, invoke SQL*Plus and log in to the cloud  database as the SYS user.

[oracle@PDB-Migration~]$ sqlplus / as sysdba

 

SQL*Plus: Release 12.1.0.2.0 Production on Fri Aug 11 18:53:09 2017

 

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Connected to:

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Partitioning, Oracle Label Security, OLAP, Advanced Analytics

and Real Application Testing options

 

SQL>

 

b. Create the PDB in the DBaaS CDB with XML and master key.

SQL>create pluggable database newpdb

using '/u02/app/oracle/oradata/ORCL/NEWPDB/newpdb.xml'

decrypt using "MasterKey"

keystore identified by "MyKey#123"

source_file_directory='/u02/app/oracle/oradata/ORCL/NEWPDB';

 

Pluggable database created.

 

c. Open the PDB in Read Write Mode.

SQL>alter pluggable database newpdb open;

 

Pluggable database altered.

 

d. Connect with demo user and check data in the dummy table

SQL>connect demo/demo@localhost/newpdb.gbvodafone.oraclecloud.internal

Connected.

 

SQL>select count(*) from test;

 

  COUNT(*)

----------

       110

 

e. Check the master TDE for migrated PDB

SQL>select pdb.name, e.key_id, to_char(e.creation_time,'DD-MON-YY HH24:MI:SS') created

from v$encryption_keys e, v$pdbs pdb

where pdb.con_id=e.con_id

order by pdb.name desc, created;

 

NAME                 KEY_ID                                                                         CREATED

-------------------- ------------------------------------------------------------------------------ ---------------------------

PDB1                 Abw1aBB/Pk8Cvwxg6bwJKcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAA                           10-AUG-17 14:17:54

NEWPDB               AXkR6FF3pU+xv5FJLzWyerMAAAAAAAAAAAAAAAAAAAAAAAAAAAAA                           11-AUG-17 19:08:18

 

Conclusion

So now you know that it is very easy to move the PDB in different DBCS Multitenant environment wit exporting TDE master key.

We hope this article is useful and we invite you to continue reading our next publications focused on Oracle Cloud.

 

If you want to be updated with all our articles send us the Invitation or Follow us:

Joel Perez’s LinkedIn: www.linkedin.com/in/SirDBaaSJoelPerez

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

or Join our LinkedIn group: Oracle Cloud DBaaS

 

Full Index of Oracle Cloud Articles:

Sir.CloudDBaaSjoelperez

 

Author Bios:

 

Joel Pérez is an Expert DBA ( Oracle ACE Director, Maximum Availability OCM, OCM Cloud Admin. & OCM12c/11g ) with over 17 years of Real World Experience in Oracle Technology, specialised in design and implement solutions of: High Availability, Disaster Recovery, Upgrades, Replication, Cloud and all area related to Oracle Databases. International consultant with duties, conferences & activities in more than 50 countries and countless clients around the world. Habitual and one of leading writers of Technical Oracle articles for: OTN Spanish, Portuguese, English and more. Regular Speaker in worldwide Oracle events  like: OTN LAD (Latin America), OTN MENA (Middle East & Africa), OTN APAC ( Asian Pacific), DTCC China, Oracle Code.. . Joel has always been known for being a pioneer in Oracle technology since the early days of his career being the first Latin American awarded as “OTN Expert” at year 2003 by Oracle Corp., one of the first “Oracle ACE” globally in the Oracle ACE Program at year 2004. He was honoured as one of the first “OCM Database Cloud Administrator” & Maximum Availability OCM in the world. Currently Joel works as Senior Cloud Database Architect in “Yunhe Enmo (Beijing) Technology Co.,Ltd”., company located in Beijing, China En.enmotech.com

 

Skant Gupta is an Oracle Certified Cloud Professional in Oracle Database 12c, an Oracle Certified Expert in Oracle Real Application Clusters (Oracle RAC) in Oracle Database 11g and 12c, and an Oracle Exadata Certified and an Oracle Certified Professional in Oracle Database 10g, 11g, and 12c. He works at Vodafone Technology in the UK and formerly worked as a senior DBA at Etisalat in Dubai. He has six years of experience with various Oracle technologies, focusing mainly on Cloud, database, and high availability solutions, Oracle WebLogic Suite, Oracle Exadata and Oracle GoldenGate. He has presented at several Oracle user groups worldwide, most recently in the US, the United Arab Emirates, and the India. Skant website link: oracle-help.com

By Joel Peréz ACED.gifSkant Gupta

This article is brought by en.enmotech.com

 

At the last part of this article we performed Switchover & Failover Operations on Oracle Data Guard using the dbaascli utility.

You can read it here:

#4 Oracle Cloud (DBaaS): Using dbaascli Utility for Switchover & Failover Operations on Oracle Data Guard

 

Now in this one we will show the necessary steps to Reinstate using the dbaascli Utility

 

After performing a failover to the standby database, you may be able to restore your original disaster-recovery solution by reinstating the failed primary database. You can use the Data Guard broker's reinstate capability to make the failed primary database a viable standby database for the new primary.

 

Steps to Perform a Reinstating a Failed Primary Database using dbaascli utility

 

You can use the dataguard reinstate subcommand of the dbaascli utility to reinstate a failed primary database after a failover.

To determine whether the database can be reinstated, use the dataguard status subcommand as described in Checking the Status of the Oracle Data Guard Configuration.

A status of ORA-16661: the standby database needs to be reinstated indicates the standby database can be reinstated.

 

Let's Assume we come from this state:

21.jpg

To reinstate a failed primary database by using the dataguard reinstate subcommand:

 

1. Connect to one of the compute nodes in the Oracle Data Guard configuration as the oracle user.

Using username "opc".

Authenticating with public key "rsa-key-20170425"

Passphrase for key "rsa-key-20170425":

[opc@DATAGUARD-dg02 ~]$ sudo su - oracle

[oracle@DATAGUARD-dg02 ~]$

 

2. Initiate the reinstatement of the failed primary database

[oracle@DATAGUARD-dg02 ~]$ dbaascli dataguard reinstate

DBAAS CLI version 1.0.0

Executing command dataguard reinstate

Successfully reinstated dataguard instances

Detail : Successfully reinstated database : ORCL_02

oracle@DATAGUARD-dg02 ~]$

 

3. Check the status of standby database

[oracle@DATAGUARD-dg02 ~]$ dbaascli dataguard status

DBAAS CLI version 1.0.0

Executing command dataguard status

SUCCESS : Dataguard is up and running

 

DETAILS:

 

Configuration - fsc

 

  Protection Mode: MaxPerformance

  Databases:

    ORCL_01 - Primary database

    ORCL_02 - Physical standby database

 

  Properties:

    FastStartFailoverThreshold      = '30'

    OperationTimeout                = '120'

    FastStartFailoverLagLimit       = '30'

    CommunicationTimeout            = '180'

    ObserverReconnect               = '0'

    FastStartFailoverAutoReinstate  = 'TRUE'

    FastStartFailoverPmyShutdown    = 'TRUE'

    BystandersFollowRoleChange      = 'ALL'

    ObserverOverride                = 'FALSE'

    ExternalDestination1            = ''

    ExternalDestination2            = ''

    PrimaryLostWriteAction          = 'CONTINUE'

 

Fast-Start Failover: DISABLED

 

Configuration Status:

SUCCESS

 

[oracle@DATAGUARD-dg02 ~]$

 

Conclusion

So now you know that it is very easy to Reinstate a failed primary database using dbaascli utility.

We hope this article is useful and we invite you to continue reading our next publications focused on Oracle Cloud.

 

 

And as a Cloud related Topic, you can read here as well one of our hotest articles:

#10 Oracle 18c: “Oracle 18c and its impact on DBAs”

 

If you want to be updated with all our articles send us the Invitation or Follow us:

Joel Perez’s LinkedIn: www.linkedin.com/in/SirDBaaSJoelPerez

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

or Join Oracle Cloud DBaaS LinkedIn Group: https://www.linkedin.com/groups/12065270

 

Full Index of Oracle Cloud Articles:

Sir.CloudDBaaSjoelperez

 

Joel Pérez is an Expert DBA ( Oracle ACE Director, Maximum Availability OCM, OCM Cloud Admin. & OCM12c/11g ) with over 17 years of Real World Experience in Oracle Technology, specialised in design and implement solutions of: High Availability, Disaster Recovery, Upgrades, Replication, Cloud and all area related to Oracle Databases. International consultant with duties, conferences & activities in more than 50 countries and countless clients around the world. Habitual and one of leading writers of Technical Oracle articles for: OTN Spanish, Portuguese, English and more. Regular Speaker in worldwide Oracle events  like: OTN LAD (Latin America), OTN MENA (Middle East & Africa), OTN APAC ( Asian Pacific), DTCC China, Oracle Code.. . Joel has always been known for being a pioneer in Oracle technology since the early days of his career being the first Latin American awarded as “OTN Expert” at year 2003 by Oracle Corp., one of the first “Oracle ACE” globally in the Oracle ACE Program at year 2004. He was honoured as one of the first “OCM Database Cloud Administrator” & Maximum Availability OCM in the world. Currently Joel works as Senior Cloud Database Architect in “Yunhe Enmo (Beijing) Technology Co.,Ltd”., company located in Beijing, China En.enmotech.com

 

Skant Gupta is an Oracle Certified Cloud Professional in Oracle Database 12c, an Oracle Certified Expert in Oracle Real Application Clusters (Oracle RAC) in Oracle Database 11g and 12c, and an Oracle Exadata Certified and an Oracle Certified Professional in Oracle Database 10g, 11g, and 12c. He works at Vodafone Technology in the UK and formerly worked as a senior DBA at Etisalat in Dubai. He has six years of experience with various Oracle technologies, focusing mainly on Cloud, database, and high availability solutions, Oracle WebLogic Suite, Oracle Exadata and Oracle GoldenGate. He has presented at several Oracle user groups worldwide, most recently in the US, the United Arab Emirates, and the India. Skant website link: oracle-help.com

By Joel Peréz ACED.gifSkant Gupta

This article is brought by en.enmotech.com

 

At the last part of this article we performed Switchover, Failover & Reinstate Operations on Oracle Data Guard using the DBCS Console.

You can read it here:

#2 Oracle Cloud (DBaaS): Switchover, Failover & Reinstate Operations on Oracle Data Guard using DBCS Console

Now in this this article we will show the necessary steps to perform Switchover, Failover & Reinstate Operations using the dbaas Utility

 

Performing a Switchover Operation

A switchover operation enables the primary database to switch roles with its standby database. There is no data loss during a switchover. After a switchover, each database continues to participate in the Oracle Data Guard configuration in its new role. A switchover is typically used to reduce primary database downtime during planned outages, such as operating system or hardware upgrades, or rolling upgrades of the Oracle database software and patch sets.

 

Steps to Perform a Switchover Operation using the dbaascli utility

 

You can use the dataguard switchover subcommand of the dbaascli utility to perform a switchover to the standby database in your Oracle Data Guard configuration.

To perform a switchover by using the dataguard switchover subcommand:

 

1. Connect to the compute node in the Oracle Data Guard configuration that will host the new primary database as the opc user.

Using username "opc".

Authenticating with public key "rsa-key-20170425"

Passphrase for key "rsa-key-20170425":

[opc@DATAGUARD-dg01 ~]$

 

2. Start a root-user command shell and then switch to the oracle user.

[opc@DATAGUARD-dg01 ~]$ sudo su - oracle

[oracle@DATAGUARD-dg01 ~]$

 

3. Initiate the switchover to the standby database

[oracle@DATAGUARD-dg01 ~]$ dbaascli dataguard switchover

DBAAS CLI version 1.0.0

Executing command dataguard switchover

Performing switchover NOW, please wait...

New primary database "ORCL_02" is opening...

Operation requires startup of instance "ORCL" on database "ORCL_01"

Starting instance "ORCL"...

ORACLE instance started.

Database mounted.

Switchover succeeded, new primary is "ORCL_02"

SUCCESS : Switchover to Standby operation completed successfully

[oracle@DATAGUARD-dg01 ~]

 

4. Restart the ORDS server

[root@DATAGUARD-dg01 ~]# /etc/init.d/ords restart

INFO: Stopping Oracle REST Data Services...

INFO: Oracle REST Data Services stopped

INFO: Starting Oracle REST Data Services...

INFO: Oracle REST Data Services bound to ports 8080,8181 854

INFO: Oracle REST Data Services started with PID 854

[root@DATAGUARD-dg01 ~]#

 

5. Check the status of standby database

[oracle@DATAGUARD-dg01 ~]$ dbaascli dataguard status

DBAAS CLI version 1.0.0

Executing command dataguard status

SUCCESS : Dataguard is up and running

DETAILS:

Configuration - fsc

  Protection Mode: MaxPerformance

  Databases:

    ORCL_02 - Primary database

    ORCL_01 - Physical standby database

  Properties:

    FastStartFailoverThreshold      = '30'

    OperationTimeout                = '120'

    FastStartFailoverLagLimit       = '30'

    CommunicationTimeout            = '180'

    ObserverReconnect               = '0'

    FastStartFailoverAutoReinstate  = 'TRUE'

    FastStartFailoverPmyShutdown    = 'TRUE'

    BystandersFollowRoleChange      = 'ALL'

    ObserverOverride                = 'FALSE'

    ExternalDestination1            = ''

    ExternalDestination2            = ''

    PrimaryLostWriteAction          = 'CONTINUE'

Fast-Start Failover: DISABLED

Configuration Status:

SUCCESS

[oracle@DATAGUARD-dg01 ~]$

 

Performing a Manual Failover Operation

A failover operation changes a standby database to the primary role in response to a primary database failure. If the primary database was not operating in either maximum protection mode or maximum availability mode before the failure, some data loss may occur. If Flashback Database is enabled on the primary database, it can be reinstated as a standby for the new primary database once the reason for the failure is corrected. A failover is typically used only when the primary database becomes unavailable, and there is no possibility of restoring it to service within a reasonable period of time.

 

Steps to Perform a Failover Operation using the dbaascli utility

You can use the dataguard failover subcommand of the dbaascli utility to perform a manual failover to the standby database in your Oracle Data Guard configuration.

To perform a failover by using the dataguard failover subcommand:

 

1. Connect to the compute node in the Oracle Data Guard configuration that will host the new primary database as the opc user.

Using username "opc".

Authenticating with public key "rsa-key-20170425"

Passphrase for key "rsa-key-20170425":

[opc@DATAGUARD-dg01 ~]$

 

2. Start a root-user command shell and then switch to the oracle user.

[opc@DATAGUARD-dg01 ~]$ sudo su - oracle

[oracle@DATAGUARD-dg01 ~]$

 

3. Initiate the failover to the standby database

[oracle@DATAGUARD-dg02 ~]$ dbaascli dataguard failover

DBAAS CLI version 1.0.0

Executing command dataguard failover

Performing failover NOW, please wait...

Failover succeeded, new primary is "ORCL_01"

SUCCESS : Successfully failed over to Standby

[oracle@DATAGUARD-dg02 ~]$

 

4. Restart the ORDS server

[root@DATAGUARD-dg02 ~]# /etc/init.d/ords restart

INFO: Stopping Oracle REST Data Services...

INFO: Oracle REST Data Services stopped

INFO: Starting Oracle REST Data Services...

INFO: Oracle REST Data Services bound to ports 8080,8181 24177

INFO: Oracle REST Data Services started with PID 24177

[root@DATAGUARD-dg02 ~]#

 

5. Check the status of standby database

[oracle@DATAGUARD-dg02 ~]$ dbaascli dataguard status

DBAAS CLI version 1.0.0

Executing command dataguard status

SUCCESS : Dataguard is up and running

DETAILS:

 

Configuration - fsc

  Protection Mode: MaxPerformance

  Databases:

    ORCL_01 - Primary database

    ORCL_02 - Physical standby database (disabled)

      ORA-16661: the standby database needs to be reinstated

  Properties:

    FastStartFailoverThreshold      = '30'

    OperationTimeout                = '120'

    FastStartFailoverLagLimit       = '30'

    CommunicationTimeout            = '180'

    ObserverReconnect               = '0'

    FastStartFailoverAutoReinstate  = 'TRUE'

    FastStartFailoverPmyShutdown    = 'TRUE'

    BystandersFollowRoleChange      = 'ALL'

    ObserverOverride                = 'FALSE'

    ExternalDestination1            = ''

    ExternalDestination2            = ''

    PrimaryLostWriteAction          = 'CONTINUE'

Fast-Start Failover: DISABLED

Configuration Status:

SUCCESS

[oracle@DATAGUARD-dg02 ~]$

 

At next article we will show you how to reinstate a Failed Primary Database using dbaascli Utility.

 

If you want to be updated with all our articles send us the Invitation or Follow us:

Joel Perez’s LinkedIn: www.linkedin.com/in/SirDBaaSJoelPerez

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

or Join Oracle Cloud DBaaS LinkedIn Group: https://www.linkedin.com/groups/12065270

 

Full Index of Oracle Cloud Articles:

Sir.CloudDBaaSjoelperez

 

Joel Pérez is an Expert DBA ( Oracle ACE Director, Maximum Availability OCM, OCM Cloud Admin. & OCM12c/11g ) with over 17 years of Real World Experience in Oracle Technology, specialised in design and implement solutions of: High Availability, Disaster Recovery, Upgrades, Replication, Cloud and all area related to Oracle Databases. International consultant with duties, conferences & activities in more than 50 countries and countless clients around the world. Habitual and one of leading writers of Technical Oracle articles for: OTN Spanish, Portuguese, English and more. Regular Speaker in worldwide Oracle events  like: OTN LAD (Latin America), OTN MENA (Middle East & Africa), OTN APAC ( Asian Pacific), DTCC China, Oracle Code.. . Joel has always been known for being a pioneer in Oracle technology since the early days of his career being the first Latin American awarded as “OTN Expert” at year 2003 by Oracle Corp., one of the first “Oracle ACE” globally in the Oracle ACE Program at year 2004. He was honoured as one of the first “OCM Database Cloud Administrator” & Maximum Availability OCM in the world. Currently Joel works as Senior Cloud Database Architect in “Yunhe Enmo (Beijing) Technology Co.,Ltd”., company located in Beijing, China En.enmotech.com

 

Skant Gupta is an Oracle Certified Cloud Professional in Oracle Database 12c, an Oracle Certified Expert in Oracle Real Application Clusters (Oracle RAC) in Oracle Database 11g and 12c, and an Oracle Exadata Certified and an Oracle Certified Professional in Oracle Database 10g, 11g, and 12c. He works at Vodafone Technology in the UK and formerly worked as a senior DBA at Etisalat in Dubai. He has six years of experience with various Oracle technologies, focusing mainly on Cloud, database, and high availability solutions, Oracle WebLogic Suite, Oracle Exadata and Oracle GoldenGate. He has presented at several Oracle user groups worldwide, most recently in the US, the United Arab Emirates, and the India. Skant website link: oracle-help.com

By Joel Peréz ACED.gifSkant Gupta

 

This article is brought by en.enmotech.com

 

Full Index of Oracle Cloud Articles:

Sir.CloudDBaaSjoelperez

 

If you want to be updated with all our articles send us the Invitation or Follow us:

Joel Perez’s LinkedIn: www.linkedin.com/in/SirDBaaSJoelPerez

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

or Join our LinkedIn group: Oracle Cloud DBaaS

 

Hi everyone

 

If you are reading this article could be for several reasons..:

1.- Perhaps you have asked me or asked to my colleague Skant Gupta the typical question "How to become OCP & OCM Cloud?"

2.- Perhaps you have found this publication in any of social medias we manage

3.- Perhaps you have asked the typical question.. "How I start to learn Oracle Database in Cloud"

4.- Or simply you are interested in this subject and you have found this article using google.. etc

 

Before continuing, if you want to read other articles related to this topic you can go here:

#10 Oracle 18c: “Oracle 18c and its impact on DBAs”

#14 Oracle 18c: Oracle 18c.. New Features.. What’s NEWS..

 

So, Let's continue..

 

Whatever could be the reason.. we are available to give you a brief and effective information about how to get it.

This information will be useful not only for people that wants to become OCP & OCM Cloud, as well for people that desires to start to learn

how to manage databases in Cloud.

 

The first Cloud Database Certification was in the market around 4 years ago, I achieved it at the 2013, the name of it was:

"Oracle Certified Professional, Database Cloud Administrator"

 

You can see it here:

certi01.1.jpg

That certification was based on the past Cloud Database Model. Database as a Service ( DBaaS ) was evolving during the years and the content of that certification was obsolete related to what we have nowadays. According to my research, that certification was retired from the Oracle Certification Program. The key exam to get it was the 1Z0-028

https://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=5001&get_params=p_exam_id:1Z0-028

If that page is accessed you will realise that all the content was removed.

Here you can see the publication related to at the year 2013:

https://blogs.oracle.com/opnenablement/get-certified-in-oracle-database-cloud-administration

 

Here in this link you could verify that in effect 2 certifications related to that exam were retired:

hojo02.jpg

https://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=206

 

Nowadays, at the time of writing this article: 8/Sept/2017 there are 3 Cloud Database Certifications.

 

Inside these links you will find all the information related to:

1.- Path to reach them

2.- Materials to study

3.- Exam Score and more

 

Oracle Database Cloud Service Operations Certified Associate Certification

https://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=654&get_params=p_id:463&p_org_id=1001&lang=US#tabs-1-2

 

Oracle Database Cloud Administrator Certified Associate Certification

https://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=654&get_params=p_id:468&p_org_id=1001&lang=US#tabs-1-1

 

Oracle Database Cloud Administrator Certified Professional Certification

https://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=654&get_params=p_id:412&p_org_id=1001&lang=US#tabs-2

 

The main exam to achieve all those certifications is this:

https://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=5001&get_params=p_exam_id:1Z0-160

 

My Colleague Mr. Cloud Man Skant Gupta has achieved one them recently, the OCP Cloud, we can see it here:

gupta02.jpg

For all people which completed the Path for these certifications, they will be valid according to the Oracle Certification Program

hojo02.jpg

I achieved both at the years 2013 & 2014 being one of the first OCP & OCM Cloud in the World!

ocp_cloud02.jpg

oci01.jpg

 

Realise the names of my certification gotten at the year 2013 and the certification gotten by Skant at the year 2017. The names are exactly same and the general certification conception as well, the difference is, the certification valid at the year 2013 was based on how Oracle Database Cloud was in that moment and obvious the certification of 2017 is fully updated with these times.

 

Normally people ask about:

 

What kind of materials I can use to study for these exams?

Answer: inside the links provided there is a section called "Exam Preparation"

In a general way there 4 kind of general materials to study for these exams:

1.- Official Oracle University Training: https://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=609&get_params=dc:D96069,clang:EN

2.- Oracle Database Cloud Channel: https://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=904&get_params=cloudId:384,channelId:3542

3.- Official Information & Documentation: https://cloud.oracle.com/database

4.- Oracle Learning Subscription

 

How I can do for practicing?

Answer: you can request a 30-Day Free Trial account. Find the details in: https://cloud.oracle.com/database

 

Can I become OCM Cloud at these times?

Answer: you can but just if you have already approved the 1Z0-028 exam before May2017. If you have approved the mentioned exam you can complete actually the path.

If you did not  approve the exam 1Z0-028 you will not able to complete the path since the exam 1Z0-028 is already retired.

 

This is the path to achieve the OCM Cloud:

path01.jpg

maca02.jpg

 

If you want to be updated with all our articles send us the Invitation or Follow us:

Joel Perez’s LinkedIn: www.linkedin.com/in/SirDBaaSJoelPerez

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

or Join our LinkedIn group: Oracle Cloud DBaaS

 

Full Index of Oracle Cloud Articles:

Sir.CloudDBaaSjoelperez

 

Author Bios:

 

Joel Pérez is an Expert DBA ( Oracle ACE Director, Maximum Availability OCM, OCM Cloud Admin. & OCM12c/11g ) with over 17 years of Real World Experience in Oracle Technology, specialised in design and implement solutions of: High Availability, Disaster Recovery, Upgrades, Replication, Cloud and all area related to Oracle Databases. International consultant with duties, conferences & activities in more than 50 countries and countless clients around the world. Habitual and one of leading writers of Technical Oracle articles for: OTN Spanish, Portuguese, English and more. Regular Speaker in worldwide Oracle events  like: OTN LAD (Latin America), OTN MENA (Middle East & Africa), OTN APAC ( Asian Pacific), DTCC China, Oracle Code.. . Joel has always been known for being a pioneer in Oracle technology since the early days of his career being the first Latin American awarded as “OTN Expert” at year 2003 by Oracle Corp., one of the first “Oracle ACE” globally in the Oracle ACE Program at year 2004. He was honoured as one of the first “OCM Database Cloud Administrator” & Maximum Availability OCM in the world. Currently Joel works as Senior Cloud Database Architect in “Yunhe Enmo (Beijing) Technology Co.,Ltd”., company located in Beijing, China En.enmotech.com

 

Skant Gupta is an Oracle Certified Cloud Professional in Oracle Database 12c, an Oracle Certified Expert in Oracle Real Application Clusters (Oracle RAC) in Oracle Database 11g and 12c, and an Oracle Exadata Certified and an Oracle Certified Professional in Oracle Database 10g, 11g, and 12c. He works at Vodafone Technology in the UK and formerly worked as a senior DBA at Etisalat in Dubai. He has six years of experience with various Oracle technologies, focusing mainly on Cloud, database, and high availability solutions, Oracle WebLogic Suite, Oracle Exadata and Oracle GoldenGate. He has presented at several Oracle user groups worldwide, most recently in the US, the United Arab Emirates, and the India. Skant website link: oracle-help.com

By Joel Peréz ACED.gif& Kamus Zhang ACED.gif

 

This article is brought by en.enmotech.com

Subscribe to our Oracle Cloud Blog: blog.enmotech.com

Follow us in Enmotech LinkedIn Page: https://www.linkedin.com/company/1856106/

 

Almost every day We receive messages in our linkedIn account asking a guide.. etc about “How to Start into DBaaS”. If you are reading this article, perhaps you have done the same question or simply you are interested in how to start to manage databases in Cloud.

 

Before continue this article, We invite you to be part of our network where almost every day We share technical content about Oracle Databases and mainly related to Oracle Database Cloud technology.

 

Send us the Invitation or Follow us:

Joel Perez’s LinkedIn: www.linkedin.com/in/SirDBaaSJoelPerez

Kamus Zhang’s LinkedIn: https://www.linkedin.com/in/kamus/

 

Joel Pérez’s Blog: https://community.oracle.com/blogs/Sir.DBaaSJoelPerez

 

Now, we can continue..

 

Start to try with databases in Cloud is considerably easy and thousands of people has done it.. but few of them understand the deep concept behind all this.

 

Our advice is:  first understand the concept of Oracle Cloud and the “Why” of Oracle Cloud.

DBAs do nothing if they can create a database in the Cloud and they do not understand the “why” of all this.

 

Something very important DBAs must take into account in advance when they will work in Cloud is the following:

In a general way the wizards in Oracle Cloud are very efficient and easy to use, they save us tons of job hours that normally we had to carry out when we are working with "On-Prem" databases but they can not do everything at 100%, so.. your expertise must be combined between use the wizards and doing manual tasks, for example related to Oracle Data Guard, you can create a Disaster Recovery configuration using the wizard but just a simple configuration.. if you want build a logical standby.. configure "Far Sync.." and more you have to do it manually.. so.. at the end the Cloud represent between many things.. a way to perform tasks faster in some way with all the capabilities of Cloud ( Scalability, Reliability and more ) but as I mentioned.. the wizards can not do everything at 100% so.. in order to play at 100% in Cloud you have to be already a skilled DBA with "On-Prem" databases.

 

Create a database in Cloud without understanding the concept it could be alike to a tourist that visits a country without knowing anything of that country.. that person can be there.. can touch.. can see but "can not" understand.. the same happen with Oracle Database Cloud.

 

We have been working as Oracle DBA from around 18 years ago.. almost at the beginning of my career there was already that kind of Data Centers where you had the possibility to rent a space to lodge your server(s).. etc.. and the way to access them was across internet.. they had to have a public IP.. that already existed from y e a r s... ago.. in that case it could be said that we have a server in Cloud.. or the components inside of that server in Cloud, but really that's not the concept of Cloud at 100%. So.. if that is not Cloud.. What is Cloud ? What is.. What represent a database in Cloud?

All those things is what you have to clarify to start your journey as Cloud DBA.

 

In order to understand the concept of Cloud, the history.. the evolution and more, I recommend to look for videos in youtube that talks about it, mainly videos from the main protagonists of Oracle Technology: Larry Ellison, Mark V. Hurd, Andy Mendelsohn and more. We recommend you to use the keyword “Keynote” in order to find the best ones.

 

According to my criterion that’s the first step a DBA must do before even to ask a Cloud Trial account.

 

The concept of Cloud is very interesting and deep.. It’s the present and the future.

 

One of the main sentences I always say and repeat in my conferences, webinars, webcasts.. and more is:

 

“A DBA to be expert in Cloud, mandatory first must be expert with “On-premises” databases..”

Joel Pérez

 

Many people tell me in chats.. in LinkedIn.. facebook.. etc..

“Eyyy Joel.. , barely and I’m OCA.. later I will get the OCP and later of that I go for Cloud Certifications..”

Perhaps studying the appropriate material you could approve it but at the time of designing a project.. a complex task in Cloud.. etc.. it could be so difficult to take the right decisions if you do not have enough experience with “On-Prem” databases.

 

You could create a Disaster Recovery configuration with Oracle Data Guard in minutes using DBCS ( Database Cloud Service ), it could be a Single instance combination Cloud-Cloud or the same but using RAC. That can be done so easy and fast. You go across the wizard.. and in minutes you will have a Cloud compute node with your primary database and another Cloud compute node with your standby database ( Physical Standby ).

 

What about if a task requires to have one primary database and two physical standby databases ??

Can you do it with the wizard.. ??

The answer is: No, you can  not do it with the wizard..!!

You have several options.. you could create the initial configuration of primary and Standby DB1 with the wizard, later you have to create a Cloud DB service for having the second Standby Cloud Compute node, the DB created there, it will be a dummy database.. you have to replace it later.. all those tasks must be done manually.. there are no wizards to that that job in Cloud, the further registration in the Data Guard Broker and more must be done manually..

 

So.. when and where you learn that kind of manual tasks.. ?

When: when you were working with “On-prem” Databases

Where: in your “On-prem” environment

 

So.. based on that and more, you can realize easily that the Cloud DBA “MUST BE EXPERT FIRST WITH ON-PREM DATABASES.. YOU CAN NOT JUMP INTO THE CLOUD IF YOU ARE A ROOKIE DBA..”

 

First learn “VERY WELL” the typical tasks with “On-prem” databases and later you can go to look for performing tasks in Cloud.

 

We wrote it un uppercase because I have always to clarify and argue that point in conversations related to DBCS.

 

So.. what are the typical tasks that most of DBAs must master before going to the Cloud ?

The typical tasks and areas found in the Oracle University Training for becoming OCA & OCP, not necessarily you have to attend those trainings.. just check the content and make sure you have the skills to cover all those areas.

 

One example more.. there are people asking me how they can transport a terabyte database to Cloud. There are several options, one of them is to use RMAN to backup/restore the database taking into the account the backupset’s sizes. The backupset’s sizes must be determined based on the network bandwidth and other factors, to perform this we have to use the “BACKUP SECTION SIZE..” of RMAN.

So.. sometimes people say or ask.. “BACKUP SECTION SIZE”?? what is that.. what I do with that..??

So.. my answer is.. “IF YOU ARE NOT ENOUGH EXPERIMENTED WITH ON-PREM DATABASES.. DO NOT THINK YOU CAN DO EFFICIENTLY THINGS RELATED TO CLOUD..”

 

So.. I think the idea is very clear after reading this lines.. so.. if you are one more people that wants to jump into the Databases in the Cloud and you are not already experimented with “On-prem” databases.. then.. learn first the ABC of administering regular Oracle Databases.

 

We hope this article can be useful and see you at next one!

 

Author Bio:

 

Joel Pérez is an Expert DBA ( Oracle ACE Director, Maximum Availability OCM, OCM Cloud Admin. & OCM12c/11g ) with over 17 years of Real World Experience in Oracle Technology, specialised in design and implement solutions of: High Availability, Disaster Recovery, Upgrades, Replication, Cloud and all area related to Oracle Databases. International consultant with duties, conferences & activities in more than 50 countries and countless clients around the world. Habitual and one of leading writers of Technical Oracle articles for: OTN Spanish, Portuguese, English and more. Regular Speaker in worldwide Oracle events  like: OTN LAD (Latin America), OTN MENA (Middle East & Africa), OTN APAC ( Asian Pacific), DTCC China, Oracle Code.. . Joel has always been known for being a pioneer in Oracle technology since the early days of his career being the first Latin American awarded as “OTN Expert” at year 2003 by Oracle Corp., one of the first “Oracle ACE” globally in the Oracle ACE Program at year 2004. He was honoured as one of the first “OCM Database Cloud Administrator” & Maximum Availability OCM in the world. Currently Joel works as Senior Cloud Database Architect in “Yunhe Enmo (Beijing) Technology Co.,Ltd”., company located in Beijing, China En.enmotech.com

 

Kamus Zhang

General Manager of Technical Services/Vice Managing Director of Yunhe Enmo (Beijing)
Co-founder of ACOUG (All China Oracle User Group). Kamus joined Enmotech in 2010 and has been the Vice Managing Director since 2015. Enmotech is the leading Oracle services, education and solutions company on the Chinese mainland, employing six Oracle ACE directors and three Oracle ACEs. Kamus began his career as a software developer in 1998. He became an Oracle ACE in 2007 and was promoted to Oracle ACE Director in 2011. Kamus enjoys studying new technologies and sharing his knowledge with the Oracle community in China. He is a co-translator of the Chinese version of Expert Oracle Exadata, which is the first book about Exadata published in Chinese. Kamus lives in Beijing, China and in his rare free time he travels with his family around the world, with Japan being his favorite country to visit. He is also a Blizzard game fan, first playing World of Warcraft several years ago and now Hearthstone. Check out his blog: http://www.dbform.com.

By Joel Peréz ACED.gifSkant Gupta

 

This article is brought by en.enmotech.com

 

Before reading this article, we advise you to read this one:

#1 Oracle Cloud (DBaaS): Oracle Data Guard in Database Cloud Service ( DBCS )

 

And as a Cloud Topic related you can read here as well one of our hotest articles:

 

In this this article we will show the necessary steps to perform Switchover, Failover & Reinstate Operations with the DBCS Console.

 

Performing a Switchover Operation

A switchover operation enables the primary database to switch roles with its standby database. There is no data loss during a switchover. After a switchover, each database continues to participate in the Oracle Data Guard configuration in its new role. A switchover is typically used to reduce primary database downtime during planned outages, such as operating system or hardware upgrades, or rolling upgrades of the Oracle database software and patch sets.

 

Steps to Perform a Switchover Operation

 

  1. Open the Oracle Database Cloud Service console.

7.JPG

Figure 7: service console

 

   2. In the list of deployments, click the name of the database deployment you want to perform the switchover on. The Oracle Database Cloud Service Overview page is displayed.

8.JPG

Figure 8: service overview

 

   3. To ensure the Overview page reflects the current role of each database, click the Refresh Configuration icon.

9.jpg

Figure 9: Refresh Configuration

 

  4. From the  menu for one of the database deployment’s compute nodes, select Switchover, and then confirm the action.

10.JPG

Figure 10: perform switchover

 

   5. The deployment has a status of Maintenance in the Oracle Database Cloud Service console until the switchover is complete.

11.JPG

Figure 11: maintenance status

 

   6. Refresh the page occasionally. Database Role will be updated to reflect the new role for each database.

12.JPG

Figure 12: Database Role Changed

 

Performing a Manual Failover Operation

A failover operation changes a standby database to the primary role in response to a primary database failure. If the primary database was not operating in either maximum protection mode or maximum availability mode before the failure, some data loss may occur. If Flashback Database is enabled on the primary database, it can be reinstated as a standby for the new primary database once the reason for the failure is corrected. A failover is typically used only when the primary database becomes unavailable, and there is no possibility of restoring it to service within a reasonable period of time.

 

Steps to Perform a Failover Operation

 

    1. Open the Oracle Database Cloud Service console.

13.JPG

Figure 13: DBCS console

 

    2. In the list of deployments, click the name of the database deployment you want to perform the failover on. The Oracle Database Cloud Service Overview page is displayed.

14.JPG

Figure 14: service overview

 

   3. To ensure the Overview page reflects the current role of each database, click the Refresh Configuration icon.

15.jpg

Figure 15: Refresh Configuration

 

  4. From the  menu for one of the database deployment’s compute nodes, select Failover, and then confirm the action.

16.JPG

Figure 16: perform failover

 

   5. The deployment has a status of Maintenance in the Oracle Database Cloud Service console until the failover is complete.

17.JPG

Figure 17: maintenance status

 

   6. Refresh the page occasionally. Database Role will be updated to reflect the new role for each database.

18.JPG

Figure 18: Failover completed

 

Performing a Reinstating a Failed Primary Database

After performing a failover to the standby database, you may be able to restore your original disaster-recovery solution by reinstating the failed primary database. You can use the Data Guard broker's reinstate capability to make the failed primary database a viable standby database for the new primary.

 

Steps to Perform a Reinstating a Failed Primary Database

 

      1. Open the Oracle Database Cloud Service console.

19.JPG

Figure 19: service console

 

      2. In the list of deployments, click the name of the database deployment you want to perform the reinstate on. The Oracle Database Cloud Service Overview page is displayed.

20.JPG

Figure 20: service overview

 

      3. To ensure the Overview page reflects the current role of each database, click the Refresh Configuration icon.

21.jpg

Figure 21: Refresh Configuration

 

      4. From the  menu for one of the database deployment’s compute nodes, select Reinstate, and then confirm the action.

22.JPG

Figure 22: perform reinstate

 

      5. The deployment has a status of Maintenance in the Oracle Database Cloud Service console until the failover is complete.

23.JPG

Figure 23: maintenance status

 

      6. Refresh the page occasionally. Database Role will be updated to reflect the new role for each database.

24.JPG

Figure 24: Reinstate completed

 

Conclusion

So, now you know that it is very easy to perform Switchover, Failover & Reinstate Operations with Console. The next and last part of this article, we will see the necessary steps to perform Switchover, Failover & Reinstate Operations with dbaascli utility.

If you want to be updated with remarkable articles and information about Oracle Database Cloud, Join our network, we will be please to have you there:

Joel Pérez: www.linkedin.com/in/acedjoelperez

Skant Gupta: www.linkedin.com/in/skantali/

 

Author Bios:

 

Joel Pérez is an Expert DBA ( Oracle ACE Director, Maximum Availability OCM, OCM Cloud Admin. & OCM12c/11g ) with over 17 years of Real World Experience in Oracle Technology, specialised in design and implement solutions of: High Availability, Disaster Recovery, Upgrades, Replication, Cloud and all area related to Oracle Databases. International consultant with duties, conferences & activities in more than 50 countries and countless clients around the world. Habitual and one of leading writers of Technical Oracle articles for: OTN Spanish, Portuguese, English and more. Regular Speaker in worldwide Oracle events  like: OTN LAD (Latin America), OTN MENA (Middle East & Africa), OTN APAC ( Asian Pacific), DTCC China, Oracle Code.. . Joel has always been known for being a pioneer in Oracle technology since the early days of his career being the first Latin American awarded as “OTN Expert” at year 2003 by Oracle Corp., one of the first “Oracle ACE” globally in the Oracle ACE Program at year 2004. He was honoured as one of the first “OCM Database Cloud Administrator” & Maximum Availability OCM in the world. Currently Joel works as Senior Cloud Database Architect in “Yunhe Enmo (Beijing) Technology Co.,Ltd”., company located in Beijing, China En.enmotech.com

 

Skant Gupta is an Oracle Certified Cloud Professional in Oracle Database 12c, an Oracle Certified Expert in Oracle Real Application Clusters (Oracle RAC) in Oracle Database 11g and 12c, and an Oracle Exadata Certified and an Oracle Certified Professional in Oracle Database 10g, 11g, and 12c. He works at Vodafone Technology in the UK and formerly worked as a senior DBA at Etisalat in Dubai. He has six years of experience with various Oracle technologies, focusing mainly on Cloud, database, and high availability solutions, Oracle WebLogic Suite, Oracle Exadata and Oracle GoldenGate. He has presented at several Oracle user groups worldwide, most recently in the US, the United Arab Emirates, and the India. Skant website link: oracle-help.com