Today, many businesses around the world are using an Oracle product and in many of these at the core there is an Oracle Database. Many of us who started as a Database administrator where put in this position because we were good PL/SQL programmers or good Sysadmins, but knew very little of what it took to be a DBA. In this session you will learn the core architecture of an Oracle Database in 12c as well as what it takes to administer and apply this new knowledge the day you go back to your office.
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
DBA 101 : Calling all New Database Administrators (PPT)
1. DBA 101 : Calling all New
Database Administrators
Presented by : Gustavo René Antúnez
Oracle DBA
The Pythian Group
April, 2014
2. 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
3. About Me
– Oracle DBA
– Part of the First Oracle
Associate Group
• 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
– @grantunez
• #CLV14
6. Happiest Job of 2014!*
*http://www.forbes.com/sites/susanadams/2014/03/20/the-happiest-and-unhappiest-jobs-in-2014/
Work-life
balance
Relationship with
boss and co-
workers
Daily tasks
Job
resources
Field will grow by
15% between
2012 and 2022
DBA can be the
key driver of
success
7. Happiest Job of 2034?
*Oxford University: THE FUTURE OF EMPLOYMENT: HOW SUSCEPTIBLE ARE JOBS TO COMPUTERISATION?
• 47 percent of American jobs are at high risk of being
taken by computers within the next two decades.*
– 1st Wave
• Computers will start replacing people in especially vulnerable
fields like transportation/logistics, production labor, and
administrative support.
– 2nd Wave
• Dependent upon the development of good artificial
intelligence. This could next put jobs in management, science
and engineering, and the arts at risk.
8. What is an Oracle database Server ?
• It is comprised of :
– Database
– Database Instance or Instance
• Each of those is independent, meaning that you can
have one without the other
9. What is an Oracle database Server ?
• 9i Version Architecture
Snnn
Users
DBWR
SGA
Database Buffer Cache Redo Log Buffer
Dedicated
Server
Process
LCK0RECOPMONSMON
CKPT
User
Process
Dnnn
LGWR ARCH
SNPn
Pnnn
Online
Redo Log
10101
10101
10101
Data Files
10101
10101
10101
Control Files
Archived
Redo Log
14. • There is physical and logical viewpoint, and
each have their own structures
– Physical
• Control Files
• Online Redo Logs
• Data files
– Logical
» Data block
» Extent
» Segment
» Tablespace
Database
Segment
Database
Tablespace
Extent
Oracle data
block
Schema Data file
OS block
Logical Physical
15. • Binary file that holds the metadata which
specifies the physical organization of your
database
Controlfiles
10101
Control Files
Checkpoint
information
Current Online Redo Log
Sequence
RMAN Backup
Information
Database Name
16. • Set of files that record altered data .A redo log is
made up of redo records and these records
include the following metadata
Online Redo Logs
Online Redo
Log
SCN and time
stamp of the
change
Transaction ID of the
transaction that
generated the
change
SCN and time stamp
when the transaction
committed (if it
committed)
Name and type of
the modified data
segment
Type of operation that
made the change
17. • File that contains system and user data
Data files
10100
Data Files
Data File
Header
Used
Free (Formatted, Never
Used)
Free (Previously Used,
Currently Unused)
18. • Data block. – It is the smallest logical
unit; data is stored in data blocks
• Extent. – A single allocation of a number of
logically bordering data blocks. An extent
can exist in only one data file.
• Segment. – A set of extents allocated
for user, undo or temporary data
• Tablespace. –This is the container of
segments, defined as a storage unit
that groups related logical structures
Logical
Segment
Database
Tablespace
Extent
Oracle data
block
Schema Data file
OS block
Logical Physical
19. Oracle database Instance
• Set of memory structures and processes that
manage database files
System Global Area (SGA)
Shared Pool
Library Cache
Shared SQL Area
SELECT * FROM employees
Private SQL Area
(Shared Server
Only)
Data
Dictionary
Cache
Server
Result
Cache
Other Reserved
Pool
Large Pool
Response
Queue
Request
Queue
Database
Buffer Cache Redo log
Buffer
Fixed
SGA Java Pool
Streams
Pool
Instance
Server
Process
SQL Work Areas
Private SQL AreaSession Memory
DBWn CKPT LGWR ARCn RVWR
Others
MMNL
MMON
RECO
SMON
PMON
Background
Processes
Free Memory
I/O Buffer Area
UGA
PGA
20. Memory Architecture
System Global Area (SGA)
Shared Pool
Library Cache
Shared SQL Area
SELECT * FROM employees
Private SQL Area
(Shared Server
Only)
Data
Dictionary
Cache
Server
Result
Cache
Other Reserved
Pool
Large Pool
Response
Queue
Request
Queue
Database
Buffer Cache Redo log
Buffer
Server
Process
SQL Work Areas
Private SQL AreaSession Memory
PGA
Contains session-
dependent
variables
Stores copies of
data blocks read
from data files
circular buffer that
caches redo entries
describing changes
made to the database
Intended for memory
allocations that are
larger than is
appropriate for the
shared pool
Group of shared memory
structures that contain data and
control information for one
database instance
It stores
executable SQL
and PL/SQL code
Holds information
about database
tables and views
An Oracle process that
communicates with a client
process and Oracle Database to
fulfill user requests
21.
22. Critical Proceses
DBWn CKPT LGWR ARCn Others
MMNL
MMON
SMON
PMON
Background
Processes
Monitors other background
process and performs
process recovery
Process in charge of several
system-level cleanup tasks
Writes the contents of the
modified database buffers in
the buffer cache to the
datafiles
RECO Resolves failures in a
distributed transaction
Performs tasks related to the
Automatic Workload
Repository
Updates the control file and
data file headers with the
checkpoint information
Writes the redo entries from
one or more redo log buffer
strands
Copies online redo log files
to offline storage after a redo
log switch occurs
LREG
Registers information about
the database instance with
the Net Listener
23. 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
24. 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
25. What is a Pluggable Database?
Root
(CDB$ROOT)
HR
PDB
Sales
PDB
CDB
Seed
(PDB$SEED)
Sales
PDB2
CREATE PLUGGABLE DATABASE. . . FROM
New
PDB
CREATE PLUGGABLE DATABASE
27. 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
28. 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##
29. Automatic Workload Repository
• Periodically makes a snapshot of essential
statistics
• Licensable option within the Oracle Database
• Controlled by the parameter
STATISTICS_LEVEL and
CONTROL_MANAGEMENT_PACK_ACCESS
30. Automatic Workload Repository
• It has the following components
– SGA In-Memory AWR statistics
– AWR snapshots
Database Instance
SGA
Statistics
SYSAUX
AWR
MMON
31. Oracle Database and High
Availability
• Availability is percentage of uptime in a year that
a designed system in which it guarantees that it
will be operational during a pre-established
service level of agreement
32. Oracle Database and High
Availability
• A highly available architecture should have the
following characteristics:
– Tolerate Failures
– Prevent data loss
– Achieve Recovery Time Objectives (RTO) and
Recovery Point Objectives (RPO)
– Detect errors in a timely manner
33. Oracle Real Application Cluster
• Architecture that has a one Database to many
Instances relationship
• All datafiles,control files and redo logs must be in
a cluster-aware disks
• One redo thread per instance
• If using Automatic Undo Management also
require one UNDO tablespace per instance
34. Oracle Real Application Cluster
Node 1
Instance 1
Node 2
Instance 2
Interconnect
Shared
Storage
Local
Disk
Local
Disk
35. Oracle Data Guard
• Manage and monitor one or up to 30
geographically dispersed standby databases.
• Only propagates the redo data in the logs, so no
disk corruptions are introduced in the standby
• Physical Standby
– Identical copy of the primary database on a block-by-
block basis
• Logical Standby
– Contains the same logical information as the primary,
and is synchronized through SQL Apply
37. Oracle Golden Gate
• Logical log based change data capture (CDC) and
replication that enables the exchange and manipulation
at the transaction level amongst heterogeneous
platforms
• Replication may be uni-directional, bi-directional or multi-
dimensional
• Considerations should be made:
– Database in archive log mode
– Supplemental logging at the source
– Sufficient disk space to store trail files
– Use a Data Pump when the target connection is via TCP/IP.
– If using RAC, Golden Gate should reside on SAN shared by the
RAC servers.
38. Oracle Golden Gate
Capture Trail
Pump Delivery
TrailLAN/WAN
Internet
TCP/IP
Capture: committed transactions are captured (and can be filtered) as
they occur by reading the transaction logs.
Trail: stages and queues data for routing.
Pump: distributes data for routing to target(s).
Route: data is compressed, encrypted for routing to
target(s).
Delivery: applies data with transaction integrity,
transforming the data as required.
Source
Oracle & Non-Oracle
Database(s)
Target
Oracle & Non-Oracle
Database(s)
39. Maximum Availability Architecture
(MAA)
• Oracle’s generally recommended :
– Oracle Golden Gate for any advanced or granular
replication requirements, combined with Oracle RAC
and Data Guard
40. 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
41. 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
42. 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
43. Where is The DBA Job Going in the
near future?
• 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.
– Elasticity to scale out and scale back database
resources
44. 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
45.
46. Pythian at Collaborate 2014
Session
ID
Session
Date
Start
Time Session Room Session Title
Presenter
Name
157 4/9/2014 8:30 AM Level 3, Lido 3101B Database Private Clouds with Oracle Database 12c Marc Fielding
574 4/9/2014 8:30 AM Level 3, Lido 3005 DBA 101 : Calling all New Database Administrators Rene Antunez
14408 4/9/2014 4:30 PM Sands, Level 1 - 309What's New in Oracle E-Business Suite R12.2 for Database
Administrators?
Vasu Balla
158 4/10/2014 3:00 PM Level 3, San Polo
3403
Accelerate Your Exadata Deployment with the Skills You Already Have Marc Fielding
411 4/10/2014 4:15 PM Level 3, Murano
3306
Thou Shalt Not Steal: Securing Your Infrastructure in the Age of
Snowden
Paul Vallee
544 4/10/2014 11:00 AM Level 3, San Polo
3403
My First 100 days with an Exadata Rene Antunez
135 4/11/2014 9:45 AM Level 3, Lido 3003 Ensuring Your Physical Standby is Usable Michael Abbey
194 4/11/2014 12:15 PM Level 3, Lido 3101B 12c Multi-Tenancy and Exadata IORM: An Ideal Cloud Based Resource
Management
Fahd Chughtai
546 4/11/2014 8:30 AM Level 3, Lido 3103 RMAN in 12c: The Next Generation ReneAntunez
878 4/11/2014 9:45 AM Level 3, San Polo
3405
Practical Machine Learning for DBAs Alex Gorbachev
47. Thank you – Q&A
To contact us
sales@pythian.com
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
We are hiring!
Booth 1535