Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Moving your Oracle Databases to the Oracle Cloud

131 views

Published on

Moving your Oracle Databases to the Oracle Cloud

Published in: Technology
  • Be the first to comment

Moving your Oracle Databases to the Oracle Cloud

  1. 1. Session ID: Prepared by: MOVING YOUR ORACLE DATABASES TO ORACLE CLOUD 456 Alex Zaballa, Accenture Enkitec Group @alexzaballa
  2. 2. MOVING YOUR ORACLE DATABASES TO ORACLE CLOUD Alex Zaballa
  3. 3. Copyright © 2016 Accenture All rights reserved. | 3 Alex Zaballa http://alexzaballa.blogspot.com/ @alexzaballa https://www.linkedin.com/in/alexzaballa
  4. 4. Copyright © 2016 Accenture All rights reserved. | 4 http://www.laouc.org/latin-american-otn-call-for-papers/
  5. 5. Copyright © 2016 Accenture All rights reserved. | 5 Worked for 7 years in Brazil as an Oracle Developer. 2000 - 2007 Worked for 8 years in Angola as an Oracle DBA for the Ministry of Finance. 2007 - 2015
  6. 6. Copyright © 2016 Accenture All rights reserved. | 6
  7. 7. Copyright © 2016 Accenture All rights reserved. | 7 ORACLE DATABASE CLOUD CLOUD 101
  8. 8. Copyright © 2016 Accenture All rights reserved. | 8 CLOUD Will the Database Cloud ”Kill” the DBA?
  9. 9. Copyright © 2016 Accenture All rights reserved. | 9 CLOUD My Opinion is NO The DBA will be more specialized: - Application DBA - Architecture DBA - Performance and Tuning DBA - Big Data DBA
  10. 10. Copyright © 2016 Accenture All rights reserved. | 10 ORACLE DATABASE CLOUD COMMON USE CASES • Dev/Test/UAT • Backup to the Cloud
  11. 11. Copyright © 2016 Accenture All rights reserved. | 11 ORACLE DATABASE CLOUD COMMON USE CASES • Disaster Recovery to the Cloud
  12. 12. Copyright © 2016 Accenture All rights reserved. | 12 ORACLE DATABASE CLOUD COMMON USE CASES ? • Business Critical Workloads in the Cloud
  13. 13. Copyright © 2016 Accenture All rights reserved. | 13 ORACLE DATABASE CLOUD CLOUD 101 Infrastructure as a Service (IaaS) Platform as a Service (PaaS) Database as a Service (Dbaas) Software as a Service (SaaS)
  14. 14. Copyright © 2016 Accenture All rights reserved. | 14 ORACLE DATABASE CLOUD • Oracle Database Cloud Service • Oracle Database Cloud Service – Bare Metal • Oracle Database Exadata Cloud Service • Oracle Database Exadata Cloud Machine • Oracle Database Exadata Express Cloud Service – Managed • Oracle Database Schema Cloud Service - Managed https://cloud.oracle.com/database
  15. 15. Copyright © 2016 Accenture All rights reserved. | 15 ORACLE DATABASE CLOUD BARE METAL Dedicated Server Leverage the full power of a dedicated bare metal server without any noisy neighbor or virtualization overhead for your database needs.
  16. 16. Copyright © 2016 Accenture All rights reserved. | 16 ORACLE DATABASE EXADATA CLOUD SERVICE Oracle Database Exadata Cloud Service provides full Oracle Databases hosted on Oracle Exadata Database Machine inside the Oracle Cloud.
  17. 17. Copyright © 2016 Accenture All rights reserved. | 17 ORACLE DATABASE EXADATA CLOUD MACHINE Exadata Cloud Machine or ExaCM is the cloud- based Oracle Database subscription service available on Oracle Exadata, but deployed in the customer data center behind their firewall.
  18. 18. Copyright © 2016 Accenture All rights reserved. | 18 ORACLE DATABASE EXADATA EXPRESS CLOUD SERVICE Delivers a managed Oracle Database 12c Release 2 Enterprise Edition running on Oracle Exadata engineered systems for small to medium sized data. **No SmartScan
  19. 19. Copyright © 2016 Accenture All rights reserved. | 19 ORACLE DATABASE SCHEMA CLOUD SERVICE The "Schema as a Service" model was the first DBaaS offering delivered on the Oracle Cloud and it provides a single schema.
  20. 20. Copyright © 2016 Accenture All rights reserved. | 20 ORACLE DATABASE CLOUD SERVICE SOFTWARE EDITIONS
  21. 21. Copyright © 2016 Accenture All rights reserved. | 21 ORACLE DATABASE CLOUD SERVICE https://cloud.oracle.com/
  22. 22. Copyright © 2016 Accenture All rights reserved. | 22 ORACLE DATABASE CLOUD SERVICE https://cloud.oracle.com/
  23. 23. Copyright © 2016 Accenture All rights reserved. | 23 ORACLE DATABASE CLOUD SERVICE
  24. 24. Copyright © 2016 Accenture All rights reserved. | 24 ORACLE DATABASE CLOUD SERVICE
  25. 25. Copyright © 2016 Accenture All rights reserved. | 25 ORACLE DATABASE CLOUD SERVICE
  26. 26. Copyright © 2016 Accenture All rights reserved. | 26 ORACLE DATABASE CLOUD SERVICE
  27. 27. Copyright © 2016 Accenture All rights reserved. | 27 ORACLE DATABASE CLOUD SERVICE
  28. 28. Copyright © 2016 Accenture All rights reserved. | 28 ORACLE DATABASE CLOUD SERVICE
  29. 29. Copyright © 2016 Accenture All rights reserved. | 29 ORACLE DATABASE CLOUD SERVICE
  30. 30. Copyright © 2016 Accenture All rights reserved. | 30 ORACLE DATABASE CLOUD SERVICE
  31. 31. Copyright © 2016 Accenture All rights reserved. | 31 ORACLE DATABASE CLOUD SERVICE
  32. 32. Copyright © 2016 Accenture All rights reserved. | 32 ORACLE DATABASE CLOUD SERVICE
  33. 33. Copyright © 2016 Accenture All rights reserved. | 33 ORACLE DATABASE CLOUD SERVICE Generating an SSH Key Pair on Windows Using the PuTTYgen Program
  34. 34. Copyright © 2016 Accenture All rights reserved. | 34 ORACLE DATABASE CLOUD SERVICE Generating an SSH Key Pair on UNIX and UNIX-Like Platforms Using the ssh-keygen Utility
  35. 35. Copyright © 2016 Accenture All rights reserved. | 35 ORACLE DATABASE CLOUD SERVICE
  36. 36. Copyright © 2016 Accenture All rights reserved. | 36 ORACLE DATABASE CLOUD SERVICE
  37. 37. Copyright © 2016 Accenture All rights reserved. | 37 ORACLE DATABASE CLOUD SERVICE
  38. 38. Copyright © 2016 Accenture All rights reserved. | 38 ORACLE DATABASE CLOUD SERVICE
  39. 39. Copyright © 2016 Accenture All rights reserved. | 39 ORACLE DATABASE CLOUD SERVICE
  40. 40. Copyright © 2016 Accenture All rights reserved. | 40 ORACLE DATABASE CLOUD SERVICE
  41. 41. Copyright © 2016 Accenture All rights reserved. | 41 ORACLE DATABASE CLOUD SERVICE
  42. 42. Copyright © 2016 Accenture All rights reserved. | 42 ORACLE DATABASE CLOUD SERVICE
  43. 43. Copyright © 2016 Accenture All rights reserved. | 43 ORACLE DATABASE CLOUD SERVICE
  44. 44. Copyright © 2016 Accenture All rights reserved. | 44 ORACLE DATABASE CLOUD SERVICE DETERMINE COMPUTE SHAPE
  45. 45. Copyright © 2016 Accenture All rights reserved. | 45 ORACLE DATABASE CLOUD SERVICE DETERMINE COMPUTE SHAPE
  46. 46. Copyright © 2016 Accenture All rights reserved. | 46 ORACLE DATABASE CLOUD SERVICE DETERMINE COMPUTE SHAPE Use Database Consolidation Workbench **Database Consolidation Workbench requires the Database Diagnostics pack license.
  47. 47. Copyright © 2016 Accenture All rights reserved. | 47 ORACLE DATABASE CLOUD SERVICE DETERMINE COMPUTE SHAPE Ok! Now we have the definition of CPUs, Memory and Storage equivalent in the Oracle Cloud.
  48. 48. Copyright © 2016 Accenture All rights reserved. | 48 ORACLE DATABASE CLOUD SERVICE DATA LOADING INTO THE CLOUD Basically, it depends on the Cloud Service that I’m using.
  49. 49. Copyright © 2016 Accenture All rights reserved. | 49 ORACLE DATABASE CLOUD SERVICE DATA LOADING INTO A DATABASE/EXADATA CLOUD SERVICE • SQL*Loader • Import/export • Oracle Data Pump Export/Import Utility • Transportable Tablespaces • Pluggable Databases (PDBs)  Remote Cloning  Lift and Shift • APEX/SQL Developer Data Loaders • External Tables • Dataguard • GoldenGate • REST Services • Enterprise Manager (12cR5 or 13c) • Bulk Data Transfer
  50. 50. Copyright © 2016 Accenture All rights reserved. | 50 ORACLE DATABASE CLOUD CHOOSING A MIGRATION METHOD 1 - Database version of your on-premises database: • Oracle Database 11g Release 2 version lower than 11.2.0.3 • Oracle Database 11g Release 2 version 11.2.0.3 or higher • Oracle Database 12c Release 1 version lower than 12.1.0.2 • Oracle Database 12c Release 1 version 12.1.0.2 or higher 2 - For on-premises Oracle Database 12c Release 1 databases, the architecture of the database: • Multitenant container database (CDB) • Non-CDB
  51. 51. Copyright © 2016 Accenture All rights reserved. | 51 ORACLE DATABASE CLOUD CHOOSING A MIGRATION METHOD 3 - Endian format (byte ordering) of your on-premises database’s host platform 4 - Database character set of your on-premises database and Oracle Database Cloud Service database 5 - Database version of the Oracle Database Cloud database you are migrating to: • Oracle Database 11g Release 2 • Oracle Database 12c Release 1
  52. 52. Copyright © 2016 Accenture All rights reserved. | 52 ORACLE DATABASE CLOUD MIGRATING FROM ORACLE DATABASE 11G TO ORACLE DATABASE 11G IN THE CLOUD • Data Pump Conventional Export/Import • Data Pump Transportable Tablespace • RMAN Transportable Tablespace with Data Pump • RMAN CONVERT Transportable Tablespace with Data Pump
  53. 53. Copyright © 2016 Accenture All rights reserved. | 53 ORACLE DATABASE CLOUD MIGRATING FROM ORACLE DATABASE 11G TO ORACLE DATABASE 12C IN THE CLOUD • Data Pump Conventional Export/Import • Data Pump Transportable Tablespace • RMAN Transportable Tablespace with Data Pump • RMAN CONVERT Transportable Tablespace with Data Pump • Data Pump Full Transportable
  54. 54. Copyright © 2016 Accenture All rights reserved. | 54 ORACLE DATABASE CLOUD MIGRATING FROM ORACLE DATABASE 12C CDB TO ORACLE DATABASE 12C IN THE CLOUD • Data Pump Conventional Export/Import • Data Pump Transportable Tablespace • RMAN Transportable Tablespace with Data Pump • RMAN CONVERT Transportable Tablespace with Data Pump • RMAN Cross-Platform Transportable Tablespace Backup Sets • Data Pump Full Transportable • Unplugging/Plugging (CDB) • Remote Cloning (CDB) • RMAN Cross-Platform Transportable PDB • SQL Developer and SQL*Loader to Migrate Selected Objects • SQL Developer and INSERT Statements to Migrate Selected Objects
  55. 55. Copyright © 2016 Accenture All rights reserved. | 55 ORACLE DATABASE CLOUD MIGRATING FROM ORACLE DATABASE 12C NON-CDB TO ORACLE DATABASE 12C IN THE CLOUD • Data Pump Conventional Export/Import • Data Pump Transportable Tablespace • RMAN Transportable Tablespace with Data Pump • RMAN CONVERT Transportable Tablespace with Data Pump • RMAN Cross-Platform Transportable Tablespace Backup Sets • Data Pump Full Transportable • Unplugging/Plugging (CDB) • Remote Cloning (non-CDB) • SQL Developer and SQL*Loader to Migrate Selected Objects • SQL Developer and INSERT Statements to Migrate Selected Objects
  56. 56. Copyright © 2016 Accenture All rights reserved. | 56 ORACLE DATABASE CLOUD CHOOSING A MIGRATION METHOD https://d0.awsstatic.com/whitepapers/strategies-for-migrating-oracle-database-to-aws.pdf
  57. 57. Copyright © 2016 Accenture All rights reserved. | 57 ORACLE DATABASE CLOUD CHOOSING A MIGRATION METHOD Downtime?
  58. 58. Copyright © 2016 Accenture All rights reserved. | 58 ORACLE DATABASE CLOUD DATA PUMP CONVENTIONAL EXPORT/IMPORT You can use this method regardless of the endian format and database character set of the on-premises database.
  59. 59. Copyright © 2016 Accenture All rights reserved. | 59 ORACLE DATABASE CLOUD DATA PUMP CONVENTIONAL EXPORT/IMPORT On-premises host: mkdir /u01/app/oracle/admin/orcl/dpdump/for_cloud sqlplus user/password CREATE DIRECTORY dp_for_cloud AS '/u01/app/oracle/admin/orcl/dpdump/for_cloud'; expdp user/password SCHEMAS=fsowner DIRECTORY=dp_for_cloud
  60. 60. Copyright © 2016 Accenture All rights reserved. | 60 ORACLE DATABASE CLOUD DATA PUMP CONVENTIONAL EXPORT/IMPORT Database Cloud Service compute node: mkdir /u01/app/oracle/admin/ORCL/dpdump/from_onprem On-premises host: scp –i private_key_file /u01/app/oracle/admin/orcl/dpdump/for_cloud/expdat.dmp oracle@IP_address_DBaaS_VM:/u01/app/oracle/admin/ORCL/dpdump/from_onprem Database Cloud Service compute node: sqlplus user/password CREATE DIRECTORY dp_from_onprem AS '/u01/app/oracle/admin/ORCL/dpdump/from_onprem'; impdp user/password SCHEMAS=fsowner DIRECTORY=dp_from_onprem
  61. 61. Copyright © 2016 Accenture All rights reserved. | 61 ORACLE DATABASE CLOUD DATA PUMP TRANSPORTABLE TABLESPACE You can use this method only if the on-premises platform is little endian, and the database character sets of your on-premises database and Oracle Database Cloud Service database are compatible.
  62. 62. Copyright © 2016 Accenture All rights reserved. | 62 ORACLE DATABASE CLOUD DATA PUMP TRANSPORTABLE TABLESPACE On-premises host: mkdir /u01/app/oracle/admin/orcl/dpdump/for_cloud sqlplus user/password CREATE DIRECTORY dp_for_cloud AS '/u01/app/oracle/admin/orcl/dpdump/for_cloud'; ALTER TABLESPACE fsindex READ ONLY; ALTER TABLESPACE fsdata READ ONLY; expdp user/password TRANSPORT_TABLESPACES=fsdata,fsindex TRANSPORT_FULL_CHECK=YES DIRECTORY=dp_for_cloud
  63. 63. Copyright © 2016 Accenture All rights reserved. | 63 ORACLE DATABASE CLOUD DATA PUMP TRANSPORTABLE TABLESPACE Database Cloud Service compute node: mkdir /u01/app/oracle/admin/ORCL/dpdump/from_onprem On-premises host: $ scp -i private_key_file /u01/app/oracle/admin/orcl/dpdump/for_cloud/expdat.dmp oracle@IP_address_DBaaS_VM:/u01/app/oracle/admin/ORCL/dpdump/from_onprem $ scp -i private_key_file /u01/app/oracle/oradata/orcl/fsdata01.dbf oracle@IP_address_DBaaS_VM:/u02/app/oracle/oradata/ORCL $ scp -i private_key_file /u01/app/oracle/oradata/orcl/fsindex01.dbf oracle@IP_address_DBaaS_VM:/u02/app/oracle/oradata/ORCL ALTER TABLESPACE fsdata READ WRITE; ALTER TABLESPACE fsindexREAD WRITE;
  64. 64. Copyright © 2016 Accenture All rights reserved. | 64 ORACLE DATABASE CLOUD DATA PUMP TRANSPORTABLE TABLESPACE Database Cloud Service compute node: CREATE DIRECTORY dp_from_onprem AS '/u01/app/oracle/admin/ORCL/dpdump/from_onprem'; SQL> CREATE USER fsowner PROFILE default IDENTIFIED BY fspass TEMPORARY TABLESPACE temp ACCOUNT UNLOCK; impdp user/password DIRECTORY=dp_from_onprem TRANSPORT_DATAFILES='/u02/app/oracle/oradata/ORCL/fsdata01.dbf', '/u02/app/oracle/oradata/ORCL/fsindex01.dbf’ ALTER TABLESPACE fsdata READ WRITE; ALTER TABLESPACE fsindex READ WRITE;
  65. 65. Copyright © 2016 Accenture All rights reserved. | 65 ORACLE DATABASE CLOUD DATA PUMP FULL TRANSPORTABLE You can use this method only if the source database release version is 11.2.0.3 or later, and the database character sets of your on-premises database and Oracle Database Cloud Service database are compatible.
  66. 66. Copyright © 2016 Accenture All rights reserved. | 66 ORACLE DATABASE CLOUD DATA PUMP FULL TRANSPORTABLE On-premises host: mkdir /u01/app/oracle/admin/orcl/dpdump/for_cloud sqlplus user/password CREATE DIRECTORY dp_for_cloud AS '/u01/app/oracle/admin/orcl/dpdump/for_cloud'; Determine the name(s) of the tablespaces and data files that belong to the user-defined tablespaces by querying DBA_DATA_FILES and make then read only: ALTER TABLESPACE fsdata READ ONLY; ALTER TABLESPACE fsindex READ ONLY; ALTER TABLESPACE users READ ONLY; expdp system/password FULL=y TRANSPORTABLE=always VERSION=12 DUMPFILE=expdat.dmp DIRECTORY=dp_for_cloud
  67. 67. Copyright © 2016 Accenture All rights reserved. | 67 ORACLE DATABASE CLOUD DATA PUMP FULL TRANSPORTABLE Database Cloud Service compute node: mkdir /u01/app/oracle/admin/ORCL/dpdump/from_source On-premises host: $ scp -i private_key_file /u01/app/oracle/oradata/orcl/fsdata01.dbf oracle@compute_node_IP_address:/u02/app/oracle/oradata/ORCL/PDB2 $ scp -i private_key_file /u01/app/oracle/oradata/orcl/fsindex01.dbf oracle@compute_node_IP_address:/u02/app/oracle/oradata/ORCL/PDB2 $ scp -i private_key_file /u01/app/oracle/oradata/orcl/users01.dbf oracle@compute_node_IP_address:/u02/app/oracle/oradata/ORCL/PDB2 ALTER TABLESPACE fsdata READ WRITE; ALTER TABLESPACE fsindex READ WRITE; ALTER TABLESPACE users READ WRITE;
  68. 68. Copyright © 2016 Accenture All rights reserved. | 68 ORACLE DATABASE CLOUD DATA PUMP FULL TRANSPORTABLE Database Cloud Service compute node: CREATE DIRECTORY dp_from_source AS '/u01/app/oracle/admin/ORCL/dpdump/from_source'; impdp system@PDB2 FULL=y DIRECTORY=dp_from_source TRANSPORT_DATAFILES= '/u02/app/oracle/oradata/ORCL/PDB2/fsdata01.dbf', '/u02/app/oracle/oradata/ORCL/PDB2/fsindex01.dbf,' '/u02/app/oracle/oradata/ORCL/PDB2/users01.dbf'
  69. 69. Copyright © 2016 Accenture All rights reserved. | 69 ORACLE DATABASE CLOUD ORACLE SQL*LOADER
  70. 70. Copyright © 2016 Accenture All rights reserved. | 70 ORACLE DATABASE CLOUD ORACLE SQL*LOADER sqlplus scott/tiger CREATE TABLE emp (empno number(5), name varchar2(50), sal number(10,2), jdate date);
  71. 71. Copyright © 2016 Accenture All rights reserved. | 71 ORACLE DATABASE CLOUD ORACLE SQL*LOADER emp.ctl LOAD DATA INFILE '/u01/oracle/emp.csv’ BADFILE ‘/u01/oracle/emp.bad’ DISCARDFILE ‘/u01/oracle/emp.dsc’ INSERT INTO TABLE emp FIELDS TERMINATED BY “,” OPTIONALLY ENCLOSED BY ‘”’ TRAILING NULLCOLS (empno,name,sal,jdate date ‘mm/dd/yyyy’) sqlldr userid=scott/tiger control=emp.ctl log=emp.log
  72. 72. Copyright © 2016 Accenture All rights reserved. | 72 ORACLE DATABASE CLOUD ORACLE SQL*LOADER EXPRESS – 12C SQL> create table COMPANY (id NUMBER(1), name VARCHAR2(30)); Table created. [oracle@oracle01 tmp]$ cat COMPANY .dat 1,Company 1 2,Company 2 3,Company 3 4,Company 4 5,Company 5 6,Company 6 7,Company 7 8,Company 8 9,Company 9
  73. 73. Copyright © 2016 Accenture All rights reserved. | 73 ORACLE DATABASE CLOUD ORACLE SQL*LOADER EXPRESS – 12C [oracle@oracle01 tmp]$ sqlldr teste/teste TABLE=COMPANY SQL*Loader: Release 12.1.0.1.0 - Production on Sat Jan 11 12:16:28 2014 Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved. Express Mode Load, Table: COMPANY Path used: External Table, DEGREE_OF_PARALLELISM=AUTO Table COMPANY: 9 Rows successfully loaded.
  74. 74. Copyright © 2016 Accenture All rights reserved. | 74 ORACLE DATABASE CLOUD EXTERNAL TABLES
  75. 75. Copyright © 2016 Accenture All rights reserved. | 75 ORACLE DATABASE CLOUD EXTERNAL TABLES
  76. 76. Copyright © 2016 Accenture All rights reserved. | 76 ORACLE DATABASE CLOUD DATABASE LINKS
  77. 77. Copyright © 2016 Accenture All rights reserved. | 77 ORACLE DATABASE CLOUD DATABASE LINKS On-premises host: CREATE DATABASE LINK my_db_link CONNECT TO remote_user IDENTIFIED BY remote_password USING ’MyCloudDB'; CREATE TABLE tb_test@my_db_link as SELECT* FROM my_Table;
  78. 78. Copyright © 2016 Accenture All rights reserved. | 78 ORACLE DATABASE CLOUD DATABASE LINKS - CLONE A REMOTE PDB OR NON-CDB
  79. 79. Copyright © 2016 Accenture All rights reserved. | 79 ORACLE DATABASE CLOUD DATABASE LINKS - CLONE A REMOTE PDB OR NON-CDB You have to expose your on-premises database over the internet or have a VPN or SSH tunneling configured: CREATE DATABASE LINK clone_link CONNECT TO remote_clone_user IDENTIFIED BY remote_clone_user USING ’MyOnPremDB'; CREATE PLUGGABLE DATABASE pdb1 FROM pdb1@clone_link; CREATE PLUGGABLE DATABASE pdb2b FROM NON$CDB@clone_link;
  80. 80. Copyright © 2016 Accenture All rights reserved. | 80 ORACLE DATABASE CLOUD DATA GUARD
  81. 81. Copyright © 2016 Accenture All rights reserved. | 81 ORACLE DATABASE CLOUD DATA GUARD 1 - Create Physical Standby 2 – Prepare Client Connections (Ex: tnsnames.ora) 3 – Switchover to Physical Standby ***Enable SSH tunneling and also to make sure only specific on-premises IP addresses can access the listener port in the cloud Disaster Recovery to the Oracle Cloud http://www.oracle.com/technetwork/database/availability/dr-to-oracle-cloud-2615770.pdf
  82. 82. Copyright © 2016 Accenture All rights reserved. | 82 ORACLE DATABASE CLOUD DATA GUARD
  83. 83. Copyright © 2016 Accenture All rights reserved. | 83 ORACLE DATABASE CLOUD DATA GUARD SELECT log_mode FROM v$database; LOG_MODE ------------ NOARCHIVELOG SHUTDOWN IMMEDIATE; STARTUP MOUNT; ALTER DATABASE ARCHIVELOG; ALTER DATABASE OPEN; ALTER DATABASE FORCE LOGGING; On-premises host:
  84. 84. Copyright © 2016 Accenture All rights reserved. | 84 ORACLE DATABASE CLOUD DATA GUARD • Create standby redo logs on the primary database initially (recommended). • Create standby redo logs using the same file size as the primary database online redo logs. • Create one additional group more than the number of online redo log groups. ALTER DATABASE ADD STANDBY LOGFILE ('/u02/oradata/cdb1/standby_redo01.log') SIZE 50M; ALTER DATABASE ADD STANDBY LOGFILE ('/u02/oradata/cdb1/standby_redo02.log') SIZE 50M; ALTER DATABASE ADD STANDBY LOGFILE ('/u02/oradata/cdb1/standby_redo03.log') SIZE 50M; ALTER DATABASE ADD STANDBY LOGFILE ('/u02/oradata/cdb1/standby_redo04.log') SIZE 50M; On-premises host:
  85. 85. Copyright © 2016 Accenture All rights reserved. | 85 ORACLE DATABASE CLOUD DATA GUARD Init.ora: *.db_name='cdb1’ mkdir -p /u02/oradata/cdb1/pdbseed mkdir -p /u02/oradata/cdb1/pdb1 mkdir -p /u02/fast_recovery_area/cdb1 mkdir -p /u01/app/oracle/admin/cdb1/adump orapwd file=/u01/app/oracle/product/12.1.0.2/db_1/dbs/orapwcdb1 password=mypass entries=10 Database Cloud Service compute node:
  86. 86. Copyright © 2016 Accenture All rights reserved. | 86 ORACLE DATABASE CLOUD DATA GUARD export ORACLE_SID=cdb1 sqlplus / as sysdba STARTUP NOMOUNT PFILE='/tmp/init.ora'; rman TARGET sys/password@cdb1 AUXILIARY sys/password@cdb1_stby DUPLICATE TARGET DATABASE FOR STANDBY FROM ACTIVE DATABASE DORECOVER SPFILE SET db_unique_name='CDB1_STBY' NOFILENAMECHECK; Database Cloud Service compute node:
  87. 87. Copyright © 2016 Accenture All rights reserved. | 87 ORACLE DATABASE CLOUD DATA GUARD Prepare Client Connections (Ex: tnsnames.ora) ALTER SYSTEM SET dg_broker_start=true; dgmgrl sys/password@cdb1 CREATE CONFIGURATION my_config AS PRIMARY DATABASE IS cdb1 CONNECT IDENTIFIER IS cdb1; ADD DATABASE cdb1_stby AS CONNECT IDENTIFIER IS cdb1_stby MAINTAINED AS PHYSICAL; ENABLE CONFIGURATION; SWITCHOVER TO cdb1_stby; Database Cloud Service compute node:
  88. 88. Copyright © 2016 Accenture All rights reserved. | 88 ORACLE DATABASE CLOUD GOLDENGATE AND GOLDENGATE CLOUD SERVICE
  89. 89. Copyright © 2016 Accenture All rights reserved. | 89 ORACLE DATABASE CLOUD GOLDENGATE AND GOLDENGATE CLOUD SERVICE
  90. 90. Copyright © 2016 Accenture All rights reserved. | 90 ORACLE DATABASE CLOUD UNPLUGGING/PLUGGING
  91. 91. Copyright © 2016 Accenture All rights reserved. | 91 ORACLE DATABASE CLOUD UNPLUGGING/PLUGGING http://www.oracle.com/webfolder/technetwork/tutorials/obe/cloud/dbaas/OU/MigratingToDBaaS/Unplug_Plug_Migration/Unplug_Plug_Migration.html
  92. 92. Copyright © 2016 Accenture All rights reserved. | 92 ORACLE DATABASE CLOUD UNPLUGGING/PLUGGING http://www.oracle.com/webfolder/technetwork/tutorials/obe/cloud/dbaas/OU/MigratingToDBaaS/Unplug_Plug_Migration/Unplug_Plug_Migration.html
  93. 93. Copyright © 2016 Accenture All rights reserved. | 93 ORACLE DATABASE CLOUD UNPLUGGING/PLUGGING http://www.oracle.com/webfolder/technetwork/tutorials/obe/cloud/dbaas/OU/MigratingToDBaaS/Unplug_Plug_Migration/Unplug_Plug_Migration.html
  94. 94. Copyright © 2016 Accenture All rights reserved. | 94 ORACLE DATABASE CLOUD PLUGGABLE DATABASES (PDBS) - REMOTE CLONING
  95. 95. Copyright © 2016 Accenture All rights reserved. | 95 ORACLE DATABASE CLOUD PLUGGABLE DATABASES (PDBS) - REMOTE CLONING SQLDEVELOPER Enterprise Manager
  96. 96. Copyright © 2016 Accenture All rights reserved. | 96 ORACLE DATABASE CLOUD PLUGGABLE DATABASES (PDBS) - REMOTE CLONING
  97. 97. Copyright © 2016 Accenture All rights reserved. | 97 ORACLE DATABASE CLOUD PLUGGABLE DATABASES (PDBS) - REMOTE CLONING
  98. 98. Copyright © 2016 Accenture All rights reserved. | 98 ORACLE DATABASE CLOUD PLUGGABLE DATABASES (PDBS) - REMOTE CLONING
  99. 99. Copyright © 2016 Accenture All rights reserved. | 99 ORACLE DATABASE CLOUD PLUGGABLE DATABASES (PDBS) - REMOTE CLONING
  100. 100. Copyright © 2016 Accenture All rights reserved. | 100 ORACLE DATABASE CLOUD PLUGGABLE DATABASES (PDBS) - REMOTE CLONING
  101. 101. Copyright © 2016 Accenture All rights reserved. | 101 ORACLE DATABASE CLOUD SQLDEVELOPER DATABASE COPY
  102. 102. Copyright © 2016 Accenture All rights reserved. | 102 ORACLE DATABASE CLOUD SQLDEVELOPER
  103. 103. Copyright © 2016 Accenture All rights reserved. | 103 ORACLE DATABASE CLOUD SQLDEVELOPER
  104. 104. Copyright © 2016 Accenture All rights reserved. | 104 ORACLE DATABASE CLOUD SQLDEVELOPER
  105. 105. Copyright © 2016 Accenture All rights reserved. | 105 ORACLE DATABASE CLOUD SQLDEVELOPER
  106. 106. Copyright © 2016 Accenture All rights reserved. | 106 ORACLE DATABASE CLOUD SQLDEVELOPER
  107. 107. Copyright © 2016 Accenture All rights reserved. | 107 ORACLE DATABASE CLOUD SQLDEVELOPER
  108. 108. Copyright © 2016 Accenture All rights reserved. | 108
  109. 109. Copyright © 2016 Accenture All rights reserved. | 109 ORACLE DATABASE CLOUD RMAN CROSS-PLATFORM TRANSPORTABLE TABLESPACE BACKUP SETS You can use this method only if the database character sets of your on-premises database and Oracle Database Cloud Service database are compatible.
  110. 110. Copyright © 2016 Accenture All rights reserved. | 110 ORACLE DATABASE CLOUD RMAN CROSS-PLATFORM TRANSPORTABLE TABLESPACE BACKUP SETS On-premises host: mkdir /u01/app/oracle/admin/orcl/dpdump/for_cloud sqlplus user/password CREATE DIRECTORY dp_for_cloud AS '/u01/app/oracle/admin/orcl/dpdump/for_cloud'; ALTER TABLESPACE fsdata READ ONLY; ALTER TABLESPACE fsindex READ ONLY;
  111. 111. Copyright © 2016 Accenture All rights reserved. | 111 ORACLE DATABASE CLOUD RMAN CROSS-PLATFORM TRANSPORTABLE TABLESPACE BACKUP SETS On-premises host: mkdir /u01/app/oracle/admin/orcl/rman_transdest rman target username/password BACKUP FOR TRANSPORT FORMAT '/u01/app/oracle/admin/orcl/rman_transdest/fs_tbs.bck' TABLESPACE fsdata,fsindex DATAPUMP FORMAT '/u01/app/oracle/admin/orcl/rman_transdest/fs_tbs.dmp';
  112. 112. Copyright © 2016 Accenture All rights reserved. | 112 ORACLE DATABASE CLOUD RMAN CROSS-PLATFORM TRANSPORTABLE TABLESPACE BACKUP SETS Database Cloud Service compute node: mkdir /tmp/from_onprem On-premises host: $ scp -i private_key_file /u01/app/oracle/admin/orcl/rman_transdest/fs_tbs.bck oracle@IP_address_DBaaS_VM:/tmp/from_onprem $ scp -i private_key_file /u01/app/oracle/admin/orcl/rman_transdest/fs_tbs.dmp oracle@IP_address_DBaaS_VM:/tmp/from_onprem ALTER TABLESPACE fsdata READ WRITE; ALTER TABLESPACE fsindex READ WRITE;
  113. 113. Copyright © 2016 Accenture All rights reserved. | 113 ORACLE DATABASE CLOUD RMAN CROSS-PLATFORM TRANSPORTABLE TABLESPACE BACKUP SETS Database Cloud Service compute node: CREATE USER fsowner PROFILE default IDENTIFIED BY fspass TEMPORARY TABLESPACE temp ACCOUNT UNLOCK; mkdir /tmp/from_onprem rman target username/password RESTORE FOREIGN TABLESPACE fsdata,fsindex TO NEW FROM BACKUPSET '/tmp/from_onprem/fs_tbs.bck' DUMP FILE DATAPUMP DESTINATION '/tmp/datapump' FROM BACKUPSET '/tmp/from_onprem/fs_tbs.dmp'; ALTER TABLESPACE fsdata READ WRITE; ALTER TABLESPACE fsindex READ WRITE;
  114. 114. Copyright © 2016 Accenture All rights reserved. | 114 ORACLE DATABASE CLOUD RMAN TRANSPORTABLE TABLESPACE WITH DATA PUMP You can use this method only if the on-premises platform is little endian, and the database character sets of your on-premises database and Oracle Database Cloud Service database are compatible.
  115. 115. Copyright © 2016 Accenture All rights reserved. | 115 ORACLE DATABASE CLOUD RMAN TRANSPORTABLE TABLESPACE WITH DATA PUMP On-premises host: mkdir /u01/app/oracle/admin/orcl/rman_transdest mkdir /u01/app/oracle/admin/orcl/rman_auxdest rman target user/password TRANSPORT TABLESPACE fsdata, fsindex TABLESPACE DESTINATION '/u01/app/oracle/admin/orcl/rman_transdest' AUXILIARY DESTINATION '/u01/app/oracle/admin/orcl/rman_auxdest';
  116. 116. Copyright © 2016 Accenture All rights reserved. | 116 ORACLE DATABASE CLOUD RMAN TRANSPORTABLE TABLESPACE WITH DATA PUMP Database Cloud Service compute node: mkdir /u01/app/oracle/admin/ORCL/dpdump/from_onprem CREATE DIRECTORY dp_from_onprem AS '/u01/app/oracle/admin/ORCL/dpdump/from_onprem'; On-premises host: scp -i private_key_file /u01/app/oracle/admin/orcl/rman_transdest/dmpfile.dmp oracle@IP_address_DBaaS_VM:/u01/app/oracle/admin/ORCL/dpdump/from_onprem $ scp -i private_key_file /u01/app/oracle/admin/orcl/rman_transdest/fsdata01.dbf oracle@IP_address_DBaaS_VM:/u02/app/oracle/oradata/ORCL $ scp -i private_key_file /u01/app/oracle/admin/orcl/rman_transdest/fsindex01.dbf oracle@IP_address_DBaaS_VM:/u02/app/oracle/oradata/ORCL
  117. 117. Copyright © 2016 Accenture All rights reserved. | 117 ORACLE DATABASE CLOUD RMAN TRANSPORTABLE TABLESPACE WITH DATA PUMP Database Cloud Service compute node: CREATE USER fsowner PROFILE default IDENTIFIED BY fspass TEMPORARY TABLESPACE temp ACCOUNT UNLOCK; impdp system DIRECTORY=dp_from_onprem DUMPFILE='dmpfile.dmp' TRANSPORT_DATAFILES='/u02/app/oracle/oradata/ORCL/fsdata01.dbf', '/u02/app/oracle/oradata/ORCL/fsindex01.dbf'
  118. 118. Copyright © 2016 Accenture All rights reserved. | 118 ORACLE DATABASE CLOUD RMAN CONVERT TRANSPORTABLE TABLESPACE WITH DATA PUMP You can use this method only if the database character sets of your on-premises database and Oracle Database Cloud Service database are compatible.
  119. 119. Copyright © 2016 Accenture All rights reserved. | 119 ORACLE DATABASE CLOUD RMAN CONVERT TRANSPORTABLE TABLESPACE WITH DATA PUMP On-premises host: mkdir /u01/app/oracle/admin/orcl/dpdump/for_cloud sqlplus user/password CREATE DIRECTORY dp_for_cloud AS '/u01/app/oracle/admin/orcl/dpdump/for_cloud'; ALTER TABLESPACE fsindex READ ONLY; ALTER TABLESPACE fsdata READ ONLY; expdp system TRANSPORT_TABLESPACES=fsdata,fsindex TRANSPORT_FULL_CHECK=YES DIRECTORY=dp_for_cloud
  120. 120. Copyright © 2016 Accenture All rights reserved. | 120 Database Cloud Service compute node: mkdir /u01/app/oracle/admin/ORCL/dpdump/from_onprem On-premises host: rman target / CONVERT TABLESPACE fsdata, fsindex TO PLATFORM 'Linux x86 64-bit' FORMAT '/tmp/%U '; ORACLE DATABASE CLOUD RMAN CONVERT TRANSPORTABLE TABLESPACE WITH DATA PUMP
  121. 121. Copyright © 2016 Accenture All rights reserved. | 121 On-premises host: $ scp -i private_key_file /u01/app/oracle/admin/orcl/dpdump/for_cloud/expdat.dmp oracle@IP_address_DBaaS_VM:/u01/app/oracle/admin/ORCL/dpdump/from_onprem $ scp -i private_key_file /tmp/data_D-ORCL_I-1410251631_TS-FSDATA_FNO-6_0aqc9un3 oracle@IP_address_DBaaS_VM:/u02/app/oracle/oradata/ORCL/fsdata01.dbf $ scp -i private_key_file /tmp/data_D-ORCL_I-1410251631_TS-FSINDEX_FNO-7_0bqc9un6 oracle@IP_address_DBaaS_VM:/u02/app/oracle/oradata/ORCL/fsindex01.dbf ALTER TABLESPACE fsdata READ WRITE; ALTER TABLESPACE fsindex READ WRITE; ORACLE DATABASE CLOUD RMAN CONVERT TRANSPORTABLE TABLESPACE WITH DATA PUMP
  122. 122. Copyright © 2016 Accenture All rights reserved. | 122 Database Cloud Service compute node: CREATE DIRECTORY dp_from_onprem AS '/u01/app/oracle/admin/ORCL/dpdump/from_onprem'; CREATE USER fsowner PROFILE default IDENTIFIED BY fspass TEMPORARY TABLESPACE temp ACCOUNT UNLOCK; impdp system DIRECTORY=dp_from_onprem TRANSPORT_DATAFILES='/u02/app/oracle/oradata/ORCL/fsdata01.dbf', '/u02/app/oracle/oradata/ORCL/fsindex01.dbf’ ALTER TABLESPACE fsdata READ WRITE; ALTER TABLESPACE fsindex READ WRITE; ORACLE DATABASE CLOUD RMAN CONVERT TRANSPORTABLE TABLESPACE WITH DATA PUMP
  123. 123. Please Complete Your Session Evaluation Evaluate this session in your COLLABORATE app. Pull up this session and tap "Session Evaluation" to complete the survey. Session ID: 456
  124. 124. Copyright © 2016 Accenture All rights reserved. | 124 QUESTIONS?
  125. 125. Copyright © 2016 Accenture All rights reserved. | 125 Thank You Slides Available: http://www.slideshare.net/

×