migrating to oracle on linux for...
TRANSCRIPT
Migrating to Oracle on Linux for z
Thomas Niewel
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Thomas NiewelMaster Principal Sales ConsultantOracle Deutschland B.V. & Co KG04/2015
Safe Harbor Statement
The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.
3
Agenda
Oracle 12c Multitenant
Sizing Aspects
Character Sets
1
2
3
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
Character Sets
Migrating Data
Minimum Downtime Migration with Oracle GoldenGate
Miscellaneous
3
4
5
4
6
Oracle Database Architecture (classic)
• Each database consists of a set of datafiles and in minimum one instance
– Independent
Non-CDB
ERP CRM DW
datafiles
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
– Independent
– Redundancies
5
instances, processes, memory
Components of a Container Database (CDB)
Multitenant Architecture
PDBs
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
Pluggable Databases (PDBs)
Root
CDB
6
Portability & Management
• Better resource utilization
• Easier and more rapid movement of data and code
• Easier management and monitoring
of the physical database
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 7
Source: Oracle 12c administration Guide : Creating and Removing PDBs with SQL*Plus
of the physical database
• Support for Oracle Database Resource Manager
• Fewer patches and upgrades
Agenda
Oracle 12c Multitenant
Sizing Aspects
Character Sets
1
2
3
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
Character Sets
Migrating Data
Minimum Downtime Migration with Oracle GoldenGate
Miscellaneous
3
4
5
9
6
Sizing Aspects
Sytem z Configuration
z/VM z/VM
• Virtual machines
• VM-Guests
• Linux for z
• z/VM Operating System
z/Linux
Guest 1..n
z/Linux
Guest 1..n
z/Linux
Guest 1..n
z/Linux
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
System z
LPAR
z/VM z/VM
LPAR
• z/VM Operating System
• Logical partitions
• 1 - 85 LPAR’s (z13)
z/VM
z/Linux
LPAR
System z
10
PGA - Example
Sizing Aspects
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 12
SGA - Example
Sizing Aspects
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 13
Buffer Pool Example
Sizing Aspects
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 14
Dedicated Server Process
Sizing Aspects
• The storage used by dedicated server threads can be calculated as follows:
• Max(logons current) multiplied by storage used per thread
• Storage used per process is 5 MB (Calculated on an idle system by opening a sqlplus session. The
storage usage was monitored with the Linux free command)
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 15
Agenda
Oracle 12c Multitenant
Sizing Aspects
Character Sets
1
2
3
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
Character Sets
Migrating Data
Minimum Downtime Migration with Oracle GoldenGate
Miscellaneous
3
4
5
16
6
Charactersets
• Unicode solves codepage mapping issues(see Note: 333489.1)
• Be careful if ASCII charactersets are used
• Example
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
– Source database with an EBCDIC charactersWE8EBCDIC1047 (€ available)
– Target database with an ASCII charactersetWE8ISO8859P1 (€ not available)
• Application may be affected
• Sort-Order (EBCDIC / ASCII)
17
Agenda
Oracle 12c Multitenant
Sizing Aspects
Character Sets
1
2
3
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
Character Sets
Migrating Data
Minimum Downtime Migration with Oracle GoldenGate
Miscellaneous
3
4
5
18
6
Migration Options to Oracle Database 12c
Oracle 11.1
Less
Downtime?Oracle 10.2 Near-Zero
Downtime?
Golden +
expdp/impdp
SQL*Loader
CTAS, COPY
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
Oracle 11.2.0.1/2
Oracle 11.2.0.3/4
Golden
Gate+
Full Transportable
Export/Import
RMAN Inc
Bck+
Transportable
Tablespaces
Transportable
Tablespaces
SQL*Loader
TDB Only same
Endianness
19
Migrating data
• Source database on z/OS
– Datapump utility and export utility are available to move data with its definitions, but datapump usesUSS
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
USS
– Use of the classic export utility on z/OS
may be an option in case of problems with USS
Original Export is desupported for general use as of Oracle Database 11g.
exp scott tables=emp
imp scott@sigpdb datafiles=expdat.dmp fromuser=scott, touser=tniewel
20
Migrating data
• Datapump Utility
Data Pump Export is a utility for unloading data and metadata into a set of operating system files called a dump file set. The dump file set can be imported only by the Data Pump Import utility. The dump file set can be imported on the same system or it can be moved to another system
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
Data Pump Import is a utility for loading an export dump file set into a target system. The dump file set is made up of one or more disk files that contain table data, database object metadata, and control information. The files are written in a proprietary, binary format. During an import operation, the Data Pump Import utility uses these files to locate each database object in the dump file set
Source: Oracle® Database Utilities
21
Migrating data
• Datapump Utility advantages
‒ Datapump operations are executed in the Oracle database server
‒ Datapump export and import use parallel execution rather than a single stream of
execution, for improved performance
‒ Export and import jobs can be stopped and re-started
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
‒ Export and import jobs can be stopped and re-started
‒ Detach and re-attach to long running Jobs
‒ If a table has compression enabled, Data Pump Import
attempts to compress the data being loaded
‒ Space estimation
22
Datapump Export / Import Modes
• FULL
• SCHEMA
• TABLE
• TABLESPACE
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
• Transportable Tablespace
23
Migrating data
• Transportable Tablespaces
– The source and the Linux for z database must use the same character set
– A tablespace with a conflicting name may not exist on the Oracle for Linux
on system z target database
– Objects which are external to tablespaces (e.g. PL/SQL procedures)
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
– Objects which are external to tablespaces (e.g. PL/SQL procedures)
have to be migrated separately
– System, undo, sysaux and temp tablespaces cannot be transported
– Have to be self contained
See notes: 1166564.1 - Master Note for Transportable Tablespaces (TTS) - Common Questions and Issues1389592.1 - Reduce Transportable Tablespace Downtime using Cross Platform Incremental Backup
24
Migrating dataDetermine endianness of the source and target platform
SQL> SELECT PLATFORM_NAME, ENDIAN_FORMAT FROM V$TRANSPORTABLE_PLATFORM
PLATFORM_NAME ENDIAN_FORMAT
------------------------------ --------------
Solaris[tm] OE (32-bit) Big
Solaris[tm] OE (64-bit) Big
Microsoft Windows IA (32-bit) Little
Linux IA (32-bit) Little
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
AIX-Based Systems (64-bit) Big
HP-UX (64-bit) Big
HP Tru64 UNIX Little
HP-UX IA (64-bit) Big
Linux IA (64-bit) Little
HP Open VMS Little
Microsoft Windows IA (64-bit) Little
IBM zSeries Based Linux Big
Linux x86 64-bit Little
25
Migrating data
• Transportable Tablespaces - example
– Source System: Oracle on Linux x86
• Little endian platform
– Target System Oracle on Linux for z
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
– Target System Oracle on Linux for z
• Big endian platform
– ASM is not used
26
Migrating data
• Transportable Tablespaces – example
– Build directories and grant authorities on the source and the target system. Those directories are used to hold:
• Tablespace metadata
• Export logfile
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
• Export logfile
source: create directory zsig as '/home/oracle/tniewel/zsig/’;
target: create directory zsig as '/home/oracle/tniewel/zsig/’;
27
Migrating data
• Transportable Tablespaces – example (Source)
– Set all tablespaces which have to be transported to Read Only(RO)
– The tablespaces have to be self contained
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
ALTER TABLESPACE zsig READ ONLY;
exec DBMS_TTS.TRANSPORT_SET_CHECK(‘zsig',TRUE);
SELECT * FROM TRANSPORT_SET_VIOLATIONS;
VIOLATIONS-------------------------------------------------------------------------------
ORA-39907: Index HR.LOCATIONS_IDX in tablespace ZSIG points to table HR.LOCATIONS in tablespaceEXAMPLE.
28
Migrating data
• Transportable Tablespaces – example (Source)
– Export the metadata into the defined directory
expdp system/oracle transport_tablespaces=zsig
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
directory=zsig dumpfile=ts.dmp
metrics=y exclude=statistics
logfile=ts_export.log
29
Migrating data
• Transportable Tablespaces – example (Target)
– Copy the dump file and the datafiles to the Linux forz target machine
– If ASM is used, DBMS_FILE_TRANSFER has to be used
– DBMS_FILE_TRANSFER packages (GET_FILE, PUT_FILE) allow
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
– DBMS_FILE_TRANSFER packages (GET_FILE, PUT_FILE) allow to copy a binary file within a database or to transfer a binary file between databases. The destination database converts each block when it receives a file from a platform with different endianness. Datafiles can be imported after they are moved to the destination database as part of a transportable operation without RMAN conversion.
30
Migrating data
• Transportable Tablespaces – example (on target System z machine)
– Convert the endianness with RMAN
RMAN> connect target *
2> run
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
2> run
3> {
4> convert datafile '/home/oracle/tniewel/zsig/zsig.dbf' db_file_name_convert'/home/oracle/tniewel/zsig' '/home/oracle/tniewel/zsig1' from platform 'Linux x86 64-bit';
5> }
6> exit;
connected to target database: SIGCDB (DBID=2618719031)
31
Migrating data
connected to target database: SIGCDB (DBID=2618719031)
Starting conversion at target at 10-MAR-15
using target database control file instead of recovery catalog
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=36 device type=DISK
channel ORA_DISK_1: starting datafile conversion
input file name=/home/oracle/tniewel/zsig/zsig.dbf
converted datafile=/home/oracle/tniewel/zsig1/zsig.dbf
channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:00:01
Finished conversion at target at 10-MA
32
Migrating data
• Transportable Tablespaces – example (Target)
– Tailor the datapump import parameters
impdp tniewel/tniewel@sigpdb directory=zsig dumpfile=ts.dmp
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
impdp tniewel/tniewel@sigpdb directory=zsig dumpfile=ts.dmp
transport_datafiles='/home/oracle/tniewel/zsig1/zsig.dbf'
33
Migrating data
• Transportable Tablespaces – example (Target)
– Import Metadata
Import: Release 12.1.0.2.0 - Production on Tue Mar 10 17:43:54 2015
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
Master table "TNIEWEL"."SYS_IMPORT_TRANSPORTABLE_01" successfully loaded/unloaded
Source time zone version is 14 and target time zone version is 18.
Starting "TNIEWEL"."SYS_IMPORT_TRANSPORTABLE_01": tniewel/********@sigpdb directory=zsigdumpfile=ts.dmp transport_datafiles=/home/oracle/tniewel/zsig1/zsig.dbf
....34
Migrating data
• Transportable Tablespaces – example (Target)
– Set tablespaces Read Write
ALTER TABLESPACE zsig read write
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 35
Migrating data
• Transportable Database (RMAN CONVERT DATABASE)
– Automates the movement of a complete database to another platform
– The source and destination platform must have the same endianness
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
– See note 1401921.1
– See Oracle 12 Database Backup and Recovery User's Guide Chapter 12
36
Migrating data
• RMAN
– DUPLICATE Database
– Restore
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
– RMAN DUPLICATE/RESTORE/RECOVER in a mixed platform environment is not supported for Oracle on Linux on z
– See Notes: Frequently Asked Questions about Restoring Oracle andDuplicating Between Different Versions And Platforms (369644.1) andRMAN DUPLICATE/RESTORE/RECOVER Mixed Platform Support (1079563.1)
37
• Full transportable export is available with the Oracle Database Version 11.2.0.3
• Full transportable import is available starting with Oracle Database 12c.
• If you specify the TRANSPORTABLE=ALWAYS parameter along with the FULL
Oracle Database 12c: Full Transportable Export/Import
Migrating data
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
• If you specify the TRANSPORTABLE=ALWAYS parameter along with the FULL
parameter, then Data Pump performs a full transportable export.
• A full transportable export exports all objects and data necessary to create a
complete copy of the database.
38
• A mix of data movement methods is used:
• Objects residing in transportable tablespaces have only their metadata
unloaded into the dump file set; the data itself is moved when you copy the
data files to the target database. The data files that must be copied are listed
at the end of the log file for the export operation
Oracle Database 12c: Full Transportable Export/Import
Migrating data
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
at the end of the log file for the export operation
• Objects residing in non-transportable tablespaces (for example, SYSTEM and
SYSAUX) have both their metadata and data unloaded into the dump file set
using direct path unload and external tables.
Source: oracle Database 12c Utilities
39
• At the source database, place each of the user-defined tablespaces in read-only mode and export the
database with the parameters
TRANSPORTABLE=ALWAYS
FULL=Y
VERSION=12 (IF version of source database is >=11.2.03)
Oracle Database 12c: Full Transportable Export/Import
Migrating data
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
• If the source database contains any encrypted tablespaces or tablespaces containing tables with encrypted
columns, then you must either specify ENCRYPTION_PWD_PROMPT=YES, or specify the
ENCRYPTION_PASSWORD parameter
• The export dump file includes the metadata for objects contained within the user-defined tablespaces and
both the metadata and data for user-defined objects contained within the administrative tablespaces, such
as SYSTEM and SYSAUX.
Source: Oracle Database 12c: Full Transportable Export/Import
40
• Transport the export dump file
• Copy the export dump file to a place that is accessible to the target database
• Transport the data files for all of the user-defined tablespaces in the database
• Copy the data files to a place that is accessible to the target database
Oracle Database 12c: Full Transportable Export/Import
Migrating data
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
• Convert the endianess if necessary (check the V$TRANSPORTABLE_PLATFORM view )
• (Optional) Restore the user-defined tablespaces to read/write mode on the source database
• At the target database, import the database
• When the import is complete, the user-defined tablespaces are in read/write mode
Source: Oracle Database 12c: Full Transportable Export/Import
41
Oracle Database 12c: Full Transportable Export/Import
Migrating data
More Information is available in the white paper
Oracle Database 12c: Full Transportable Export/Import
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
In the Oracle product documentation
Database Administration Guide - Chapter 15 – Transporting Data
42
Agenda
Oracle 12c Multitenant
Sizing Aspects
Character Sets
1
2
3
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
Character Sets
Migrating Data
Minimum Downtime Migration with Oracle GoldenGate
Miscellaneous
3
4
5
43
6
Oracle GoldenGate Architecture
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
Source: Oracle GoldenGate Windows and UNIX Administrator’s Guide
44
Minimum Downtime Migration with Oracle GoldenGate• Example: near-zero-downtime upgrade with GoldenGate
extract
Old environment Linux guest new
replicatpump
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
+Diskgroup
+ ASM + ASM
+Diskgroup
SCN=4711
SCN on source is 4711
Step 1: Start extract and pump process
SCN=4711
......
45
Minimum Downtime Migration with Oracle GoldenGate• Example: near-zero-downtime upgrade with GoldenGate
extract
Old environment Linux guest new
replicatpump
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
+Diskgroup
+ ASM + ASM
+Diskgroup
SCN=4750
Step 2: export/import with consistent SCN 4750
SCN=4711
.....
export/import
SCN 4750
46
Minimum Downtime Migration with Oracle GoldenGate• Example: near-zero-downtime upgrade with GoldenGate
extract
Old environment Linux guest new
replicatpump
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
+Diskgroup
+ ASM + ASM
+Diskgroup
SCN=4790
Step 3: Start replicat with SCN 4750
replicat process applies changes until databases are in sync
SCN=4711
.....
SCN 4750
47
Minimum Downtime Migration with Oracle GoldenGate• Example: near-zero-downtime upgrade with GoldenGate
Extract
failback
Old environment Linux guest new
Pump
failbackreplicat
failback
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
+Diskgroup
+ ASM + ASM
+Diskgroup
failback
Step 4: Application can be stopped
Replication can be stopped and started in the opposite direction
Application can be started on the new database
failback
48
Things to consider
•Non-Integrated Extract
•Trigger
(Automatically disabled by GoldenGate Oracle version >=
11.2.0.2)
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
• Cascading constraints
(DBOPTIONS DEFERREFCONST Oracle version >= 11.2.0.2)
• Sequences
GoldenGate sequence support (unidirectional)
49
Methods for an Instantiation of the Target Database
• Import Datapump via a database link
• (Cross platform) Transportable Tablespaces
• CTAS (Create Table As Select)
• Export / Import
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
• Export / Import
• Backup / Restore (see Note 369644.1 and 369644.1)
• Instantiation with GoldenGate
• …..
50
Examples
Methods for an Instantiation of the Target Database
1. SELECT DBMS_FLASHBACK.GET_SYSTEM_CHANGE_NUMBER FROM DUAL;
a) Insert into target select * from scott.emp as of scn 3488839
b) expdp strmadmin SCHEMAS=hr DIRECTORY=DPUMP_DIR
DUMPFILE=hr_schema_dp.dmp FLASHBACK_SCN=3488839
c) impdp tniewel/tniewel schemas=scott remap_schema scott:tniewel directory=DMP
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
c) impdp tniewel/tniewel schemas=scott remap_schema scott:tniewel directory=DMP
network_link=to_sourceDB FLASHBACK_SCN=3488839
d) RMAN> backup database plus archivelog ; RMAN> duplicate target database to <databasename>
nofilenamecheck until scn <value returned from “RMAN restore database preview summary” command> (see Notes 369644.1 and 369644.1)
2. Start of the replicat process (depending on instantiation method)
START REPLICAT <name> AFTERCSN <3488839>
START REPLICAT <name> ATCSN <3488839>
51
Overview of GoldenGate Initial-Load Procedures
Instantiation with GoldenGate
• Loading Data from File to Replicat
• Loading Data from File to Database Utility (SQL*Loader)
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 52
• Loading Data from File to Database Utility (SQL*Loader)
• Loading Data with an Oracle GoldenGate Direct Load
• Loading Data with a Direct Bulk Load to SQL*Loader
Source: Administering Oracle GoldenGate for Windows and UNIX
Example
Extract ReplicatESCOTT RSCOTT
Linux on System z Linux on Intel
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 53
PumpPSCOTT
ExampleGGSCI (sccloud026.de.oracle.com) 4> edit params escott
EXTRACT escott
userid ggowner password ggowner
-- Writes all supplementally logged columns to the trail,
-- including those required for conflict detection and
-- resolution and the scheduling columns required to
-- support integrated Replicat. (Scheduling columns are
-- primary key, unique index, and foreign key columns.
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
-- primary key, unique index, and foreign key columns.
LOGALLSUPCOLS
-- DDL Replication (optional)
-- DDL INCLUDE MAPPED
EXTTRAIL /home/oracle/GG12/dirdat/xx
TABLE scott.*;
==============================
GGSCI (sccloud026.de.oracle.com) 4> ADD EXTRACT escott, TRANLOG, BEGIN NOW
GGSCI (sccloud026.de.oracle.com) 4> ADD EXTTRAIL /home/oracle/GG12/dirdat/xx, EXTRACT escott
54
Example
GGSCI (sccloud026.de.oracle.com) 7> edit params pscott
EXTRACT pscott
PASSTHRU
RMTHOST strkf34.us.oracle.com mgrport 1860
RMTTRAIL /ogg/thomas/gg/gg121/dirdat/xx
TABLE scott.*;
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
TABLE scott.*;
===========================
GGSCI (sccloud026.de.oracle.com) 7> ADD EXTRACT pscott, EXTTRAILSOURCE /home/oracle/GG12/dirdat/xx
GGSCI (sccloud026.de.oracle.com) 7> ADD RMTTRAIL /ogg/thomas/gg/gg121/dirdat/xx, EXTRACT pscott
55
Example
Oracle GoldenGate Command Interpreter for Oracle
Version 12.1.2.0.2 19269784 OGGCORE_12.1.2.0.0OGGORABP_PLATFORMS_140828.0058
Linux, s390x, 64bit (optimized), Oracle 12c on Sep 3 2014 18:55:01
GGSCI (strkf34.us.oracle.com) > edit params rscott
REPLICAT rscott
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
REPLICAT rscott
-- MAX_PARALLELISM: Limits the number of apply servers that can be used when the load is heavy.
DBOPTIONS INTEGRATEDPARAMS(max_parallelism 4)
userid C##GGOWNER@sigpdb password C##GGOWNER
-- The inbound server tags the transactions of
-- that Replicat with the specified value, which identifies those transactions in the redo stream.
-- Tags are used to prevent from looping
DBOPTIONS SETTAG 99
-- ASSUMETARGETDEFS assumes the source and target tables have identical definitions
ASSUMETARGETDEFS
MAP scott.*, TARGET pdb.tniewel.*;
56
Example
GGSCI (strkf34.us.oracle.com) 93> sh vi rscott.oby
dblogin userid C##GGOWNER@sigpdb password C##GGOWNER
delete replicat rscott
ADD REPLICAT rscott, INTEGRATED, EXTTRAIL /ogg/thomas/gg/gg121/dirdat/xx
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 57
Instantiation of the target database
Example
� Check for long running transactions on source
SQL> select * from v$transaction;
no rows selected
� Start Goldengate extract and pump process to capture transactions
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
� Start Goldengate extract and pump process to capture transactions
GGSCI (sccloud026.de.oracle.com) 11> start escott
Sending START request to MANAGER ...
EXTRACT ESCOTT starting
GGSCI (sccloud026.de.oracle.com) 12> start pscott
Sending START request to MANAGER ...
EXTRACT PSCOTT starting
58
Instantiation of the target database
Example
� Get curent scn of source databaase
src1 > select current_scn from v$database;
CURRENT_SCN
-----------
61447721
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
61447721
� Export the user data consitent to the SCN
connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
FLASHBACK automatically enabled to preserve database integrity.
Starting "SYSTEM"."SYS_EXPORT_SCHEMA_01": system/******** schemas=scott directory=ZSIG
dumpfile=ts.dmp exclude=statistics flashback_scn=61447721 logfile=ts1_export.log
59
Instantiation of the target database
Example
� Transport the data to the Linux on z target platform
� Inport the data
Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "SYSTEM"."SYS_IMPORT_FULL_01": system/********@sigpdb directory=ZSIG
dumpfile=ts.dmp nologfile=YES remap_schema=scott:tniewel
� Start the replicat process
GGSCI (strkf34.us.oracle.com) 15> start replicat rscott aftercsn 61447721
60
GoldenGate - AWR Report
Example
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 61
Oracle GoldenGate Classic Capture
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
Source: Oracle GoldenGate Windows and UNIX Administrator’s Guide
62
GoldenGate >=11.2 – Integrated Capture
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
Source: Oracle GoldenGate Windows and UNIX Administrator’s Guide
Integrated Capture: See note 1557031.1 Oracle GoldenGate - Oracle RDBMS Server Recommended Patches
63
Classic Capture or Integrated Capture ?
GoldenGate >=11.2
• Classic Capture
• Most data types supported
• Restricted support for complex data types
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
• Restricted support for complex data types
• GoldenGate Profiling Scripts
• Note 1298562.1 (Database)
• Note 1296168.1 (Schema)
64
Classic Capture or Integrated Capture ?
Oracle GoldenGate - Versions >=11.2
• Integrated Capture
• Fully integrated with the database, no additional setup is
required to work with Oracle RAC, ASM, and TDE
• Easier Integration into RAC
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
• Easier Integration into RAC
• Integrated Log Management, because of Logminer usage
• Classic Capture Restrictions abandoned (see next slides)
• Downstream Capture
65
Some important Features Classic Capture Integrated Capture
Compression (Basic, OLTP, EHCC) X ����
XML Partially ����
Integrated Capture vs. Classic Capture
Oracle GoldenGate - Versions 11.2 and 12.1
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
Mutithreaded X ����
RAC with PDML With Restrictions ����
RAC with XA With Restrictions ����
More details: Oracle GoldenGate for Oracle Installation and Setup Guide – Chapter 1.4
66
Integrated Delivery
• Integrated Delivery for Oracle target databases only
• > 12.1.0.1 and 11.2.0.4
• Leverages database parallel apply servers for automatic dependency aware parallel apply
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 67
Source: Installing and Configuring Oracle GoldenGate for Oracle
Support for Multitenant Databases
GoldenGate Version 12
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 68
Agenda
Oracle 12c Multitenant
Sizing Aspects
Character Sets
1
2
3
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
Character Sets
Migrating Data
Minimum Downtime Migration with Oracle GoldenGate
Miscellaneous
3
4
5
69
6
Resourcemanager on CDB Level
Oracle Database Resource Manager
• Management of Resources
– CPU
– Parallel Query Slaves
ERP CRM DW
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 70
Top Priority Low PriorityMedium Priority
in a Multitenant Environment
Oracle Database Resource Manager
In a CDB, Resource Manager can manage resources on two basic levels:
• CDB level
• Resource Manager can manage the workloads for multiple PDBs that are contending for system
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
• Resource Manager can manage the workloads for multiple PDBs that are contending for system and CDB resources. You can specify how resources are allocated to PDBs, and you can limit the resource utilization of specific PDBs
• PDB level
• Resource Manager can manage the workloads within each PDB
• A PDB resource plan is similar to a resource plan for a non-CDB
71
in a Multitenant Environment
Oracle Database Resource Manager
Some PDBs typically are more important than othersWith the Resource Manager, you can:• Specify that different PDBs should receive different shares of the system resources so that more
resources are allocated to the more important PDBs
• Limit the CPU usage of a particular PDB
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
• Limit the CPU usage of a particular PDB
• Limit the number of parallel execution servers that a particular PDB can use
• Limit the resource usage of different sessions connected to a single PDB
• Monitor the resource usage of PDBs
72
PDB Shares Utilization_Limit Assured
CPU
Max CPU
PDB1 4 100% 4/8=50% 100%
in a Multitenant Environment
Oracle Database Resource Manager
CDB Resource Plan
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
PDB1 4 100% 4/8=50% 100%
PDB2 2 50% 2/8=25% 50%
PDB3 1 50% 1/8=12,5% 50%
PDB4 1 70% 1/8=12,5% 70%
73
in a Multitenant Environment
Oracle Database Resource Manager
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 77
Miscellaneous• Replay the production workload
– Use Oracle Real Application Testing
• Workload Capture / Workload Replay
• SPA
• Performance Reports, Divergence Reports
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
• Check performance characteristics of the source and target environment with AWR reports (e.g. awrddrpt.sql)
• Use AWR reports to drill down to queries with changed performance characteristics
• Evaluate / Optimize Queries on the Linux for System z target environment
– SPA
– SQL Tuning Advisor
78
AWR 'active-html‘ report - Includes Performance Hub active report
Miscellaneous – Cool stuff
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 79
AWR 'active-html‘ report - Includes Performance Hub active report
Miscellaneous – Cool stuff
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 80
AWR 'active-html‘ report - Includes Performance Hub active report
Miscellaneous – Cool stuff
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 81
Safe Harbor Statement
The preceding is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.
commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.
82