oracle 12c and its pluggable databases

26
Oracle 12c and its pluggable databases Presented by : Gustavo René Antúnez Oracle DBA The Pythian Group February, 2014

Upload: gustavo-rene-antunez

Post on 13-May-2015

7.109 views

Category:

Technology


6 download

DESCRIPTION

A brief description of Oracle 12c most talked about feature, Pluggable databases

TRANSCRIPT

Page 1: Oracle 12c and its pluggable databases

Oracle 12c and its pluggable databases

Presented by : Gustavo René Antúnez Oracle DBA The Pythian Group February, 2014

Page 2: Oracle 12c and its pluggable databases

About Pythian •  Recognized Leader:

–  Global industry-leader in remote database administration services and consulting for Oracle, Oracle Applications, MySQL and Microsoft SQL Server

–  Work with over 250 multinational companies such as Forbes.com, Fox Sports, Nordion and Western Union to help manage their complex IT deployments

•  Expertise: –  One of the world’s largest concentrations of dedicated, full-time DBA

expertise. Employ 9 Oracle ACEs/ACE Directors.

–  Hold 7 Specializations under Oracle Platinum Partner program, including Oracle Exadata, Oracle GoldenGate & Oracle RAC

•  Global Reach & Scalability: –  Around the clock global remote support for DBA and consulting, systems

administration, special projects or emergency response

Page 3: Oracle 12c and its pluggable databases

About Me –  Oracle DBA

•  Started with Version 9.2 in 2004

–  With The Pythian Group for the last year

–  Movie Fanatic –  Music Lover –  Bringing the best from México

(Mexihtli) to the rest of the world and in the process photographing it :)

–  reneantunez.com –  @antunezrene

Page 4: Oracle 12c and its pluggable databases

Where do I come from?

Page 5: Oracle 12c and its pluggable databases

How did you get to be a DBA

Page 6: Oracle 12c and its pluggable databases

What is The Multitenant Architecture? •  Container database (CDB) is an Oracle

database that includes zero, one, or many customer-created Containers or Pluggable Databases.

•  A pluggable Database (PDB) is a user-created container holding the data and code for your specific applications

Page 7: Oracle 12c and its pluggable databases

What is a Pluggable Database?

Root (CDB$ROOT)

CDB

hrpdb salespdb

Seed (PDB$SEED)

CDB Administrator

Sales Application

HR Application

PDB Administrator for hrpdb

PDB Administrator for salespdb

Logical

Physical Database

Control Files

Data Files

Online Redo Log

10101 10101 Archived Redo Log

Flashback Log

Page 8: Oracle 12c and its pluggable databases

Benefits of a Pluggable Database •  Achieve a greater level of scalability and

consolidation density •  Managing many databases as one •  Single set of Background Processes •  Oracle System dictionary resides in the

Container Database. •  Rapid Provisioning and Cloning

Page 9: Oracle 12c and its pluggable databases

What is a Pluggable Database?

Root (CDB$ROOT)

HR PDB

Sales PDB

CDB

Seed (PDB$SEED)

SalesPDB2

CREATE PLUGGABLE DATABASE. . . FROM

New PDB

CREATE PLUGGABLE DATABASE

Page 10: Oracle 12c and its pluggable databases

Multitenant Architecture CDB_view : All of the objects in the CDB across all PDBs.

DBA_view: All of the objects in a CDB or PDB

All_view Objects accessible by the current user

User_view : Objects owned by the current user

Container ID Rows Belong to

0 Whole CDB

1 CDB$ROOT

2 PDB$SEED

All other IDs User created PDBs

Page 11: Oracle 12c and its pluggable databases

Multitenant Architecture Users

•  Common User. – Can connect and perform operations within the root and every existing and future PDBs.

•  Local User. – Specific user that can only operate within

the PDB. A restriction is that a user cannot begin with c## or C##

Page 12: Oracle 12c and its pluggable databases

My 12c Top Features •  Online rename and relocation of an active data file.

–  ALTER DATABASE MOVE DATAFILE

•  DDL logging –  ALTER SYSTEM|SESSION SET ENABLE_DDL_LOGGING=TRUE; –  $ORACLE_BASE/diag/rdbms/DBNAME/log|ddl

•  Datapump –  Export View As a Table –  Turn off redo log generation for Datapump Imports

•  TRANSFORM=DISABLE_ARCHIVE_LOGGING:Y

Page 13: Oracle 12c and its pluggable databases

My 12c Top Features •  Active Data Guard Far Sync

–  Synchronous replication to a far sync instance (repeater) situated at distance /reasonable latency, then asynchronous replication to the final standby

SYNC ASYNC

Page 14: Oracle 12c and its pluggable databases

My 12c Top Features •  Oracle Flex ASM

–  Enables an Oracle ASM instance to run on a separate physical server from the database servers

•  Parallel Upgrade Utility –  $ORACLE_HOME/perl/bin/perl catctl.pl -n 4 -l $ORACLE_HOME/

diagnostics catupgrd.sql

Page 15: Oracle 12c and its pluggable databases

DEMO 1

Page 16: Oracle 12c and its pluggable databases

What is RMAN?

•  Oracle utility to perform backup and recovery, available since version 8

RMAN Utility

Channel

Target DB

Server Session

MML

DISK

Executable found in $ORACLE_HOME/bin recover.bsq (library file)

Page 17: Oracle 12c and its pluggable databases

How does an RMAN backup work?

Datafiles 1 MB 1 MB

1 MB 1 MB

1 MB 1 MB

1 MB 1 MB

1 MB 1 MB

1 MB 1 MB

1 MB 1 MB

1 MB 1 MB

Input I/O Buffers

Validation Compression Encryption

1 MB 1 MB

1 MB 1 MB

Channel

Output Buffers Backup Piece

1

2

3

4

Read Phase Copy Phase Write Phase

Page 18: Oracle 12c and its pluggable databases

SUPPORT FOR MULTITENANT CONTAINER DATABASES AND PLUGGABLE DATABASES •  Backing up the CDB and all of its PDBs

rman target sys/oracle@cdb1 connected to target database: CDB1 (DBID=808250731)

RMAN> backup database plus archivelog;

•  Backing up just one PDB rman target sys/oracle@pdb1 connected to target database: CDB1 (DBID=808250731)

RMAN> backup database;

•  Backing up the root rman target sys/oracle@cdb1 connected to target database: CDB1 (DBID=808250731)

RMAN> backup database root;

Page 19: Oracle 12c and its pluggable databases

•  Restoring a PDB

oracle $ rman target sys/oracle@cdb1

connected to target database: CDB1 (DBID=808250731)

RMAN> RESTORE PLUGGABLE DATABASE PDB1;

RMAN> RECOVER PLUGGABLE DATABASE PDB1;

RMAN> ALTER PLUGGABLE DATABASE PDB1 OPEN;

SUPPORT FOR MULTITENANT CONTAINER DATABASES AND PLUGGABLE DATABASES

Page 20: Oracle 12c and its pluggable databases

•  Be careful when dropping a PDB

RMAN> drop pluggable database PDB1; Statement processed

RMAN> RESTORE PLUGGABLE DATABASE PDB1;

Starting restore at 13/02/2014 11:18:26 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=41 device type=DISK RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of restore command at 02/13/2014 11:18:27 RMAN-06813: could not translate pluggable database PDB1

SUPPORT FOR MULTITENANT CONTAINER DATABASES AND PLUGGABLE DATABASES

Page 21: Oracle 12c and its pluggable databases

Recovering Tables and Table Partitions from RMAN Backups

Target Database

DB in read-write mode

ARCHIVELOG MODE

RMAN backup as existed at the

point in time

1 Gigabyte extra in memory for the auxiliary

database

12.1, you need to use a

SERVICE_NAME

Page 22: Oracle 12c and its pluggable databases

Viewing Backup Reports

Page 23: Oracle 12c and its pluggable databases

DEMO 2

Page 24: Oracle 12c and its pluggable databases

Where is The DBA Job Going? •  Database as a Service (DBaaS)

–  Revenues will grow from 150 million in 2012 to 1.8 billion by 2016 - Forbes

–  Paradigm where end users can request database services, consume it for the lifetime of the project, and then have then automatically de-provisioned and returned to the resource pool.

–  Allows you scale out and scale back database resources as needed.

Page 25: Oracle 12c and its pluggable databases

FIT-ACER

•  F – Focus (SLOW DOWN! Are you ready?) •  I – Identify server/DB name, time, authorization •  T – Type the command (do not hit enter yet) •  A – Assess the command (SPEND TIME HERE!) •  C – Check the server / database name again •  E – Execute the command •  R – Review and document the results

Page 26: Oracle 12c and its pluggable databases

Thank you – Q&A To contact us

[email protected]

1-877-PYTHIAN

To follow us http://www.pythian.com/blog

http://www.facebook.com/pages/The-Pythian-Group/163902527671

@pythian

http://www.linkedin.com/company/pythian