Date post: | 13-May-2015 |
Category: |
Technology |
Upload: | gustavo-rene-antunez |
View: | 7,096 times |
Download: | 6 times |
Oracle 12c and its pluggable databases
Presented by : Gustavo René Antúnez Oracle DBA The Pythian Group February, 2014
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
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
Where do I come from?
How did you get to be a DBA
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
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
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
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
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
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##
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
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
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
DEMO 1
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)
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
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;
• 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
• 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
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
Viewing Backup Reports
DEMO 2
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.
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
Thank you – Q&A To contact us
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