Вы находитесь на странице: 1из 186

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a
) has
ฺ c om ฺ
Exadata Database i rco uMachine
ide
Administration @
lli ntWorkshop
G
v a
a tude
a d
a ฺy isGuide
rActivity S – Volume I
um se t h
u k
( v en e to u
v a lli ens
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

D73668GC21
Edition 2.1
February 2014
D85492
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Disclaimer

This document contains proprietary information and is protected by copyright and other intellectual property laws. You may copy and
print this document solely for your own use in an Oracle training course. The document may not be modified or altered in any way.
Except where your use constitutes "fair use" under copyright law, you may not use, share, download, upload, copy, print, display,
perform, reproduce, publish, license, post, transmit, or distribute this document in whole or in part without the express authorization
of Oracle.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

The information contained in this document is subject to change without notice. If you find any problems in the document, please
report them in writing to: Oracle University, 500 Oracle Parkway, Redwood Shores, California 94065 USA. This document is not
warranted to be error-free.

Restricted Rights Notice

If this documentation is delivered to the United States Government or anyone using the documentation on behalf of the United
States Government, the following notice is applicable:

U.S. GOVERNMENT RIGHTS


The U.S. Government’s rights to use, modify, reproduce, release, perform, display, or disclose these training materials are restricted
by the terms of the applicable Oracle license agreement and/or the applicable U.S. Government contract. a
Trademark Notice
) has
ฺ c om ฺ
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective
owners.
i rco uide
Author a l li@ nt G
Peter Fusek
a d av tude
a rฺy his S
Technical Contributors and Reviewers
k m Babb,
uAndrew e t Aslam Edah-Tally, Barb Lundhild,
Akshay Shah, Alex Tsukerman, Amit Ganesh, u s
u Valny, Bruce Kyro, Caroline Johnston,
( v en e toBranislav
Bharat Baddepudi, Bill Hodak, Boris Erlikhman,

v a lli Presley,
Christian Craft, Dan Norris, Darryl
e n sDave Winter, David Hernandez Mendoza, David
Hitchcock, Deba Chatterjee,
d a Douglas
l i c Womack, Jean-Francois
Utzig, Ed Gilowski, Eric Siglin, Georg Schmidt, Harald van
Y a ble
Breederode, Ira Singer, James He, James Verrier, Jia Shi,Jignesh
Patel, Jim Hall, rJim Spiller,
aUmamageswaran,
e raJim Viscusi, Joel Goodman, Juan Loaiza, Kam Shergill,Kevin
Jernigan, m
u To, Louis
Kodi
n s f Krishnanjani Chitta, Lachlan Williams, Larry Justice,
u k
Lawrence
n Scardina, r a
t Mark Van de Wiel, Marshall Presser, Martin
Nagode, Mahesh Subramaniam, Maria Billings, Maria Colgan, Mark Fuller,
e n -
VNowak,noNaoki Kato, Nilesh Choudhury, Ravindra Dani, Raymond
Mark Jensen, Michael Cebulla, Michael
Dutcher, Richard Exley,
Robert Carlin, Robert Pastijn, Roger Hansen, Sabyasachi Banerjee, Sean Kim, Selcuk Aya,
Scott Gossett, Sriram Palapudi, Steven Lemme, Sue Lee, Sugam Pandey, Sumeet Lahorani,
Sundararaman Sridharan, Tim Shelter, Umesh Panchaksharaiah, Uwe Hesse, Varun Malhotra,
Vern Wagman, Vijay Sridharan, Vikram Kapoor, Vimala Jacob

This book was published using: oracletutor


Table of Contents
Practices for Lesson 1: Introduction ..............................................................................................................1-1
Practices for Lesson 1....................................................................................................................................1-2
Practice 1-1: Lab Environment Introduction ...................................................................................................1-3
Practices for Lesson 2: Exadata Database Machine: Overview ...................................................................2-1
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Practices for Lesson 2....................................................................................................................................2-2


Practices for Lesson 3: Exadata Database Machine Architecture ...............................................................3-1
Practices for Lesson 3....................................................................................................................................3-2
Practice 3-1: Process Familiarization .............................................................................................................3-3
Practice 3-2: Exadata High Availability...........................................................................................................3-6
Practice 3-3: Storage Object Familiarization ..................................................................................................3-11
Practice 3-4: Exadata Smart Flash Cache Familiarization .............................................................................3-19
Practices for Lesson 4: Key Capabilities of Exadata Database Machine ....................................................4-1
a
has
Practices for Lesson 4....................................................................................................................................4-2
)
Practice 4-1: Smart Scan ...............................................................................................................................4-3
Practice 4-2: Exadata Hybrid Columnar Compression ...................................................................................4-7
ฺ c om ฺ
rco uide
Practice 4-3: Exadata Smart Flash Cache .....................................................................................................4-10
i
lli@ nt G
Practice 4-4: Storage Index ............................................................................................................................4-19
Practices for Lesson 5: Exadata Database Machine Initial Configurationv
a tude a
..................................................5-1
a d
Practices for Lesson 5....................................................................................................................................5-2
Practice 5-1: Using the Oracle Exadata Deployment Assistant a ฺy is S
r......................................................................5-3
Practices for Lesson 6: Exadata Storage Server Configuration k u e th
m ..................................................................6-1
e n u o us
Practices for Lesson 6....................................................................................................................................6-2
l i (v se t
Practice 6-1: Cell Configuration......................................................................................................................6-3
l
v
Practice 6-2: Storage Reconfiguration
a l i c en
a ...........................................................................................................6-6
Practice 6-3: Consuming
Y adGrid Disks b l eby Using ASM .......................................................................................6-25
m
Practiceu6-5:
ar feExadata
Practice 6-4: Configuring ra ....................................................................................................................6-49
Cell UsersAccounts
Storage Security ......................................................................................6-34

uk 6-6:-Using
nPractice t r anthe Distributed Command-Line Utility (dcli) .....................................................................6-51
e
nofornLesson 7: I/O Resource Management ......................................................................................7-1
VPractices
Practices for Lesson 7....................................................................................................................................7-2
Practices for Lesson 8: Recommendations for Optimizing Database Performance ..................................8-1
Practices for Lesson 8....................................................................................................................................8-2
Practice 8-1: Configuring Write Back Flash Cache ........................................................................................8-3
Practice 8-2: Using Exadata Hybrid Columnar Compression .........................................................................8-9
Practice 8-3: Testing Index Elimination ..........................................................................................................8-22
Practices for Lesson 9: Using Smart Scan ....................................................................................................9-1
Practices for Lesson 9....................................................................................................................................9-2
Practice 9-1: Monitoring Exadata Smart Scan ...............................................................................................9-3
Practice 9-2: Monitoring Cell Wait Events for Parallel Query .........................................................................9-15
Practices for Lesson 10: Consolidation Options and Recommendations ..................................................10-1
Practices for Lesson 10..................................................................................................................................10-2
Practices for Lesson 11: Migrating Databases to Exadata ...........................................................................11-1
Practices for Lesson 11..................................................................................................................................11-2
Practice 11-1: Migrating to Databases Machine by Using Transportable Tablespaces..................................11-3

Copyright © 2014. Oracle and/or its affiliates. All rights reserved.

Exadata Database Machine Administration Workshop Table of Contents


i
Practices for Lesson 12: Bulk Data Loading by Using Oracle DBFS ..........................................................12-1
Practices for Lesson 12..................................................................................................................................12-2
Practice 12-1: Bulk Data Loading with Database Machine .............................................................................12-3
Practices for Lesson 13: Exadata Database Machine Platform Monitoring: Introduction .........................13-1
Practices for Lesson 13..................................................................................................................................13-2
Practice 13-1: Environment Reconfiguration ..................................................................................................13-3
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Practices for Lesson 14: Configuring Enterprise Manager Cloud Control 12c to Monitor Exadata
Database Machine ........................................................................................................................................14-1
Practices for Lesson 14..................................................................................................................................14-2
Practice 14-1: Configuring Enterprise Manager Cloud Control 12c to Monitor Exadata Database Machine ..14-3
Practice 14-2: Post-Discovery Configuration and Verification ........................................................................14-51
Practice 14-3: Environment Reconfiguration ..................................................................................................14-55
Practices for Lesson 15: Monitoring Exadata Storage Servers ...................................................................15-1
Practices for Lesson 15..................................................................................................................................15-2
Practice 15-1: Metrics, Alerts, and Active Requests.......................................................................................15-3 a
Practice 15-2: Exadata Storage Server Monitoring with Enterprise Manager ................................................15-16
) has
Practices for Lesson 16: Monitoring Exadata Database Machine Database Servers ................................16-1
ฺ c om ฺ
rco uide
Practices for Lesson 16..................................................................................................................................16-2
i
Practice 16-1: Exadata Database Monitoring with Enterprise Manager .........................................................16-3

a l li@ nt G
av tude
Practices for Lesson 17: Monitoring the InfiniBand Network ......................................................................17-1
d
Practices for Lesson 17..................................................................................................................................17-2
a
Practice 17-1: Exadata InfiniBand Monitoring with Enterprise Manager
a rฺy h.........................................................17-3
i s S
Practices for Lesson 18: Monitoring Other Exadata u
k m Machine
Database
e t Components ..............................18-1
u
n to u s
Practices for Lesson 18..................................................................................................................................18-2
( v e e .............................................................................19-1
Practices for Lesson 19: Other Useful
v a lli Monitoringe n sTools
a da leRecovery lic ...........................................................................................20-1
Practices for Lesson 19..................................................................................................................................19-2

r Y20..................................................................................................................................20-2
Practices for Lesson 20: Backup and
a
Practices for Lesson
f e r ab
m Environment
Practiceu20-1:
k n s Reconfiguration ..................................................................................................20-3
u r a
-tBackup Optimization ...............................................................................................................20-4
nPractice 20-2:
VePractice o n
n Recovery Optimization ............................................................................................................20-12
20-3:

Copyright © 2014. Oracle and/or its affiliates. All rights reserved.

Exadata Database Machine Administration Workshop Table of Contents


ii
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a
) has
ฺ c om ฺ
i rco uide
Practices for a l i@ t G1:
lLesson
d a v den
Introduction
r ฺ y a S tu
m a 1 this
u u
k use
Chapter

v n
e e to
i (
ll ens
v a
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 1: Introduction


Chapter 1 - Page 1
Practices for Lesson 1
Practices Overview
In this practice, you will be introduced to the laboratory environment used to support all the
practices during this course.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a
) has
ฺ c om ฺ
i rco uide
a l li@ nt G
a d av tude
a rฺy his S
u k um se t
( v en e to u
v a lli ens
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 1: Introduction


Chapter 1 - Page 2
Practice 1-1: Lab Environment Introduction
Overview
In this practice, you will learn how to use the laboratory environment that supports all the
practices in this course.
The laboratory environment for this course is based on a Quarter Rack Database Machine. It
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

consists of several virtual machines configured to provide an Oracle Database server and three
Exadata Storage Servers. The second Oracle Database server, which is normally found on a
Quarter Rack Database Machine, is initially not started due to physical resource constraints.
To access the virtual machines, you will first establish a graphical session which is connected to
the VM server. Your instructor will provide specific details for each student's server. From there,
you will create terminal sessions as required and connect to the virtualized Database Machine
servers by using SSH as described in the tasks for this practice.

Tasks a
1. Establish a terminal session connected to the qr01db01 database server by using the
) has
grid operating system account.
ฺ c om ฺ
Note that you may see additional messages relating to server identities.
i o idyes
rcAnswer e if you
are prompted to acknowledge server authenticity.
l l i@ t G u
$ ssh grid@qr01db01
a a
v den
grid@qr01db01's password: <oracle>ya d tu
r ฺ
a this S
[grid@qr01db01 ~]$
u m
k thatuallsofe the listed services are online in your
2. Execute the following command and u verify
v
laboratory environment. Your (output
n
e should tolook like the example below. Alert your
i
ll the same
instructor if you do not have
e
nsservices online in your environment.
v a c e
ada~]$bcrsctl
[grid@qr01db01
Y l e li status resource -w "TARGET = ONLINE" -t
ar sferTARGET a
------------------------------------------------------------------------------

k u m
NAME
n
STATE SERVER STATE_DETAILS

nu Local a
trResources
------------------------------------------------------------------------------
-
e n
V no------------------------------------------------------------------------------
ora.DATA_QR01.dg
ONLINE ONLINE qr01db01
ora.DBFS_DG.dg
ONLINE ONLINE qr01db01
ora.LISTENER.lsnr
ONLINE ONLINE qr01db01
ora.RECO_QR01.dg
ONLINE ONLINE qr01db01
ora.asm
ONLINE ONLINE qr01db01 Started
ora.net1.network
ONLINE ONLINE qr01db01
ora.ons
ONLINE ONLINE qr01db01
------------------------------------------------------------------------------
Cluster Resources

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 1: Introduction


Chapter 1 - Page 3
------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE qr01db01
ora.LISTENER_SCAN2.lsnr
1 ONLINE ONLINE qr01db01
ora.LISTENER_SCAN3.lsnr
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

1 ONLINE ONLINE qr01db01


ora.cvu
1 ONLINE ONLINE qr01db01
ora.dbm.db
1 ONLINE ONLINE qr01db01 Open
2 ONLINE OFFLINE
ora.oc4j
1 ONLINE ONLINE qr01db01
ora.qr01db01.vip
a
has
1 ONLINE ONLINE qr01db01
ora.qr01db02.vip )
1 ONLINE INTERMEDIATE qr01db01
c om ฺ
FAILED OVER

ora.scan1.vip
i rco uide
1 ONLINE ONLINE qr01db01
a l li@ nt G
av tude
ora.scan2.vip
1 ONLINE ONLINE qr01db01
a d
ora.scan3.vip
a rฺy his S
1 ONLINE ONLINE
u k um se t
qr01db01

en e ASM to uenvironment as an ASM administrator.


[grid@qr01db01 ~]$
3. Using SQL*Plus, connect toi the( v clustered
a ll to the
Verify that you are connected
v e s instance +ASM1 and exit your SQL*Plus session.
nASM
c
Y ada b~]$
[grid@qr01db01 l
i
e lsqlplus / as sysasm

m ar sfera
n u kuSQL*Plus:
t r a n Release 11.2.0.3.0 Production...
Ve noSQL> n-
select instance_name from v$instance;

INSTANCE_NAME
----------------
+ASM1

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release
11.2.0.3.0 - 64bit Production...
[oracle@qr01db01 ~]$

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 1: Introduction


Chapter 1 - Page 4
4. Establish a new shell as the oracle OS user.
[grid@qr01db01 ~]$ su - oracle
Password: <oracle>
[oracle@qr01db01 ~]$
5. Using SQL*Plus, connect to your database as the database administrator. Verify that you
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

are connected to the DBM database and exit your SQL*Plus session.
[oracle@qr01db01 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production...

SQL> select name from v$database;

a
has
NAME
---------
)
DBM
ฺ c om ฺ
i r co uide
SQL> exit
a l li@ nt G
Disconnected from Oracle Database 11g a v de Edition Release
Enterprise
11.2.0.3.0 - 64bit Production... yad tu
r ฺ
a this S
[oracle@qr01db01 ~]$
u m
6. Use the srvctl utility to verify the status
n u se database.
k of theuDBM
[oracle@qr01db01 i~]$ ( v esrvctle tstatus
o
a l l n s database -d dbm
Instance dbm1vis running
d a l i ce on node qr01db01
Instance adbm2 isle
r Y
a sfer ~]$ a b not running on node qr01db02

u m
[oracle@qr01db01
k thattthe
nuNote - r anDBM database is an administrator-managed Oracle RAC database created on
e
V two n
database servers; qr01db01 and qr01db02. As mentioned previously, you will use
nodatabase
the instance running on qr01db01 to perform most the practices. The other
database server (qr01db02) will not be started for most of the practices to avoid
unnecessary resource consumption in the laboratory environment.
7. Many practices refer to SQL scripts, which are provided as an alternative to typing lengthy
commands. These scripts are located in the labs directory under your student home
directory. List the files in the labs directory. Notice also the CSV, TTS and Exaconf
subdirectories. These subdirectories contain additional files for specific practices. You will
be directed to these files in the associated practice instructions.
[oracle@qr01db01 ~]$ cd labs
[oracle@qr01db01 labs]$ ls
CSV lab04-04-03.sql lab06-03-07.sql lab11-01-15.sql
Exaconf lab04-04-04.sql lab06-03-08.sql lab12-01-22.sql
lab03-02-03.sql lab06-02-03.sql lab06-04-21.sql lab15-01-33.sql
lab03-03-11.sql lab06-02-04.sql lab08-02-04.sql lab15-01-35.sql
lab03-03-12.sql lab06-02-06.sql lab08-02-06.sql lab15-01-36.sql
lab04-01-03.sql lab06-02-09.sql lab08-02-07.sql lab20-02-10.sql
lab04-01-04.sql lab06-02-18.sql lab08-02-15.sql lab20-02-11.sql

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 1: Introduction


Chapter 1 - Page 5
lab04-01-08.sql lab06-02-28.sql lab09-01-06.sql lab20-02-16.sql
lab04-02-03.sql lab06-02-38.sql lab09-01-07.sql lab20-03-13.sql
lab04-02-04.sql lab06-03-03.sql lab09-02-07.sql TTS
lab04-03-05.sql lab06-03-04.sql lab09-02-08.sql
lab04-03-08.sql lab06-03-05.sql lab09-02-09.sql
lab04-03-15.sql lab06-03-06.sql lab11-01-05.sql
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

[oracle@qr01db01 labs]$

8. Establish a terminal session connected to your first Exadata cell using the celladmin
user. Confirm that you are connected to the cell and then exit the session.
Note that you may see additional messages relating to server identities. Answer yes if you
are prompted to acknowledge server authenticity.
$ ssh celladmin@qr01cel01
celladmin@qr01cel01's password: <welcome>
[celladmin@qr01cel01 ~]$ cellcli -e list cell
a
qr01cel01 online
) has
[celladmin@qr01cel01 ~]$ exit
ฺ c om ฺ
rco uide
logout
i
li@ nt G
Connection to qr01cel01 closed.
a l
av celldeusing the
$
9. Establish a terminal session connected to your seconda d Exadatatu
cellmonitor user. Confirm you are connected a rฺtoythehcellisand
S then exit the session.
k
Note that you may see additional messages
u umrelated
s e t
to server identities. Answer yes if you
are prompted to acknowledge server t o u
en authenticity.
( v
a lli ense
$ ssh cellmonitor@qr01cel02
v
da le lic password: <welcome>
cellmonitor@qr01cel02's
a
a r Y erab
[cellmonitor@qr01cel02 ~]$ cellcli -e list cell
f
um ansqr01cel02 online
u k
n n-t r
[cellmonitor@qr01cel02 ~]$ exit
e
V nologout
Connection to qr01cel02 closed.
$
10. Exit your terminal sessions. We recommend that you start fresh terminal sessions at the
beginning of each practice, and that you exit all of your terminal sessions at the conclusion
of every practice. This eliminates the possibility that environment settings used in one
practice could cause problems in following practices.

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 1: Introduction


Chapter 1 - Page 6
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a
) has
ฺ c om ฺ
i rco uide
Practices for a l i@ t G2:
lLesson
d a v den
Exadata
r ฺ y a Database
S tu Machine:
a this
Overview
m
u u
k use
v n
e e Chapter
to 2
i (
ll ens
v a
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 2: Exadata Database Machine: Overview


Chapter 2 - Page 1
Practices for Lesson 2
Practices Overview
There is no practice for Lesson 2.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a
) has
ฺ c om ฺ
i rco uide
a l li@ nt G
a d av tude
a rฺy his S
u k um se t
( v en e to u
v a lli ens
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 2: Exadata Database Machine: Overview


Chapter 2 - Page 2
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a
) has
ฺ c om ฺ
i rco uide
Practices for a l i@ t G3:
lLesson
d a v den
Exadata
r ฺ y a Database
S tu Machine
a this
Architecture
m
u u
k use
v n
e e Chapter
to 3
i (
ll ens
v a
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 3: Exadata Database Machine Architecture


Chapter 3 - Page 1
Practices for Lesson 3
Practices Overview
In these practices, you will be familiarized with the Exadata cell architecture. You will:
• Examine the Exadata processes
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Exercise Exadata high availability


• Examine the hierarchy of cell objects
• Examine Exadata Smart Flash Cache

a
) has
ฺ c om ฺ
i rco uide
a l li@ nt G
a d av tude
a rฺy his S
u k um se t
( v en e to u
v a lli ens
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 3: Exadata Database Machine Architecture


Chapter 3 - Page 2
Practice 3-1: Process Familiarization
Overview
In this practice, you will examine the Exadata cell software processes.
Tasks
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

1. Establish a terminal connection to qr01cel01 as the celladmin user.


2. Restart Server (RS) is used to start up and shut down the Cell Server (CELLSRV) and
Management Server (MS). It also monitors these services to check whether they need to be
restarted. Locate the RS processes by using the following command:
[celladmin@qr01cel01 ~]$ ps -ef | grep cellrs
root 2025 1 0 18:29 ? 00:00:00
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/cellsrv/bin/cellrssrm -ms 1 -
cellsrv 1
root 2032 2025 0 18:29 ? 00:00:00
a
has
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/cellsrv/bin/cellrsmmt -ms 1 -
cellsrv 1
)
root 2033 2025 0 18:29 ? 00:00:00
ฺ c om ฺ
rco uide
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/cellsrv/bin/cellrsbmt -ms 1 -
cellsrv 1
i
root 2035 2033 0 18:29 ?
a l li@ nt G
00:00:00

av tude
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/cellsrv/bin/cellrsbkm -rs_conf
d
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/cellsrv/deploy/config/cellinit.ora
a
-ms_conf
a rฺy his S
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/cellsrv/deploy/config/cellrsms.sta
te -cellsrv_conf
u k um se t
en e to u
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/cellsrv/deploy/config/cellrsos.sta
te -debug 0
( v
root
v a lli ens
2036 2025 0 18:29 ? 00:00:01

da le lic
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/cellsrv/bin/cellrsomt -ms 1 -
a
cellsrv 1

a r Y erab
root 2044 2035 0 18:29 ? 00:00:00

k u m nsf
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/cellsrv/bin/cellrssmt -rs_conf

nu n-tra
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/cellsrv/deploy/config/cellinit.ora
-ms_conf
e
V no /opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/cellsrv/deploy/config/cellrsms.sta
te -cellsrv_conf
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/cellsrv/deploy/config/cellrsos.sta
te -debug 0
1000 3609 3577 0 19:02 pts/0 00:00:00 grep cellrs
[celladmin@qr01cel01 ~]$

3. MS provides Exadata cell management and configuration. It works in cooperation with the
Exadata cell command-line interface (CellCLI). In addition, MS is responsible for sending
alerts and collects some statistics in addition to those collected by CELLSRV. Locate the MS
process by using the following command:
[celladmin@qr01cel01 ~]$ ps -ef | grep ms.err
root 2034 2032 1 18:29 ? 00:00:30 /usr/java/jdk1.5.0_15/bin/java
-Xms256m -Xmx512m -
Djava.library.path=/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/cellsrv/lib -
Ddisable.checkForUpdate=true -jar
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/oc4j/ms/j2ee/home/oc4j.jar -out
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/cellsrv/deploy/log/ms.lst -err
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/cellsrv/deploy/log/ms.err
1000 3623 3577 0 19:02 pts/0 00:00:00 grep ms.err
[celladmin@qr01cel01 ~]$
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 3: Exadata Database Machine Architecture


Chapter 3 - Page 3
4. Locate the MS parent process. Use the parent process number associated with MS in the
output for step 3. Note that RS spawns (and, when required, re-spawns) MS.
[celladmin@qr01cel01 ~]$ ps -ef | grep 2032
root 2032 2025 0 18:29 ? 00:00:00
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/cellsrv/bin/cellrsmmt -ms 1 -
cellsrv 1
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

root 2034 2032 1 18:29 ? 00:00:31 /usr/java/jdk1.5.0_15/bin/java


-Xms256m -Xmx512m -
Djava.library.path=/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/cellsrv/lib -
Ddisable.checkForUpdate=true -jar
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/oc4j/ms/j2ee/home/oc4j.jar -out
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/cellsrv/deploy/log/ms.lst -err
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/cellsrv/deploy/log/ms.err
1000 3625 3577 0 19:03 pts/0 00:00:00 grep 2032
[celladmin@qr01cel01 ~]$

5. CELLSRV is the primary Exadata software component and provides the majority of Exadata
a
has
storage services. CELLSRV is a multithreaded server. Primarily, CELLSRV communicates
with Oracle Database to serve simple block requests, such as database buffer cache reads,
)
ฺ c om ฺ
and Smart Scan requests, such as table scans with projections and filters. CELLSRV also

i rco uide
implements I/O Resource Management (IORM) and collects numerous statistics relating to
its operations. Locate the CELLSRV process by using the following command:
[celladmin@qr01cel01 ~]$ ps -ef | grep "/cellsrv "al
li@ nt G
root 2037 2036 12 18:29 ?
a d
00:04:28av tude
r ฺy is S
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/cellsrv/bin/cellsrv
a
25 1200 9 5042
1000 3652 3577 0 19:04 pts/0m 00:00:00
k u e th grep /cellsrv
[celladmin@qr01cel01 ~]$
e n u o us
6. Locate the CELLSRV parent process.
l l i (v sethet parent process number associated with
Use
CELLSRV in the output for
a v l en that RS spawns (and, when required, re-spawns)
astep 5.icNote
CELLSRV.
Y ad ble~]$ ps -ef | grep 2036
m ar s2036 f e ra2025 0 18:29 ?
[celladmin@qr01cel01

k uroot
n
a1
00:00:01

e nu cellsrv
n - t r
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/cellsrv/bin/cellrsomt -ms 1 -

V noroot 2037 2036 13 18:29 ? 00:04:32


/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/cellsrv/bin/cellsrv 25 1200 9 5042
1000 3654 3577 0 19:04 pts/0 00:00:00 grep 2036
[celladmin@qr01cel01 ~]$
7. Launch the Exadata cell command-line interface (CellCLI).
[celladmin@qr01cel01 ~]$ cellcli
CellCLI: Release 11.2.3.2.1 – Production...
CellCLI>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 3: Exadata Database Machine Architecture


Chapter 3 - Page 4
8. Execute the following CellCLI command to examine the attributes of the cell. Note that the
output also confirms that CELLSRV, MS, and RS are currently up and running. Exit CellCLI
after examining the cell attributes.
CellCLI> list cell detail
name: qr01cel01
bbuTempThreshold: 60
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

bbuChargeThreshold: 800
bmcType: absent
cellVersion: OSS_11.2.3.2.1_LINUX.X64_130109
cpuCount: 1
diagHistoryDays: 7
fanCount: 1/1
fanStatus: normal
flashCacheMode: WriteThrough
id: 8ab50138-a667-4793-a976-c540dc1930c5 a
interconnectCount: 3
) has
om ฺ
interconnect1: eth1
ฺ c
rco uide
iormBoost: 0.0
ipaddress1: i 192.168.1.103/24
kernelVersion:
a l li@ nt G2.6.32-400.11.1.el5uek
makeModel:
a d av tude Fake hardware

rฺy his S
metricHistoryDays: 7
offloadEfficiency:a 663.5
powerCount:
u k um se t 1/1

( v en e to u
powerStatus: normal

v a lli ens
releaseVersion: 11.2.3.2.1

da le lic
releaseTrackingBug: 14522699

a status: online

a r Y erabtemperatureReading: 0.0

k u m nsf temperatureStatus: normal

e nu n-tra upTime: 0 days, 0:36


V no cellsrvStatus:
msStatus:
running
running
rsStatus: running

CellCLI> exit
quitting

[celladmin@qr01cel01 ~]$
9. Exit all of your terminal sessions.

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 3: Exadata Database Machine Architecture


Chapter 3 - Page 5
Practice 3-2: Exadata High Availability
Overview
In this practice, you will observe some of the high-availability features of Exadata Storage
Server.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Tasks
1. Establish a terminal connection to qr01db01 as the oracle user.
2. Connect to your database with SQL*Plus. Log in as the sales user.
[oracle@qr01db01 ~]$ sqlplus sales/sales

SQL*Plus: Release 11.2.0.3.0 Production...

a
hasa
SQL>
3. Execute the SQL script /home/oracle/labs/lab03-02-03.sql. The script contains )
m Oracle
series of I/O intensive queries, which are used in this practice to demonstrate ฺ c ohow
Database is insulated from the different Exadata failure scenarios thati r i d eฺ in
careodemonstrated
@ tIfG
the practice. Check on the workload periodically throughout thelipractice. theuworkload
completes before you finish all the tasks, then simply re-execute
l
va thedescript
n to maintain an
active workload throughout the practice. a d a tu
SQL> @/home/oracle/labs/lab03-02-03 r ฺ
a thisy S
u m
k use
SQL> set timing on
SQL> select count(*)ve n u
i ( e to
from sales;

v a ll ens
...
a da le lic
Y rterminal
4. Establishaarseparate ab connection to the qr01cel01 Exadata cell as the root user.
Theu m password f e
s is oracle. Leave your SQL*Plus terminal session and workload
u k root
r a n
n n-t
running in the background.
Ve5. Locate
no the process identification number for CELLSRV by using the following ps command.
[root@qr01cel01 ~]# ps -ef | grep "/cellsrv "
root 2037 2036 12 18:29 ? 00:04:28
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/cellsrv/bin/cellsrv 25 1200 9 5042
root 3752 3677 0 19:06 pts/0 00:00:00 grep /cellsrv
[root@qr01cel01 ~]#

6. Terminate the CELLSRV process by using the kill command and the process
identification number you observed in step 5.
[root@qr01cel01 ~]# kill -9 2037
[root@qr01cel01 ~]#

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 3: Exadata Database Machine Architecture


Chapter 3 - Page 6
7. Re-execute the ps command from step 5. You should observe that CELLSRV is
automatically restarted with a new process identification number. How was CELLSRV
restarted?
[root@qr01cel01 ~]# ps -ef | grep "/cellsrv "
root 3801 3800 3 19:07 ? 00:00:00
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/cellsrv/bin/cellsrv 25 1200 9 5042
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

root 3852 3735 0 19:07 pts/0 00:00:00 grep /cellsrv


[root@qr01cel01 ~]#
8. Check on the progress of your workload from step 3. You should observe that the workload
continues without error.
...
SQL> select count(*) from sales where amount_sold > 2;

COUNT(*) a
----------
) has
14693419
ฺ c om ฺ
i rco uide
Elapsed: 00:00:25.72
a l li@ nt> G
SQL> select count(*) from sales where amount_sold
d a v de 3;
r ฺ y a S tu
COUNT(*)
m a this
----------
u u
k use
v n
e e to
14540531
i (
ll ens
v a
a da le lic
Elapsed: 00:00:18.79
Y rcount(*)
SQL> rselect
a ab from sales where amount_sold > 4;
um ans f e
u k tr launch the Exadata cell command-line interface (CellCLI).
9. n On qr01cel01,
e n -
V no [root@qr01cel01 ~]# cellcli
CellCLI: Release 11.2.3.2.1 – Production...

CellCLI>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 3: Exadata Database Machine Architecture


Chapter 3 - Page 7
10. You have already seen how Exadata automatically recovers from an unexpected process
failure. Now observe the effect of restarting all the Exadata services.
CellCLI> alter cell restart services all

Stopping the RS, CELLSRV, and MS services...


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

The SHUTDOWN of services was successful.


Starting the RS, CELLSRV, and MS services...
Getting the state of RS services... running
Starting CELLSRV services...
The STARTUP of CELLSRV services was successful.
Starting MS services...
The STARTUP of MS services was successful.

a
CellCLI>
) has
11. Check on the progress of your workload from step 3. You should again observem
ฺ c o that ฺthe
rco uide
workload continues without error.
i
...
a l li@ nt> G
SQL> select count(*) from sales where amount_sold
d a v de 7;
r ฺ y a S tu
COUNT(*)
m a this
----------
u u
k use
v n
e e to
13929029
i (
ll ens
v a
a da le lic
Elapsed: 00:00:24.37
Y rcount(*)
SQL> rselect
a ab from sales where amount_sold > 8;
um ans f e
u k
n nCOUNT(*)tr
e -
V no----------
13776154

Elapsed: 00:00:18.29
SQL> select count(*) from sales where amount_sold > 9;

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 3: Exadata Database Machine Architecture


Chapter 3 - Page 8
12. Exit your CellCLI session and re-execute the ps command from step 5. You should observe
that CELLSRV has a different process identification number because of the restart operation
executed in step 10.
CellCLI> exit
quitting
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

[root@qr01cel01 ~]# ps -ef | grep "/cellsrv "


root 4522 4519 9 19:13 ? 00:00:19
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/cellsrv/bin/cellsrv 25 1200 9 5042
root 4996 3735 0 19:16 pts/0 00:00:00 grep /cellsrv
[root@qr01cel01 ~]#

13. If the workload started in step 3 is still executing, stop it by typing <Control>-C in your
SQL*Plus session window. Wait until the workload stops.
...
a
has
SQL> select count(*) from sales where amount_sold > 10;
)
COUNT(*) ฺ c om ฺ
---------- i rco uide
13469722 a l li@ nt G
a d av tude
Elapsed: 00:00:18.05
a rฺy his S
u k
SQL> select count(*) from sales um where
s e t amount_sold > 11;
( v e* e to u amount_sold > 11
^Cselect count(*) from nsales where

a l li ens
ERROR at line
d v
a 1: e lic
Y a
ORA-01013: userblrequested cancel of current operation
r
a sfera
m
ku tran
n u
n-
Ve noElapsed: 00:00:09.30

SQL>
14. On qr01cel01, launch the Exadata cell command-line interface (CellCLI) again.
[root@qr01cel01 ~]# cellcli
CellCLI: Release 11.2.3.2.1 – Production...

CellCLI>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 3: Exadata Database Machine Architecture


Chapter 3 - Page 9
15. Execute the LIST ALERTHISTORY command. You should observe an alert indicating that
CELLSRV terminated unexpectedly. This alert relates to the process failure brought about
by killing CELLSRV in step 6. No alert appears for the controlled service restart executed in
step 10. If you don't see the alert, re-execute LIST ALERTHISTORY periodically until the
alert appears.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

CellCLI> list alerthistory


1_1 2013-07-17T18:31:57-04:00 warning
"Hugepage allocation failure in service cellsrv. Number of
Hugepages allocated is 0, failed to allocate 110"
2 2013-07-17T19:07:31-04:00 critical
"RS-7445 [Serv CELLSRV is absent] [It will be restarted] [] []
[] [] [] [] [] [] [] []"

CellCLI>
a
You shouldn’t see this alert in a production environment. ) has
Note that the “Hugepage allocation failure” alert is peculiar to the laboratory environment.

16. Exit all of your terminal sessions. ฺ c om ฺ


i rco uide
a l li@ nt G
a d av tude
a rฺy his S
u k um se t
( v en e to u
v a lli ens
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 3: Exadata Database Machine Architecture


Chapter 3 - Page 10
Practice 3-3: Storage Object Familiarization
Overview
In this practice, you are introduced to the hierarchy of Exadata storage objects.

Tasks
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

1. Establish a terminal connection to the qr01cel01 Exadata cell as the celladmin user.
2. Launch the Exadata cell command-line interface (CellCLI).
[celladmin@qr01cel01 ~]$ cellcli
CellCLI: Release 11.2.3.2.1 – Production...

CellCLI>
3. In Exadata, a LUN (Logical Unit) is a logical abstraction of a storage device. LUNs are
a
has
based on hard disks and flash devices. LUNs are automatically created when Exadata is
)
initially configured. Each Exadata cell contains 12 hard disk-based LUNs along with 16
flash-based LUNs. List the LUNs on your primary Exadata cell.
ฺ c om ฺ
CellCLI> list lun
i r co uide
l li@ nt Gnormal
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK00
a
av tude
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK00

a d
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK01

a rฺy his S
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK01 normal

um se t
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK02

n u k
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK02
u
normal

( v e e to
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK03

a l i
l ens
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK03 normal

d v lic
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK04
a
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK04 normal
Y a ble
ar sfera
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK05
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK05 normal
m
ku/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK06
n/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK06
n u - t r a
e n
V no/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK07
normal
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK07
normal
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK08
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK08 normal
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK09
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK09 normal
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK10
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK10 normal
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK11
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK11 normal
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/FLASH00
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/FLASH00 normal
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/FLASH01
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/FLASH01 normal
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/FLASH02
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/FLASH02 normal
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/FLASH03
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/FLASH03 normal
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/FLASH04
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/FLASH04 normal

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 3: Exadata Database Machine Architecture


Chapter 3 - Page 11
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/FLASH05
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/FLASH05 normal
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/FLASH06
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/FLASH06 normal
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/FLASH07
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/FLASH07 normal
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/FLASH08
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/FLASH08 normal
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/FLASH09
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/FLASH09 normal
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/FLASH10
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/FLASH10 normal
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/FLASH11
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/FLASH11 normal
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/FLASH12
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/FLASH12 normal
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/FLASH13
a
has
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/FLASH13 normal
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/FLASH14
)
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/FLASH14 normal
ฺ c om ฺ
rco uide
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/FLASH15
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/FLASH15 i
normal

a l li@ nt G
CellCLI>
a d av tude
Note that the output from the virtualized Exadata ฺcell
a r y shows i s S with names and
LUNs
identifiers that are paths to virtualized disksm
cell, the LUN names and identifiers arekbasedu e
onsthe
th flash devices. On a real Exadata
and virtualized
PCI slot number and device number
e n u o here u is the expected output for the LIST LUN
of the hard disk or flash device. For
( v t
example,
command on a real Exadata
v a lli cell. ense
d lun0_0le licnormal
CellCLI> list a
a
a r Y0_1 era0_1
0_0
b
u m s f normal

n u k tran0_3 0_3 normal


0_2 0_2

Ve non- 0_4 0_4 normal


normal

0_5 0_5 normal


0_6 0_6 normal
0_7 0_7 normal
0_8 0_8 normal
0_9 0_9 normal
0_10 0_10 normal
0_11 0_11 normal
1_0 1_0 normal
1_1 1_1 normal
1_2 1_2 normal
1_3 1_3 normal
2_0 2_0 normal
2_1 2_1 normal
2_2 2_2 normal
2_3 2_3 normal
4_0 4_0 normal
4_1 4_1 normal
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 3: Exadata Database Machine Architecture


Chapter 3 - Page 12
4_2 4_2 normal
4_3 4_3 normal
5_0 5_0 normal
5_1 5_1 normal
5_2 5_2 normal
5_3 5_3 normal
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

4. List only the hard disk-based LUNs.


CellCLI> list lun where disktype = harddisk
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK00
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK00 normal
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK01
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK01 normal
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK02
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK02 normal
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK03
a
has
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK03 normal
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK04
)
om ฺ
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK04 normal
ฺ c
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK05

i rco uide
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK05 normal

a l li@ nt G
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK06

av tude
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK06 normal

a d
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK07

a rฺy his S
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK07 normal

um se t
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK08

u k
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK08 normal

( v en e to u
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK09

lli ens
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK09 normal

v a
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK10

a da le lic
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK10 normal

a r Y erab
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK11

k u m nsf
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK11 normal

e n - tra
nu CellCLI>
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 3: Exadata Database Machine Architecture


Chapter 3 - Page 13
5. Examine the detailed attribute listing for the LUN whose name ends with DISK09. Note the
attribute setting isSystemLun=FALSE. This indicates that the LUN is not located on a
system disk. Notice also that the LUN is associated with one physical disk and one cell
disk.
CellCLI> list lun where name like '.*DISK09' detail
name:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK09
cellDisk: CD_09_qr01cel01
deviceName:
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK09
diskType: HardDisk
id:
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK09
isSystemLun: FALSE
lunAutoCreate: FALSE
a
has
lunSize: 11
physicalDrives:
)
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK09
ฺ c om ฺ
rco uide
raidLevel: "RAID 0"
status: normal i
a l li@ nt G
CellCLI>
a d av tude
6. Exadata maintains the physical attributes of each
a y disk
rforฺhard i s inSa physicaldisk object. A
m et
physicaldisk object is automatically created
uexamined eachh hard disk. Examine the attributes
n k
for the hard disk associated with LUNuyou
u s in the previous step.
CellCLI> list physicaldisk e
(v wheree o
t like '.*DISK09' detail
luns
l l i
a icen s
name:
a v
ad ble l
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK09

r YdiskType:
a
HardDisk

u m a luns:s f er
n
nuk n-tra physicalInsertTime:
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK09

e
V no physicalSize:
2013-02-24T21:12:47-05:00
11
status: normal

CellCLI>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 3: Exadata Database Machine Architecture


Chapter 3 - Page 14
7. A cell disk is a higher-level storage abstraction. Each cell disk is based on a LUN and
contains additional attributes and metadata. Examine the attributes for the cell disk-based
on the LUN you examined in step 5.
CellCLI> list celldisk CD_09_qr01cel01 detail
name: CD_09_qr01cel01
comment:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

creationTime: 2013-02-28T16:31:52-05:00
deviceName:
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK09
devicePartition:
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK09
diskType: HardDisk
errorCount: 0
freeSpace: 0
id: ed8be9ac-5851-4e03-aacb-c5eec33156fa
a
has
interleaving: none
lun:
)
ฺ c om ฺ
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK09

rco uide
physicalDisk:
i
/opt/oracle/cell11.2.3.2.1_LINUX.X64_130109/disks/raw/DISK09
raidLevel: "RAID 0"
a l li@ nt G
size:
av tude
1.5625G
a d
rฺy his S
status: normal
a
CellCLI>
u k um se t
( v en e to u
v a lli ens
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 3: Exadata Database Machine Architecture


Chapter 3 - Page 15
8. A grid disk defines an area of storage on a cell disk. Grid disks are consumed by ASM and
are used as the storage for ASM disk groups. Each cell disk can contain a number of grid
disks. Examine the grid disks associated with the cell disk you examined in the previous
step. Note the names and sizes of the grid disks.
CellCLI> list griddisk where celldisk=CD_09_qr01cel01 detail
name: DATA_QR01_CD_09_qr01cel01
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

asmDiskgroupName: DATA_QR01
asmDiskName: DATA_QR01_CD_09_QR01CEL01
asmFailGroupName: QR01CEL01
availableTo:
cachingPolicy: default
cellDisk: CD_09_qr01cel01
comment:
creationTime: 2013-02-28T16:32:10-05:00
diskType: HardDisk
a
errorCount: 0
) has
om ฺ
id: 9a735142-8a0f-4798-a83e-814ceb7f9ab5
offset: 208M
ฺ c
size: 592M
i rco uide
status: active
a l li@ nt G
a d av tude
rฺy his S
name: DBFS_DG_CD_09_qr01cel01
asmDiskgroupName: a
DBFS_DG
m et
asmDiskName:
kuDBFS_DG_CD_09_QR01CEL01
us
asmFailGroupName: nu QR01CEL01
availableTo: (v
e t o
v a lli ensedefault
cachingPolicy:

a da le lic
cellDisk: CD_09_qr01cel01

a Y
r comment:
r ab
u m ns f e
creationTime: 2013-02-28T16:32:03-05:00
k
nu n-tra errorCount:
diskType: HardDisk
e
V no 0
id: dfb7dcda-f9fa-404b-9239-0f03e3cea480
offset: 48M
size: 160M
status: active

name: RECO_QR01_CD_09_qr01cel01
asmDiskgroupName: RECO_QR01
asmDiskName: RECO_QR01_CD_09_QR01CEL01
asmFailGroupName: QR01CEL01
availableTo:
cachingPolicy: default
cellDisk: CD_09_qr01cel01
comment:
creationTime: 2013-02-28T16:32:24-05:00
diskType: HardDisk
errorCount: 0
id: 7e028f52-604d-4189-8c2c-dafcd01b8f17

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 3: Exadata Database Machine Architecture


Chapter 3 - Page 16
offset: 800M
size: 800M
status: active

CellCLI>
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

9. Establish a terminal connection to qr01db01 as the grid user.


10. Using SQL*Plus, connect to ASM as sysasm.
[grid@qr01db01 ~]$ sqlplus / as sysasm

SQL*Plus: Release 11.2.0.3.0 Production...

SQL>
a
11. Locate the grid disks from step 8 inside ASM (use the SQL script
) has
/home/oracle/labs/lab03-03-11.sql if you prefer). Check that the sizes reported
c om ฺ
by ASM match the grid disk attributes reported in step 8. Note the capitalization of the value

in the like string.
i rco uide
SQL> select name, path, state, total_mb from
a l li@ t G
v$asm_disk
n
2>
d
where name like '%_CD_09_QR01CEL01'; v
a tude
a
rฺy his S
a
NAME
u k um se t
( v en e to u
------------------------------
PATH
v a lli ens
a a e lic
--------------------------------------------------------------
dTOTAL_MB
STATE
r Y a b l
m a sfer
-------- ----------
u an
nuk o/192.168.1.103/RECO_QR01_CD_09_qr01cel01
RECO_QR01_CD_09_QR01CEL01
e n - t r
V noNORMAL 800

DATA_QR01_CD_09_QR01CEL01
o/192.168.1.103/DATA_QR01_CD_09_qr01cel01
NORMAL 592

DBFS_DG_CD_09_QR01CEL01
o/192.168.1.103/DBFS_DG_CD_09_qr01cel01
NORMAL 160

SQL>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 3: Exadata Database Machine Architecture


Chapter 3 - Page 17
12. Determine which ASM disk group the grid disks from step 8 are assigned to (use the SQL
script /home/oracle/labs/lab03-03-12.sql if you prefer). Note the capitalization of
the value in the like string.
SQL> select d.name disk, dg.name diskgroup
2> from v$asm_disk d, v$asm_diskgroup dg
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

3> where dg.group_number = d.group_number


4> and d.name like '%_CD_09_QR01CEL01';

DISK DISKGROUP
------------------------------ ------------------------------
RECO_QR01_CD_09_QR01CEL01 RECO_QR01
DATA_QR01_CD_09_QR01CEL01 DATA_QR01
DBFS_DG_CD_09_QR01CEL01 DBFS_DG
a
) has
SQL>
ฺ c om ฺ
13. Exit all your SQL*Plus and CellCLI sessions.
i rco uide
a l li@ nt G
a d av tude
a rฺy his S
u k um se t
( v en e to u
v a lli ens
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 3: Exadata Database Machine Architecture


Chapter 3 - Page 18
Practice 3-4: Exadata Smart Flash Cache Familiarization
Overview
In this practice, you are introduced to Exadata Smart Flash Cache.

Tasks
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

1. Establish a terminal connection to the qr01cel01 Exadata cell as the celladmin user.
2. Launch the Exadata cell command-line interface (CellCLI).
[celladmin@qr01cel01 ~] $ cellcli
CellCLI: Release 11.2.3.2.1 – Production...

CellCLI>
3. List the cell disks associated with the flash disk modules in your Exadata cell. By default,
a
there should be 16 cell disks having names that start with FD.
) has
om ฺ
CellCLI> list celldisk where disktype=flashdisk
ฺ c
rco uide
FD_00_qr01cel01 normal
FD_01_qr01cel01 normal i
normal all
i@ t G
FD_02_qr01cel01
d a v den
FD_03_qr01cel01
r ฺ y a
normal
S tu
FD_04_qr01cel01 a this
normal
FD_05_qr01cel01 kum e
n u u snormal
FD_06_qr01cel01
( v e e to normal
a i
ll ens
FD_07_qr01cel01 normal
d v
a e li
FD_08_qr01cel01c normal
a l
a r Y FD_09_qr01cel01
r a b normal

u fe
m nsFD_10_qr01cel01 normal
k
nu n-tra FD_11_qr01cel01 normal
e
V no FD_12_qr01cel01 normal
FD_13_qr01cel01 normal
FD_14_qr01cel01 normal
FD_15_qr01cel01 normal

CellCLI>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 3: Exadata Database Machine Architecture


Chapter 3 - Page 19
4. By default, Exadata Smart Flash Cache is configured across all the flash-based cell disks.
Use the LIST FLASHCACHE DETAIL command to confirm that Exadata Smart Flash
Cache is configured on your flash-based cell disks. Note that the size of the Exadata Smart
Flash Cache on your laboratory cells is much smaller than what you would observe on a
real cell; however, all of the other attributes would be similar on a real cell.
CellCLI> list flashcache detail
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

name: qr01cel01_FLASHCACHE
cellDisk:
FD_01_qr01cel01,FD_13_qr01cel01,FD_07_qr01cel01,FD_06_qr01cel01,FD_09_qr01cel0
1,FD_11_qr01cel01,FD_02_qr01cel01,FD_03_qr01cel01,FD_05_qr01cel01,FD_04_qr01ce
l01,FD_15_qr01cel01,FD_14_qr01cel01,FD_08_qr01cel01,FD_00_qr01cel01,FD_10_qr01
cel01,FD_12_qr01cel01
creationTime: 2013-03-08T02:18:12-05:00
degradedCelldisks:
effectiveCacheSize: 3G
id: c0dca501-f09a-46f0-b504-ec26f23def79
s a
size: 3G
)h a
status: normal
m
co eฺ
o ฺ
CellCLI>
@ irc uid
5. In addition to Exadata Smart Flash Cache, Exadata Smart Flash
v a lli Log provides
n t Ga
mechanism for improving the latency of database redo log
a d dasetemporary
a writetuoperations. Exadata Smart
Flash Log uses a small portion of high-performance
a
facilitate low latency redo log writes. By default,
ฺy iSmart
flash
rExadata s S Flash Log uses 32storage
memory
MB
to
on
u
each flash-based cell disk, for a total ofk512
mMB oneeach th Exadata Storage Server. Use the
LIST FLASHLOG DETAIL command e n t o usthe Exadata Smart Flash Log area on this
uto examine
cell.
a l li (v ense
a v ldetail
CellCLI> list flashlog
d ic
Y a
name:
b l e qr01cel01_FLASHLOG
r
a sfer a
cellDisk:
u m
an
nuk 1,FD_11_qr01cel01,FD_00_qr01cel01,FD_05_qr01cel01,FD_14_qr01cel01,FD_02_qr01ce
FD_08_qr01cel01,FD_10_qr01cel01,FD_04_qr01cel01,FD_13_qr01cel01,FD_09_qr01cel0

e n - t r
V nocel01,FD_07_qr01cel01
l01,FD_15_qr01cel01,FD_03_qr01cel01,FD_06_qr01cel01,FD_01_qr01cel01,FD_12_qr01

creationTime: 2013-02-28T16:21:30-05:00
degradedCelldisks:
effectiveSize: 512M
efficiency: 100.0
id: 1417f53b-49c3-4419-919c-933b812f0159
size: 512M
status: normal

CellCLI>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 3: Exadata Database Machine Architecture


Chapter 3 - Page 20
6. Use the LIST FLASHCACHECONTENT DETAIL command to show information about the
data inside Exadata Smart Flash Cache. You can see that each entry contains a series of
attributes relating to a database object in the cache. For each object, you can see how
much data is being cached along with the number of cache hits and misses. This
information can help you to assess cache efficiency for specific database objects.
CellCLI> list flashcachecontent detail
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

...
cachedKeepSize: 0
cachedSize: 8192
dbID: 2080757153
dbUniqueName: DBM
hitCount: 0
missCount: 0
a
has
objectNumber: 290
tableSpaceNumber: 0 )
ฺ c om ฺ
cachedKeepSize: 0 i rco uide
cachedSize: 73728
a l li@ nt G
dbID:
d av tude
2080757153
a
dbUniqueName:
a y is S
rฺDBM
hitCount:
k u m e th
0
missCount:
e n u o us0
l i
objectNumber:
l (v se t 457
a v a icen
tableSpaceNumber: 0
d
a ble l
r Y ra
a scachedKeepSize:
u m f e 0

n u k tran cachedSize: 24576


Ve non- dbID:
dbUniqueName:
2080757153
DBM
hitCount: 0
missCount: 0
objectNumber: 458
tableSpaceNumber: 0

cachedKeepSize: 0
cachedSize: 8192
dbID: 2080757153
dbUniqueName: DBM
hitCount: 0
missCount: 0
objectNumber: 461
tableSpaceNumber: 0

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 3: Exadata Database Machine Architecture


Chapter 3 - Page 21
cachedKeepSize: 0
cachedSize: 65536
dbID: 2080757153
dbUniqueName: DBM
hitCount: 101
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

missCount: 1
objectNumber: 4294967294
tableSpaceNumber: 0

CellCLI>
7. Exit your CellCLI session.

a
) has
ฺ c om ฺ
i rco uide
a l li@ nt G
a d av tude
a rฺy his S
u k um se t
( v en e to u
v a lli ens
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 3: Exadata Database Machine Architecture


Chapter 3 - Page 22
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a
) has
ฺ c om ฺ
i rco uide
Practices for a l i@ t G4: Key
lLesson
d a v den
Capabilities
r ฺ y a Sof tuExadata
a thisMachine
Database
m
u u
k use
v n
e e Chapter
to 4
i (
ll ens
v a
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Key Capabilities of Exadata Database Machine


Chapter 4 - Page 1
Practices for Lesson 4
Practices Overview
In these practices, you are introduced to four major capabilities of Exadata, namely:
• Smart Scan
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Exadata Hybrid Columnar Compression


• Exadata Smart Flash Cache
• Storage Index

a
) has
ฺ c om ฺ
i rco uide
a l li@ nt G
a d av tude
a rฺy his S
u k um se t
( v en e to u
v a lli ens
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Key Capabilities of Exadata Database Machine


Chapter 4 - Page 2
Practice 4-1: Smart Scan
Overview
In this practice, you are introduced to the Smart Scan capability of Exadata. You will execute a
query with and without Smart Scan enabled and you will examine statistics to measure the
effect of Smart Scan.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Tasks
1. Establish a terminal connection to qr01db01 as the oracle user.
2. Connect to your database with SQL*Plus. Log in as the sales user.
[oracle@qr01db01 ~]$ sqlplus sales/sales

SQL*Plus: Release 11.2.0.3.0 Production...


a
SQL> ) has
c
3. Execute the following query (or execute the SQL script /home/oracle/labs/lab04-
ฺ om ฺ
01-03.sql) and verify that the statistics are at or near zero values: irco ide
@
lli nt G u
SQL> select a.name, b.value/1024/1024 MB
v a
a tude
2 from v$sysstat a, v$mystat b
a d
3 where a.statistic# = b.statistic# and
4 (a.name in ('physical read total a rฺy his S
k m bytes',
utotal e t
bytes',
5
u
'physical write
n to ubytes') s
6
e
'cell IO uncompressed
( v
7 or a.name like 'cell
a n se
lli ephy%');
v
da le lic
NAME
Y a b MB

m ar reads f e ra bytes
---------------------------------------------------------------- ----------

u k uphysicalanwrite total bytes


physical total .015625

e n cell n - r
tphysical IO interconnect bytes 0
V no .015625
cell physical IO bytes saved during optimized file creation 0
cell physical IO bytes saved during optimized RMAN file restore 0
cell physical IO bytes eligible for predicate offload 0
cell physical IO bytes saved by storage index 0
cell physical IO bytes sent directly to DB node to balance CPU 0
cell physical IO interconnect bytes returned by smart scan 0
cell IO uncompressed bytes 0

10 rows selected.

SQL>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Key Capabilities of Exadata Database Machine


Chapter 4 - Page 3
4. Execute the following query (or execute the SQL script /home/oracle/labs/lab04-
01-04.sql). Note the optimizer hint that disables Smart Scan for the query.
SQL> select /*+ OPT_PARAM('cell_offload_processing' 'false') */
2 count(*) from sales
3 where time_id between '01-JAN-2003' and '31-DEC-2003'
4 and amount_sold = 1;
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

COUNT(*)
----------
10088

SQL>
5. Repeat the statistics query from step 3 (or execute the SQL script
/home/oracle/labs/lab04-01-03.sql). Note that all of the data processed by the
query in step 4 (physical read total bytes) is returned to the database server over a
the storage network (cell physical IO interconnect bytes).
) has
SQL> select a.name, b.value/1024/1024 MB
ฺ c om ฺ
2 from v$sysstat a, v$mystat b
i rco uide
3 where a.statistic# = b.statistic# and
a l li@ nt G
av tude
4 (a.name in ('physical read total bytes',
5
a d
'physical write total bytes',
6 'cell IO uncompressed r ฺy is S
abytes')
7 or a.name like 'cell phy%'); m
k u e th
e n u o us
NAME
l l i (v se t MB

physical read a v a bytesicen


---------------------------------------------------------------- ----------

a d total
l e l 559.054688
physicalY b bytes
r write rtotal
cellaphysicaleIO
a 0

k u m nsf IO bytes saved during optimized file creation


interconnect bytes 559.054688

n u r a
cell physical
t
0

Ve nocell n- physical IO bytes saved during optimized RMAN file restore


cell physical IO bytes eligible for predicate offload
0
0
cell physical IO bytes saved by storage index 0
cell physical IO bytes sent directly to DB node to balance CPU 0
cell physical IO interconnect bytes returned by smart scan 0
cell IO uncompressed bytes 0

10 rows selected.

SQL>
6. Reconnect to your database in order to reset the session level statistics.
SQL> connect sales/sales
Connected.
SQL>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Key Capabilities of Exadata Database Machine


Chapter 4 - Page 4
7. Repeat the statistics query from step 3 (or execute the SQL script
/home/oracle/labs/lab04-01-03.sql) and verify that the statistics are again at or
near zero values:
SQL> select a.name, b.value/1024/1024 MB
2 from v$sysstat a, v$mystat b
3 where a.statistic# = b.statistic# and
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

4 (a.name in ('physical read total bytes',


5 'physical write total bytes',
6 'cell IO uncompressed bytes')
7 or a.name like 'cell phy%');

NAME MB
---------------------------------------------------------------- ----------
physical read total bytes 0
physical write total bytes 0 a
cell physical IO interconnect bytes 0
) has
om ฺ
cell physical IO bytes saved during optimized file creation 0
ฺ c
rco uide
cell physical IO bytes saved during optimized RMAN file restore 0
cell physical IO bytes eligible for predicate offload i 0
cell physical IO bytes saved by storage index
a l li@ nt G 0

a d av tude
cell physical IO bytes sent directly to DB node to balance CPU 0

rฺy his S
cell physical IO interconnect bytes returned by smart scan 0
cell IO uncompressed bytes a 0

u k um se t
10 rows selected.
( v en e to u
v a lli ens
da queryle(orlicexecute the SQL script /home/oracle/labs/lab04-
SQL>

a
8. Execute the following
a
01-08.sql). r YThiseisrthe
absame query as in step 4; however, this time there is no optimizer
hintutomdisablen f
s Scan.
Smart
u k r a
n n-t select count(*) from sales
Ve noSQL> 2 where time_id between '01-JAN-2003' and '31-DEC-2003'
3 and amount_sold = 1;

COUNT(*)
----------
10088

SQL>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Key Capabilities of Exadata Database Machine


Chapter 4 - Page 5
9. Repeat the statistics query from step 3 (or execute the SQL script
/home/oracle/labs/lab04-01-03.sql). Note that the query still performs
approximately 559 MB of I/O (physical read total bytes). However, this time only
about 228 KB is actually returned to the database server (cell physical IO
interconnect bytes). This is Smart Scan in action.
Also note that in this case, Smart Scan is acting on all of the I/O associated with the query.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

This is the case because cell physical IO bytes eligible for predicate
offload equals physical read total bytes, and cell physical IO
interconnect bytes returned by smart scan equals cell physical IO
interconnect bytes.
SQL> select a.name, b.value/1024/1024 MB
2 from v$sysstat a, v$mystat b
3 where a.statistic# = b.statistic# and
4 (a.name in ('physical read total bytes',
a
has
5 'physical write total bytes',
6 'cell IO uncompressed bytes')
)
7 or a.name like 'cell phy%');
ฺ c om ฺ
i rco uide MB
li@ nt G----------
NAME
a l
av tude
----------------------------------------------------------------
physical read total bytes
a d 559.039063
physical write total bytes
a r ฺy is S 0
cell physical IO interconnect bytesm
k u optimized
e thfile creation .222244263
cell physical IO bytes saved u
n during
u s 0

( v
cell physical IO bytes saved e during
e t o
optimized RMAN file restore 0
cell physical IO bytes i
all eligible nbys for predicate offload 559.039063
cell physical aIOvbytes savedc e
i directly to DB node to balance CPU
lsent
a d IO bytes
l e
storage index 0

r Y
cell physical
a b 0

u m s f er interconnect
cellaphysical IO bytes returned by smart scan .222244263

n u k tran
cell IO uncompressed bytes 559.039063
-
Ve no10nrows selected.

SQL>
10. Exit your SQL*Plus session.

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Key Capabilities of Exadata Database Machine


Chapter 4 - Page 6
Practice 4-2: Exadata Hybrid Columnar Compression
Overview
In this practice, you are introduced to Exadata Hybrid Columnar Compression. You will create
compressed copies of an existing database table and examine the level of compression you
achieve.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Tasks
1. Establish a terminal connection to qr01db01 as the oracle user.
2. Connect to your database with SQL*Plus. Log in as the sales user.
[oracle@qr01db01 ~]$ sqlplus sales/sales

SQL*Plus: Release 11.2.0.3.0 Production...


a
SQL> ) has
3. Determine the size of the uncompressed MYCUSTOMERS table (use the SQL ฺ c om ฺ
script
/home/oracle/labs/lab04-02-03.sql if you prefer). i rco uide
SQL> col segment_name format a30
a l li@ nt G
SQL> select segment_name, sum(bytes)/1024/1024
a d av tudeMB
2 from user_segments
a rฺy his S
3 where segment_name like
u k um'MYCUST%'
s e t
4 group by segment_name;
( v en e to u
SEGMENT_NAMEava
lli ens
d l i c MB
Y a ble
------------------------------ ----------
r
a sfer a
u m
MYCUSTOMERS 208

nuk SQL> - t r an
e
V non
4. Verify that the CUSTOMERS table is uncompressed (use the SQL script
/home/oracle/labs/lab04-02-04.sql if you prefer).
SQL> select table_name, compression, compress_for
2 from user_tables
3 where table_name like 'MYCUST%';

TABLE_NAME COMPRESS COMPRESS_FOR


------------------------------ -------- ------------
MYCUSTOMERS DISABLED

SQL>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Key Capabilities of Exadata Database Machine


Chapter 4 - Page 7
5. Exadata Hybrid Columnar Compression achieves its highest levels of compression with
data that is direct-path inserted. Execute the following ALTER SESSION commands to
ensure the use of direct-path inserts later in the practice.
SQL> alter session force parallel query;
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Session altered.

SQL> alter session force parallel ddl;

Session altered.

SQL> alter session force parallel dml;

a
has
Session altered.
)
SQL> ฺ c om ฺ
6. Create a compressed copy of the MYCUSTOMERS table by using the QUERYi rco HIGH u ide
warehouse compression mode. @
lli nt G
v a
SQL> create table mycust_query compress
a d de high
a fortuquery
2 parallel 4 nologging as select a rฺy *hfrom
i s Smycustomers;
u k um se t
Table created.
( v en e to u
v a lli ens
SQL>
a da le lic
r Y racopy
7. Create a compressed
a b of the MYCUSTOMERS table using the ARCHIVE HIGH archive
u m ns
compression f
mode.eNote that it may take approximately one minute for the table to be
k
nu SQL>
created. a
trcreate
e
V no n - table mycust_archive compress for archive high
2 parallel 4 nologging as select * from mycustomers;

Table created.

SQL>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Key Capabilities of Exadata Database Machine


Chapter 4 - Page 8
8. Verify the compression mode settings for the tables you just created (use the SQL script
/home/oracle/labs/lab04-02-04.sql again if you prefer).
SQL> select table_name, compression, compress_for
2 from user_tables
3 where table_name like 'MYCUST%';
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

TABLE_NAME COMPRESS COMPRESS_FOR


------------------------------ -------- ------------
MYCUST_QUERY ENABLED QUERY HIGH
MYCUST_ARCHIVE ENABLED ARCHIVE HIGH
MYCUSTOMERS DISABLED

SQL>
a
9. has
Compare the size of the original uncompressed table with the two compressed copies you
)
Calculate the compression ratios achieved using the formula: ฺ c om ฺ
created (use the SQL script /home/oracle/labs/lab04-02-03.sql if you prefer).

Compression Ratio = Uncompressed Size / Compressed Size i rco uide


a l li@MB nt G
2 from user_segments a d av tude
SQL> select segment_name,sum(bytes)/1024/1024

a
3 where segment_name like 'MYCUST%'rฺy his S
4 group by segment_name;
u k um se t
( v en e to u
SEGMENT_NAME
v a lli ens MB
da le li c
------------------------------ ----------
Y a
a r
MYCUSTOMERS
f e r ab 208

k m ns
uMYCUST_ARCHIVE 18
u
n n-t r a
e
V no
MYCUST_QUERY 31

SQL>
10. Drop the compressed tables that you created in this practice.
SQL> drop table mycust_query;

Table dropped.

SQL> drop table mycust_archive;

Table dropped.

SQL>
11. Exit your SQL*Plus session.

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Key Capabilities of Exadata Database Machine


Chapter 4 - Page 9
Practice 4-3: Exadata Smart Flash Cache
Overview
In this practice, you will examine the use of Exadata Smart Flash Cache. You will execute a
series of record lookups and use database statistics to verify the use of Exadata Smart Flash
Cache. You will also compare the execution statistics with and without the use of Exadata Smart
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Flash Cache.

Tasks
1. Establish a terminal connection to the qr01cel01 Exadata cell as the celladmin user.
2. Execute the following two commands to drop and then re-create Exadata Smart Flash
Cache on all of your Exadata cells. You must perform this action so that Exadata Smart
Flash Cache is empty at the beginning of this practice; thus ensuring consistent results later
in the practice. To do this, you will use the distributed command line utility (dcli) that is
provided with Exadata. Using dcli you can execute cell-level administrative commands a
has
simultaneously on multiple Exadata cells. A more detailed discussion of dcli features and
)
ฺ c om ฺ
options is provided later in the course. Be careful not to add any extra spaces in the server

rco cellcli
list following the dcli –c command-line option.
@ i u ide-e \
lli nt G
[celladmin@qr01cel01 ~]$ dcli -c qr01cel01,qr01cel02,qr01cel03
> drop flashcache
v a e
a tuddropped
a d
qr01cel01: Flash cache qr01cel01_FLASHCACHE successfully
qr01cel02: Flash cache qr01cel02_FLASHCACHE
a rฺy successfully
h i s S dropped
k m et
uqr01cel01,qr01cel02,qr01cel03
qr01cel03: Flash cache qr01cel03_FLASHCACHE successfully dropped
[celladmin@qr01cel01 ~]$ dcliu-c
n u s cellcli -e \
> create flashcache all v e t o
(qr01cel01_FLASHCACHE
e
a l l i n s
qr01cel01: Flash cache
v
a e li c e successfully created

a d
qr01cel02: Flash cache
l
qr01cel02_FLASHCACHE successfully created

r Y Flash
qr01cel03:
a r a b ~]$qr01cel03_FLASHCACHE successfully created
cache

k u m nsfe
[celladmin@qr01cel01

3. uEstablish ara
e n n - t separate terminal connection to qr01db01 as the oracle user.
V4. Connect
no to your database with SQL*Plus. Log in as the sales user.
[oracle@qr01db01 ~]$ sqlplus sales/sales

SQL*Plus: Release 11.2.0.3.0 Production...

SQL>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Key Capabilities of Exadata Database Machine


Chapter 4 - Page 10
5. Execute the following query (or execute the SQL script /home/oracle/labs/lab04-
03-05.sql) and verify that the statistics are at or near zero values:
SQL> select a.name, b.value from v$sysstat a, v$mystat b
2 where a.statistic# = b.statistic# and
3 (a.name like '%flash cache read hits'
4 or a.name like 'cell phy%'
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

5 or a.name like 'physical read tot%'


6 or a.name like 'physical read req%');

NAME VALUE
---------------------------------------------------------------- ----------
physical read total IO requests 0
physical read total multi block requests 0
physical read requests optimized 0
physical read total bytes optimized 0 a
physical read total bytes 0
) has
cell physical IO interconnect bytes
ฺ c om ฺ
0

rco uide
cell physical IO bytes saved during optimized file creation 0
cell physical IO bytes saved during optimized RMAN file restorei 0
cell physical IO bytes eligible for predicate offload
a l li@ nt G 0
cell physical IO bytes saved by storage index
a d av tude 0

a rฺy his S
cell physical IO bytes sent directly to DB node to balance CPU 0

um se t
cell physical IO interconnect bytes returned by smart scan 0
cell flash cache read hits
u k
n to u
0

( v e
13 rows selected.
v a lli ense
SQL> a da le lic
r Y cache
6. Flush theabuffer e r atobensure that the queries in step 8 must retrieve the required data
from m Exadata
uthe n f
s cells.
u k r a
n n-t alter system flush buffer_cache;
Ve noSQL>
System altered.

SQL>
7. Configure the session to display server output.
SQL> set serveroutput on
SQL>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Key Capabilities of Exadata Database Machine


Chapter 4 - Page 11
8. The following PL/SQL block performs 500 record lookups spread across a reasonably large
table. The workload is representative of the scattered record access normally associated
with an OLTP application. Execute the PL/SQL block against your database (or execute the
SQL script /home/oracle/labs/lab04-03-08.sql). Note that the workload may take
a few minutes to complete.
SQL> declare
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

2 a number;
3 s number := 0;
4 begin
5 for n in 1 .. 500 loop
6 select cust_credit_limit into a from customers
7 where cust_id=n*2000;
8 s := s+a;
a
has
9 end loop;
10 dbms_output.put_line('Transaction total = '||s); )
11 end;
ฺ c om ฺ
12 /
i rco uide
Transaction total = 3761500
a l li@ nt G
a d av tude
rฺy his S
PL/SQL procedure successfully completed.
a
u k um se t
SQL>
( v en e to u
v a lli ens
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Key Capabilities of Exadata Database Machine


Chapter 4 - Page 12
9. Repeat the statistics query from step 5 (or execute the SQL script
/home/oracle/labs/lab04-03-05.sql). Note the high number of IO requests
(physical read total IO requests) relative to the low number of optimized
requests (physical read requests optimized and cell flash cache read
hits). This indicates that the queries were mostly satisfied by using physical disk reads
and is indicative of a recently emptied cache.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

SQL> select a.name, b.value from v$sysstat a, v$mystat b


2 where a.statistic# = b.statistic# and
3 (a.name like '%flash cache read hits'
4 or a.name like 'cell phy%'
5 or a.name like 'physical read tot%'
6 or a.name like 'physical read req%');

NAME VALUE
---------------------------------------------------------------- ---------- a
physical read total IO requests
) has 959
physical read total multi block requests
ฺ c om ฺ 46

rco uide
physical read requests optimized 140
physical read total bytes optimized i 1146880
physical read total bytes
a l li@ nt G 17833984
cell physical IO interconnect bytes
a d av tude 17833984

rฺy his S
cell physical IO bytes saved during optimized file creation 0
a
um se t
cell physical IO bytes saved during optimized RMAN file restore 0

u k
cell physical IO bytes eligible for predicate offload 0

( v en e to u
cell physical IO bytes saved by storage index 0

v a lli ens
cell physical IO bytes sent directly to DB node to balance CPU 0

da le lic
cell physical IO interconnect bytes returned by smart scan 0
a
cell flash cache read hits 140

a r Y erab
u n s f
mrows selected.
k 13

nu SQL> tra
e
V no n -
10. Reconnect to your database in order to reset the session level statistics.
SQL> connect sales/sales
Connected.
SQL>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Key Capabilities of Exadata Database Machine


Chapter 4 - Page 13
11. Repeat the statistics query from step 5 (or execute the SQL script
/home/oracle/labs/lab04-03-05.sql) and verify that the statistics are again at or
near zero values:
SQL> select a.name, b.value from v$sysstat a, v$mystat b
2 where a.statistic# = b.statistic# and
3 (a.name like '%flash cache read hits'
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

4 or a.name like 'cell phy%'


5 or a.name like 'physical read tot%'
6 or a.name like 'physical read req%');

NAME VALUE
---------------------------------------------------------------- ----------
physical read total IO requests 1
physical read total multi block requests 0
physical read requests optimized 0 a
physical read total bytes optimized 0
) has
om ฺ
physical read total bytes 8192
ฺ c
rco uide
cell physical IO interconnect bytes 8192
cell physical IO bytes saved during optimized file creation i 0

l li@ nt G
cell physical IO bytes saved during optimized RMAN file restore
a
0

a d av tude
cell physical IO bytes eligible for predicate offload 0

rฺy his S
cell physical IO bytes saved by storage index 0
a
cell physical IO bytes sent directly to DB node to balance CPU 0

k um se t
cell physical IO interconnect bytes returned by smart scan
u
0
cell flash cache read hits
( v en e to u 0

v a lli ens
da le lic
13 rows selected.

SQL> r Y
a
a f e r ab
umflushathe
12. Again,
u k n sbuffer cache to ensure that the queries in the next step must retrieve the
n required r
t from the Exadata cells. Also, configure your new session to display server
-data
Ve output.
n o n
SQL> alter system flush buffer_cache;

System altered.

SQL> set serveroutput on


SQL>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Key Capabilities of Exadata Database Machine


Chapter 4 - Page 14
13. Re-execute the PL/SQL block introduced in step 8 (or execute the SQL script
/home/oracle/labs/lab04-03-08.sql). Confirm that the result is the same.
SQL> declare
2 a number;
3 s number := 0;
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

4 begin
5 for n in 1 .. 500 loop
6 select cust_credit_limit into a from customers
7 where cust_id=n*2000;
8 s := s+a;
9 end loop;
10 dbms_output.put_line('Transaction total = '||s);
11 end;
a
12 /
) has
Transaction total = 3761500
ฺ c om ฺ
i rco uide
PL/SQL procedure successfully completed.
a l li@ nt G
a d av tude
rฺy his S
SQL>
a
u k um se t
( v en e to u
v a lli ens
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Key Capabilities of Exadata Database Machine


Chapter 4 - Page 15
14. Repeat the statistics query from step 5 (or execute the SQL script
/home/oracle/labs/lab04-03-05.sql). Compare the values for cell flash
cache read hits and physical read total IO requests. They should be much
closer together, indicating that most of the I/Os were satisfied by Exadata Smart Flash
Cache.
SQL> select a.name, b.value from v$sysstat a, v$mystat b
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

2 where a.statistic# = b.statistic# and


3 (a.name like '%flash cache read hits'
4 or a.name like 'cell phy%'
5 or a.name like 'physical read tot%'
6 or a.name like 'physical read req%');

NAME VALUE
---------------------------------------------------------------- ----------
physical read total IO requests 1013
a
has
physical read total multi block requests 0
physical read requests optimized ) 905
physical read total bytes optimized
ฺ c om ฺ 7413760
physical read total bytes
i rco uide 8298496
cell physical IO interconnect bytes
a l li@ nt G 8298496

a d av tude
cell physical IO bytes saved during optimized file creation
cell physical IO bytes saved during optimized RMAN file restore
0
0

a rฺy his S
cell physical IO bytes eligible for predicate offload 0

k um se t
cell physical IO bytes saved by storage index
u
0

( v en e to u
cell physical IO bytes sent directly to DB node to balance CPU 0

lli ens
cell physical IO interconnect bytes returned by smart scan 0

v a
cell flash cache read hits
a e lic
905

13 rows Y
a d
selected. bl
r
a sfera
m
kuSQL> tran
n u
Ve non-
In an earlier practice, you saw how to obtain general information about Exadata Smart Flash
Cache on an Exadata cell using the LIST FLASHCACHECONTENT CellCLI command. Over the
remainder of this practice, you will learn how to isolate specific information in Exadata Smart
Flash Cache.

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Key Capabilities of Exadata Database Machine


Chapter 4 - Page 16
15. Use the following query (or execute the SQL script /home/oracle/labs/lab04-03-
15.sql) to determine the number of optimized physical reads (reads optimized by Exadata
Smart Flash Cache or Exadata storage index) for the SALES.CUSTOMERS table. Note the
tablespace number (TS#) and object number (DATAOBJ#) associated with the table.
SQL> select owner, object_name, tablespace_name, ts#, dataobj#,
2 statistic_name, value
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

3 from v$segment_statistics
4 where owner='SALES' and object_name='CUSTOMERS'
5 and statistic_name='optimized physical reads';

OWNER OBJECT_NAME
------------------------------ ------------------------------
TABLESPACE_NAME TS# DATAOBJ#
------------------------------ ---------- ----------
STATISTIC_NAME VALUE
a
has
---------------------------------------------------------------- ----------
)
om ฺ
SALES CUSTOMERS
SALES 7 77111
ฺ c
optimized physical reads
i rco uide 473

a l li@ nt G
a d av tude
rฺy hlaunchS the Exadata cell command-
SQL>
a
16. Back in the terminal session connected to qr01cel01, i s
line interface (CellCLI).
u k um se t
[celladmin@qr01cel01ve
n to u
( ~]$ cellcli
se – Production...
lli11.2.3.2.1
CellCLI: Release
v a e n
a da le lic
a r Y erab
CellCLI>
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Key Capabilities of Exadata Database Machine


Chapter 4 - Page 17
17. Use the tablespace number (TS#) and object number (DATAOBJ#) you gathered in step 15
to query the Exadata Smart Flash Cache. The output relates specifically to the
SALES.CUSTOMERS table.
CellCLI> list flashcachecontent where objectnumber=77111 -
> and tablespacenumber=7 and dbuniquename=DBM detail
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

cachedKeepSize: 0
cachedSize: 10362880
dbID: 2080757153
dbUniqueName: DBM
hitCount: 150
missCount: 146
objectNumber: 77111
tableSpaceNumber: 7
a
) h as
CellCLI> m
cothe
Note that in step 15 the value for optimized physical reads is 473owhile
c ฺ e ฺ
i r
hitCount observed in this step is 150. Why is this so? In the remaining timeu i d
allocated for
l l i @ fort theG
this practice, query the Exadata Smart Flash Cache hitCount
a v a en other cells
values
(qr01cel02 and qr01cel03) and compare the hitCount
a d total t d all the cells with
across
uExplain
the optimized physical reads value observed
a ฺ y
r his in step S
15. your observations.
18. Exit your terminal sessions.
u k um se t
( v en e to u
v a lli ens
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Key Capabilities of Exadata Database Machine


Chapter 4 - Page 18
Practice 4-4: Storage Index
Overview
In this practice, you are introduced to the storage index capability of Exadata. You will execute a
query multiple times and examine statistics to measure the effect of storage index.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Tasks
1. Establish a terminal connection to qr01db01 as the oracle user.
2. Connect to your database with SQL*Plus. Log in as the sales user.
[oracle@qr01db01 ~]$ sqlplus sales/sales

SQL*Plus: Release 11.2.0.3.0 Production...

a
has
SQL>
3. Execute the following query (or execute the SQL script /home/oracle/labs/lab04- )
04-03.sql) and verify that the statistics are at or near zero values: ฺ c om ฺ
SQL> select a.name, b.value/1024/1024 MB i rco uide
2 from v$sysstat a, v$mystat b
a l li@ nt G
3 where a.statistic# = b.statistic# and
d a v de
4 (a.name in ('physical read total bytes',
r ฺ y a S tu
5
m
'physical write total abytes',this
6 u se
uk o ubytes')
'cell IO uncompressed
7 or a.name like 'cell e n
(v se t
phy%');

l l i
a icen
NAME
d a v l MB

Y a ble
---------------------------------------------------------------- ----------
physical r
a write e a bytes
rtotal
read total 0
m
u an s f
u k physical
n cell t r
bytes 0

e cell
n - physical IO interconnect bytes
V no physical IO bytes saved during optimized file creation
0
0
cell physical IO bytes saved during optimized RMAN file restore 0
cell physical IO bytes eligible for predicate offload 0
cell physical IO bytes saved by storage index 0
cell physical IO bytes sent directly to DB node to balance CPU 0
cell physical IO interconnect bytes returned by smart scan 0
cell IO uncompressed bytes 0

10 rows selected.

SQL>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Key Capabilities of Exadata Database Machine


Chapter 4 - Page 19
4. Execute the following query (or execute the SQL script /home/oracle/labs/lab04-
04-04.sql).
SQL> select cust_gender,count(*) from mycustomers
2 where cust_income_level = 'C: 50,000 - 69,999'
3 group by cust_gender;
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

C COUNT(*)
- ----------
M 47924
F 27300

SQL>
5. Repeat the statistics query from step 3 (or execute the SQL script a
/home/oracle/labs/lab04-04-03.sql).
) has
SQL> select a.name, b.value/1024/1024 MB
ฺ c om ฺ
rco uide
2 from v$sysstat a, v$mystat b
i
li@ nt G
3 where a.statistic# = b.statistic# and
4 (a.name in ('physical read total bytes',
a l
'physical write total bytes', av de
5
a d t u
6
rฺy his S
'cell IO uncompressed bytes')
a
um se t
7 or a.name like 'cell phy%');

u k
NAME
( v en e to u MB
i
allbytesicens
---------------------------------------------------------------- ----------
physical read a v l
d totallebytes
total 204.484375
a
r Y eIOrainterconnect
b
physical write 0
cellaphysical
u m physical
n s f IO bytes saved during optimized file creation
bytes 1.07327271

u k cell
r a 0
n cell
Ve nocelln-tphysical IO bytes saved during optimized RMAN file restore
physical IO bytes eligible for predicate offload
0
204.4375
cell physical IO bytes saved by storage index 0
cell physical IO bytes sent directly to DB node to balance CPU 0
cell physical IO interconnect bytes returned by smart scan 1.02639771
cell IO uncompressed bytes 204.4375

10 rows selected.

SQL>
The statistics show that the query in step 4 was conducted using Smart Scan. Note,
however, that cell physical IO bytes saved by storage index is zero. This is
because storage indexes are memory structures which do not persist when the Exadata
cells are restarted. They are dynamically built when tables are referenced for the first time
after the cells restart. Now that the mycustomers table has been scanned as a result of
the query in step 4, all subsequent queries on the mycustomers table can benefit from
whatever storage indexes the Exadata cells automatically create.

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Key Capabilities of Exadata Database Machine


Chapter 4 - Page 20
6. Reconnect to your database in order to reset the session-level statistics.
SQL> connect sales/sales
Connected.
SQL>
7. Repeat the statistics query from step 3 (or execute the SQL script
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

/home/oracle/labs/lab04-04-03.sql) and verify that the statistics are again at or


near zero values:
SQL> select a.name, b.value/1024/1024 MB
2 from v$sysstat a, v$mystat b
3 where a.statistic# = b.statistic# and
4 (a.name in ('physical read total bytes',
5 'physical write total bytes',
6 'cell IO uncompressed bytes')
7 or a.name like 'cell phy%');
a
NAME ) hMBas
ฺ c
---------------------------------------------------------------- ---------- om ฺ
physical read total bytes
i r co uide 0
physical write total bytes
a l li@ nt G 0
cell physical IO interconnect bytes
cell physical IO bytes saved during optimizeddfile a v creationd e 0

ฺ y a S t u 0

a r his
cell physical IO bytes saved during optimized RMAN file restore 0

k
cell physical IO bytes eligible for
cell physical IO bytes saved u
umpredicate
s e t offload 0

e n by storage
t o u index 0

l v se
cell physical IO bytes (sent
i directly to DB node to balance CPU 0

v l
a icen bytes returned by smart scan
cell physical IO interconnect 0
a
ad ble
cell IO uncompressed l
bytes 0
Y
ar selected.ra
m s f e
ku tran
10 rows

n u
Ve noSQL>n-
8. Re-execute the query from step 4 (or execute the SQL script
/home/oracle/labs/lab04-04-04.sql).
SQL> select cust_gender,count(*) from mycustomers
2 where cust_income_level = 'C: 50,000 - 69,999'
3 group by cust_gender;

C COUNT(*)
- ----------
M 47924
F 27300

SQL>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Key Capabilities of Exadata Database Machine


Chapter 4 - Page 21
9. Repeat the statistics query from step 3 (or execute the SQL script
/home/oracle/labs/lab04-04-03.sql).
SQL> select a.name, b.value/1024/1024 MB
2 from v$sysstat a, v$mystat b
3 where a.statistic# = b.statistic# and
4 (a.name in ('physical read total bytes',
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

5 'physical write total bytes',


6 'cell IO uncompressed bytes')
7 or a.name like 'cell phy%');

NAME MB
---------------------------------------------------------------- ----------
physical read total bytes 204.4375
physical write total bytes 0
cell physical IO interconnect bytes 1.00943756 a
cell physical IO bytes saved during optimized file creation
) has 0

om ฺ
cell physical IO bytes saved during optimized RMAN file restore 0
ฺ c
rco uide
cell physical IO bytes eligible for predicate offload 204.4375
cell physical IO bytes saved by storage index i 111.140625
cell physical IO bytes sent directly to DB node to balance CPU
a l li@ nt G 0

a d av tude
cell physical IO interconnect bytes returned by smart scan 1.00943756

rฺy his S
cell IO uncompressed bytes 93.296875
a
10 rows selected.
u k um se t
( v en e to u
SQL>
a l li ens
v
da that
This time you will see
lic in step 8 benefits from the storage index. Instead of
the query
conducting more a than 204le MB of I/O inside the cells, storage indexes were used to bypass
more than a r111YMBeofraI/O.b In other words, approximately 93 MB of I/O was conducted
u mof 204nMB.
instead s f Queries that benefit from storage indexes can execute more quickly
k
nuusing traresources which allows other workloads to benefit from the unused I/O
fewer
e n
V resources. -
no
10. Exit your SQL*Plus session.

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 4: Key Capabilities of Exadata Database Machine


Chapter 4 - Page 22
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a
) has
ฺ c om ฺ
i rco uide
Practices for a l i@ t G5:
lLesson
d a v den
Exadata
r ฺ y a Database
S tu Machine
u m e t his
a Configuration
Initial
e n uk Chapter
o us5
t
a l li (v ense
d a v lic
Y a ble
r
a sfera
m
ku tran
n u
Ve non-

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5: Exadata Database Machine Initial Configuration


Chapter 5 - Page 1
Practices for Lesson 5
Practices Overview
In this practice, you will be introduced to the Oracle Exadata Deployment Assistant
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a
) has
ฺ c om ฺ
i rco uide
a l li@ nt G
a d av tude
a rฺy his S
u k um se t
( v en e to u
v a lli ens
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5: Exadata Database Machine Initial Configuration


Chapter 5 - Page 2
Practice 5-1: Using the Oracle Exadata Deployment Assistant
Overview
In this practice, you will be introduced to the Oracle Exadata Deployment Assistant. You will use
the assistant to generate a set of configuration files for an example Database Machine
implementation scenario.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Tasks
1. Establish a terminal session connected to qr01db01 using the oracle OS user. Ensure
that you specify the –X option for ssh.
$ ssh –X oracle@qr01db01
oracle@qr01db01 password: <oracle>
a
[oracle@qr01db01 ~]$
) has
2. The Oracle Exadata Configuration Assistant is bundled in the patch containing the
OneCommand configuration utility for Database Machine. In your laboratory ฺ c om ฺ
environment,
the Oracle Exadata Configuration Assistant is located under i rco uide
/home/oracle/labs/Exaconf on qr01db01. Change directory
a l li@to nthet directory
G
containing the Oracle Exadata Configuration Assistant. av
a d t u de
arฺy this S
[oracle@qr01db01 ~]$ cd labs/Exaconf
[oracle@qr01db01 Exaconf]$ m
u u se
kAssistant.
e e to u
3. Start the Oracle Exadata Configuration
( v n
[oracle@qr01db01lliExaconf]$ s ./exaconf.sh
v a e n
a da le lic
4. By using the
a r Y rabin the following table, populate the Oracle Exadata Configuration
information
u m
Assistant fe the default values for fields that are not specified in the following
pages. Leave
n s
k
nuuntil you
table. Examine
t r a the Review
the options and additional information presented on each page. Proceed
e
V non - reach and Edit Details page.
Step Window/Page Description Choices or Values
a. Customer Details Customer Name: Example Industries
Application: Example Full Rack
b. Hardware Selection This is your deployment: X3-2 Full Rack HP
c. Networking Examine the IP address requirements summary.
d. Administration Network Starting IP Address for Pool: 10.7.7.101
Gateway: 10.7.7.1
e. Client Ethernet Network Starting IP Address for Pool: 172.16.1.101
Gateway: 172.16.1.1
f. InfiniBand Network Leave the default values.
g. Backup / Data Guard Leave unconfigured.
Ethernet Network

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5: Exadata Database Machine Initial Configuration


Chapter 5 - Page 3
Step Window/Page Description Choices or Values
h. OS Configuration Domain Name: example.com
DNS Servers: 10.7.7.5
NTP Servers: 10.7.7.5
Check the option for “Separate Grid Infrastructure
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

owner from the Database Owner”


i. Home and Database Leave the default values.
j. Cell Alerting Leave unconfigured.
k. Oracle Configuration Leave unconfigured.
Manager
l. Auto Service Request Leave unconfigured.
m. Grid Control Agent Leave unconfigured. a
has
5. On the Review and Edit Details page, click Generate Configuration Data. Examine )the
ฺ c om ฺ
configuration details on the page. When you have finished, click Next to proceed.
i rco uide
a l li@ nt G
a d av tude
a rฺy his S
u k um se t
( v en e to u
v a lli ens
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5: Exadata Database Machine Initial Configuration


Chapter 5 - Page 4
6. On the Complete page, click Create Files to create the configuration files for this
deployment scenario. Click OK in the confirmation dialog.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a
) has
ฺ c om ฺ
i rco uide
a l li@ nt G
a d av tude
a rฺy his S
u k um se t
( v en e to u
v a lli ens
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5: Exadata Database Machine Initial Configuration


Chapter 5 - Page 5
7. At this point, you should see a dialog indicating that the configuration files were successfully
generated. The assistant will also open a new terminal window with the current directory set
to the location of the generated configuration files. You may use this terminal window to
examine the generated files. Run ls -R and confirm that you see a file listing similar to the
screen shot below.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a
) has
ฺ c om ฺ
i rco uide
a l li@ nt G
a d av tude
a rฺy his S
u k um se t
( v en e to u
v a lli ens
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5: Exadata Database Machine Initial Configuration


Chapter 5 - Page 6
8. View the catalog.xml file (using the more command or vi if you prefer). This file, also
known as the Database Machine schematic file, is one of the main configuration files that
drives the Database Machine configuration process. Examine the file and confirm that the
details within it match your inputs to the deployment assistant. Take a few minutes to
examine the other configuration files as well.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a
) has
ฺ c om ฺ
i rco uide
a l li@ nt G
a d av tude
a rฺy his S
u k um se t
( v en e to u
v a lli ens
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5: Exadata Database Machine Initial Configuration


Chapter 5 - Page 7
9. After you are satisfied, click OK in the dialog window to complete the Oracle Exadata
Deployment Assistant session.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a
) has
ฺ c om ฺ
i rco uide
a l li@ nt G
a d av tude
a rฺy his S
u k um se t
( v en e to u
v a lli ens
a da le lic
a r Y you
Congratulations, e r ab now used the Oracle Exadata Deployment Assistant to generate
have
akset n f
uofmconfiguration
s files for a database Machine deployment scenario. In the final part of
u
n practice r a
-t you will use the deployment assistant to import your configuration information
Ve this o n
n make some changes.
and
10. By using your original terminal window, start the Oracle Exadata Configuration Assistant.
[oracle@qr01db01 Exaconf]$ ./exaconf.sh

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5: Exadata Database Machine Initial Configuration


Chapter 5 - Page 8
11. On the Welcome page, click Import.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a
) has
ฺ c om ฺ
i rco uide
a l li@ nt G
a d av tude
a rฺy his S
u k um se t
( v en e to u
v a lli ens
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5: Exadata Database Machine Initial Configuration


Chapter 5 - Page 9
12. Use the Import Configuration File dialog to select the catalog.xml file under
/tmp/OneCommand/Example Industries.Example Full Rack/dm01. After you
select the file, click Open to proceed.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a
) has
ฺ c om ฺ
i rco uide
a l li@ nt G
a d av tude
a rฺy his S
u k um se t
( v en e to u
v a lli ens
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5: Exadata Database Machine Initial Configuration


Chapter 5 - Page 10
13. Click No in the Import generated data dialog box. This instructs the deployment assistant to
only import the inputs gathered during the original deployment assistant session, and not all
of the consequently generated settings. Finally, click OK in the dialog box indicating that the
file import is complete.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a
) has
ฺ c om ฺ
i rco uide
a l li@ nt G
a d av tude
a rฺy his S
u k um se t
( v en e to u
v a lli ens
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5: Exadata Database Machine Initial Configuration


Chapter 5 - Page 11
14. Navigate to the Administration Network page. Along the way, confirm that the deployment
assistant pages contain details from your previously generated configuration.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a
) has
ฺ c om ฺ
i rco uide
a l li@ nt G
a d av tude
a rฺy his S
u k um se t
( v en e to u
v a lli ens
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5: Exadata Database Machine Initial Configuration


Chapter 5 - Page 12
15. Imagine that you wish to implement a non-default host naming convention. Click Modify.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a
) has
ฺ c om ฺ
i rco uide
a l li@ nt G
a d av tude
a rฺy his S
u k um se t
( v en e to u
v a lli ens
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5: Exadata Database Machine Initial Configuration


Chapter 5 - Page 13
16. In the Admin Network Format Masks dialog, modify the Compute Node Name to dm01db%%
and modify the Cell Node Name to dm01cel%%. Notice that as you make these changes,
the associated ILOM hosts names also change. Finally, click Save to accept the
modifications.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a
) has
ฺ c om ฺ
i rco uide
a l li@ nt G
a d av tude
a rฺy his S
u k um se t
( v en e to u
v a lli ens
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5: Exadata Database Machine Initial Configuration


Chapter 5 - Page 14
17. Notice how the change alters the sample first host names displayed in the Administration
Network Page. Similar capabilities are also available on the Client Ethernet Network and
InfiniBand Network pages.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a
) has
ฺ c om ฺ
i rco uide
a l li@ nt G
a d av tude
a rฺy his S
u k um se t
( v en e to u
v a lli ens
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5: Exadata Database Machine Initial Configuration


Chapter 5 - Page 15
18. Navigate to the Home and Database page.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a
) has
ฺ c om ฺ
i rco uide
a l li@ nt G
a d av tude
a rฺy his S
u k um se t
( v en e to u
v a lli ens
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5: Exadata Database Machine Initial Configuration


Chapter 5 - Page 16
19. Modify the disk group redundancy setting to NORMAL for both disk groups. Notice the
resulting change in disk group sizing information.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a
) has
ฺ c om ฺ
i rco uide
a l li@ nt G
a d av tude
a rฺy his S
u k um se t
( v en e to u
v a lli ens
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5: Exadata Database Machine Initial Configuration


Chapter 5 - Page 17
20. Check the option to reserve additional space in the RECO disk group for a full database
backup. Notice the resulting change in disk group sizing information.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a
) has
ฺ c om ฺ
i rco uide
a l li@ nt G
a d av tude
a rฺy his S
u k um se t
( v en e to u
v a lli ens
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5: Exadata Database Machine Initial Configuration


Chapter 5 - Page 18
21. Navigate to the Review and Edit Details page and click Generate Configuration Data.
Notice how the host names have changed to reflect the changes you made in step 16.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a
) has
ฺ c om ฺ
i rco uide
a l li@ nt G
a d av tude
a rฺy his S
u k um se t
( v en e to u
v a lli ens
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5: Exadata Database Machine Initial Configuration


Chapter 5 - Page 19
22. Generate an updated set of configuration files and examine the updated catalog.xml file
to verify the modified disk group settings.
Hint: See steps 6-8 earlier in this practice.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a
) has
ฺ c om ฺ
i rco uide
a l li@ nt G
a d av tude
a rฺy his S
u k um se t
( v en e to u
v a lli ens
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5: Exadata Database Machine Initial Configuration


Chapter 5 - Page 20
23. After you are satisfied, click OK in the dialog box to complete the Oracle Exadata
Deployment Assistant session.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a
) has
ฺ c om ฺ
i rco uide
a l li@ nt G
a d av tude
a rฺy his S
u k um se t
( v en e to u
v a lli ens
a da le lic
24. Exit youra r Y sessions.
terminal e r ab
um ans f
u k
n n-tr
e
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5: Exadata Database Machine Initial Configuration


Chapter 5 - Page 21
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a
) has
ฺ c om ฺ
i rco uide
a l li@ nt G
a d av tude
a rฺy his S
u k um se t
( v en e to u
v a lli ens
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 5: Exadata Database Machine Initial Configuration


Chapter 5 - Page 22
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a
) has
ฺ c om ฺ
i rco uide
Practices for a l i@ t G6:
lLesson
d a v den
Exadata
r ฺ y a Storage
S tu Server
a this
Configuration
m
u u
k use
v n
e e Chapter
to 6
i (
ll ens
v a
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 1
Practices for Lesson 6
Practices Overview
In these practices, you will perform a variety of Exadata configuration tasks, including cell
configuration and storage reconfiguration. You will also consume Exadata storage using ASM,
configure Exadata storage security, exercise the privileges associated with the different cell user
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

accounts and use the distributed command line utility (dcli).

a
) has
ฺ c om ฺ
i rco uide
a l li@ nt G
a d av tude
a rฺy his S
u k um se t
( v en e to u
v a lli ens
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 2
Practice 6-1: Cell Configuration
Overview
In this practice you examine, set, and validate some Exadata cell parameters.

Tasks
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

1. Establish a terminal connection to the qr01cel01 Exadata cell as the celladmin user.
2. Launch the Exadata cell command-line interface (CellCLI).
[celladmin@qr01cel01 ~]$ cellcli
CellCLI: Release 11.2.3.2.1 – Production...

CellCLI>
3. Execute the following CellCLI command to examine the attributes of the cell.
a
CellCLI> list cell detail
) has
om ฺ
name: qr01cel01
bbuTempThreshold: 60
ฺ c
bbuChargeThreshold: 800
i r co uide
bmcType: absent
a l li@ nt G
cellVersion:
av tude
OSS_11.2.3.2.1_LINUX.X64_130109
a d
rฺy his S
cpuCount: 1
diagHistoryDays: 7 a
fanCount:
u k u1/1m se t
fanStatus:
e n o
normal
t u
( v
v
id: a lli ense8ab50138-a667-4793-a976-c540dc1930c5
flashCacheMode: WriteThrough

a da le lic
interconnectCount: 3

a r Y r ab
interconnect1: eth1

u m ns f e iormBoost: 0.0
k
nu n-tra ipaddress1: 192.168.1.103/24
e
V no kernelVersion: 2.6.32-400.11.1.el5uek
makeModel: Fake hardware
metricHistoryDays: 7
offloadEfficiency: 596.0
powerCount: 1/1
powerStatus: normal
releaseVersion: 11.2.3.2.1
releaseTrackingBug: 14522699
status: online
temperatureReading: 0.0
temperatureStatus: normal
upTime: 0 days, 1:55
cellsrvStatus: running
msStatus: running
rsStatus: running

CellCLI>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 3
4. Configure the cell to send email alerts to a fictitious Exadata administrator.
CellCLI> alter cell smtpServer='my_mail.example.com', -
> smtpFromAddr='john.doe@example.com', -
> smtpFrom='John Doe', -
> smtpToAddr='jane.smith@example.com', -
> notificationPolicy='critical,warning,clear', -
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

> notificationMethod='mail'
Cell qr01cel01 successfully altered

CellCLI>
5. Re-examine the cell configuration to verify the changes you made in step 4.
CellCLI> list cell detail
name: qr01cel01
bbuTempThreshold: 60
a
has
bbuChargeThreshold: 800
bmcType:
)
absent
cellVersion:
ฺ c om ฺ
OSS_11.2.3.2.1_LINUX.X64_130109
cpuCount:
i rco uide
1

li@ nt G
diagHistoryDays: 7
a l
av tude
fanCount: 1/1
fanStatus:
a d normal
flashCacheMode:
a rฺy his S WriteThrough
id:
u k um se t 8ab50138-a667-4793-a976-c540dc1930c5

en e to u
interconnectCount: 3

( v
interconnect1: eth1

v a lli ens
iormBoost: 0.0

a da le lic
ipaddress1: 192.168.1.103/24

a r Y erabkernelVersion: 2.6.32-400.11.1.el5uek

k u m nsf makeModel: Fake hardware

nu n-tra
metricHistoryDays: 7
e
V no
notificationMethod:
notificationPolicy:
mail
critical,warning,clear
offloadEfficiency: 596.0
powerCount: 1/1
powerStatus: normal
releaseVersion: 11.2.3.2.1
releaseTrackingBug: 14522699
smtpFrom: "John Doe"
smtpFromAddr: john.doe@example.com
smtpServer: my_mail.example.com
smtpToAddr: jane.smith@example.com
status: online
temperatureReading: 0.0
temperatureStatus: normal
upTime: 0 days, 1:56
cellsrvStatus: running
msStatus: running
rsStatus: running
CellCLI>
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 4
6. Execute the following CellCLI command to validate the email attributes configured for the
cell.
Note: Executing this command attempts to send a test email to each of the configured
email addresses. The validation process only confirms the ability to successfully send a test
email using the specified configuration. The validation process does not confirm the
existence of the target email account, nor does it confirm successful receipt of the test
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

email message. In this case an error message is observed because the target email server
(my_mail.example.com) does not really exist.
CellCLI> alter cell validate mail

CELL-02578: An error was detected in the SMTP configuration:


CELL-05503: An error was detected during notification. The text
of the associated internal error is: Unknown SMTP host:
my_mail.example.com.
a
has
The notification recipient is jane.smith@example.com.
)
Please verify your SMTP configuration.
ฺ c om ฺ
i rco uide
CellCLI>
a l li@ nt G
a d av tinternal
7. Execute the following CellCLI command to perform a complete
u de check of the cell
arฺy this S
configuration settings.
CellCLI> alter cell validate m
kualtered
configuration
Cell qr01cel01 successfully n u u se
( v e e to
a i
ll ens
v lic
adaCELL
CellCLI>
Note that the Y
ALTER b l e VALIDATE CONFIGURATION command does not perform I/O
r a
er hard disks and flash modules. You must use the CALIBRATE
a thescell’s
tests against
u m f
n u k tran such tests. The CALIBRATE command can only be executed in a
command to perform

Ve8. Exit n-session initiated by the root user.


CellCLI
noyour CellCLI session.

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 5
Practice 6-2: Storage Reconfiguration
Overview
In this practice, you alter the Database Machine storage configuration. The approach used in
this practice allows the storage reconfiguration to occur while the system is running and
databases remain available. The procedure is based on one of the methods described in the
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

section entitled Resizing Storage Grid Disks in the Oracle Exadata Database Machine Owner’s
Guide.
In this practice you will reconfigure the RECO_QR01 ASM disk group. The aim is to resize the
disk group and underlying Exadata grid disks so that some of the available free space can be
used to create another disk group in the following practice.
Often storage is reconfigured to alter the balance of space allocated to the default DATA and
RECO disk groups. In such cases, both disk groups are reconfigured in parallel, with the space
freed from one disk group immediately consumed by the other disk group. See the Oracle
Exadata Database Machine Owner’s Guide for more information. a
has
Note: To complete this practice successfully, you must follow the instructions carefully and
)
ฺ c om ฺ
replicate the commands exactly. Failure to do so could result in unrecoverable damage to your

rco uide
lab environment. Please take care.
i
Tasks
a l li@ nt G
1. Establish a terminal connection to qr01db01 as the grid
a d avuser.tude
rฺy his S
2. Using SQL*Plus, connect to ASM as an ASM administrator.
a
[grid@qr01db01 ~]$ sqlplus u /m e t
u k as sysasm
s
( v en e to u
SQL*Plus: Release
v a lli 11.2.0.3.0
e n s Production...
a d a e lic
SQL> Y
r a b l
m athe ASM f r groups in your environment using the following query (or execute
edisk
u
3. Examine s
an/home/oracle/labs/lab06-02-03.sql). For the reconfiguration
k SQL script
e nuthe - t r
non used
V approach
associated
in the practice, the amount of free space in the disk group must exceed the
REQUIRED_MIRROR_FREE_MB value. Ensure this is the case for the
RECO_QR01 disk group.
SQL> select name, total_mb, free_mb, required_mirror_free_mb
2 from v$asm_diskgroup;

NAME TOTAL_MB FREE_MB REQUIRED_MIRROR_FREE_MB


------------------------------ ---------- ---------- -----------------------
DATA_QR01 21312 10596 7104
DBFS_DG 5760 4424 1920
RECO_QR01 28800 27604 9600

SQL>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 6
4. The following query shows a summary of the space utilization for the disks in each disk
group (use the SQL script /home/oracle/labs/lab06-02-04.sql if you prefer). For
each disk group the query shows the number of associated disks, the size of each disk and
the minimum and maximum amount of free space on the disks. Examine the output to
ensure that the disk group being reconfigured is reasonably well balanced. In particular
ensure that none of the disks are at or near capacity because this may cause problems with
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

later rebalancing operations. If required rebalance the disk group using the ALTER
DISKGROUP ... REBALANCE command prior to proceeding.
SQL> select dg.name, count(*), d.total_mb,
2 min(d.free_mb) MIN_FREE_MB, max(d.free_mb) MAX_FREE_MB
3 from v$asm_disk d, v$asm_diskgroup dg
4 where dg.group_number=d.group_number and d.mount_status='CACHED'
5 group by dg.name, d.total_mb;

NAME COUNT(*) TOTAL_MB MIN_FREE_MB MAX_FREE_MB


a
------------------------------ ---------- ---------- ----------- -----------
) has
om ฺ
DBFS_DG 36 160 88 136
DATA_QR01 36 592 268
ฺ c
344
RECO_QR01 36 800 748
i rco uide
788

a l li@ nt G
SQL>
a d av tude
5. Check that no ASM rebalance operations are currently
a r ฺy active
i s Sacross the cluster.
SQL> select * from gv$asm_operation;
k u m e th
e n u o us
no rows selected (v
i e t
l l
a icen s
a v
SQL>
Y ad ble l
6. Drop the a
r e ra with the cell qr01cel01 (use the SQL script
m s f
disks associated

n u ku tran
/home/oracle/labs/lab06-02-06.sql if you prefer). Note that a disk group
e
V noSQL> n -
rebalance is specified in order to maintain data redundancy.
alter diskgroup reco_qr01
2 drop disks in failgroup qr01cel01
3 rebalance power 11;

Diskgroup altered.

SQL>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 7
7. Monitor the rebalance operation using the following query.
SQL> select * from gv$asm_operation;

INST_ID GROUP_NUMBER OPERA STAT POWER ACTUAL SOFAR EST_WORK


---------- ------------ ----- ---- ---------- ---------- ---------- ----------
EST_RATE EST_MINUTES ERROR_CODE
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

---------- ----------- --------------------------------------------


1 3 REBAL RUN 11 11 60 199
225 0

SQL>
8. Periodically repeat the query to monitor the rebalance operation. When the query returns no
results, the rebalance operation is completed. Do not proceed to the next step until the
rebalance operation completes. a
SQL> select * from gv$asm_operation; ) has
ฺ c om ฺ
no rows selected
i rco uide
a l li@ nt G
SQL>
a d av tude
9. Use the following query (or execute the SQL script
a rฺy/home/oracle/labs/lab06-02-
h i s S
09.sql) to confirm that the disks are dropped
k u m et
(HEADER_STATUS=FORMER and
MOUNT_STATUS=CLOSED).
e n u o us
i e t
(v header_status,
a l l
SQL> select path, free_mb,
n s mount_status

d a l i ce
vlike '%RECO_QR01%cel01';
2 from v$asm_disk

a ble
3 where path
Y
r
a sfera
m
ku------------------------------------------------------------------------------
PATH

n u - t r an
e nFREE_MB HEADER_STATU MOUNT_S
V no---------- ------------ -------
o/192.168.1.103/RECO_QR01_CD_11_qr01cel01
0 FORMER CLOSED

o/192.168.1.103/RECO_QR01_CD_08_qr01cel01
0 FORMER CLOSED

o/192.168.1.103/RECO_QR01_CD_00_qr01cel01
0 FORMER CLOSED

o/192.168.1.103/RECO_QR01_CD_06_qr01cel01
0 FORMER CLOSED

o/192.168.1.103/RECO_QR01_CD_10_qr01cel01
0 FORMER CLOSED

o/192.168.1.103/RECO_QR01_CD_01_qr01cel01

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 8
0 FORMER CLOSED

o/192.168.1.103/RECO_QR01_CD_04_qr01cel01

PATH
------------------------------------------------------------------------------
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

FREE_MB HEADER_STATU MOUNT_S


---------- ------------ -------
0 FORMER CLOSED

o/192.168.1.103/RECO_QR01_CD_07_qr01cel01
0 FORMER CLOSED

o/192.168.1.103/RECO_QR01_CD_05_qr01cel01
0 FORMER CLOSED
a
o/192.168.1.103/RECO_QR01_CD_09_qr01cel01 ) has
0 FORMER CLOSED
ฺ c om ฺ
i rco uide
o/192.168.1.103/RECO_QR01_CD_03_qr01cel01
a l li@ nt G
av tude
0 FORMER CLOSED

a d
a
o/192.168.1.103/RECO_QR01_CD_02_qr01cel01 rฺy his S
0 FORMER CLOSED
u k um se t
( v en e to u
12 rows selected. lli ns
v a c e
Y ada ble li
aarseparate a connection to the qr01cel01 Exadata cell as the
SQL>

m f e rterminal
10. Establish
ku trauser. s
n Maintain your ASM administrator SQL session as you will require this
e n u
celladmin
-
on the rest of the practice.
V throughout
n
11. Launch the Exadata cell command-line interface (CellCLI).
[celladmin@qr01cel01 ~]$ cellcli
CellCLI: Release 11.2.3.2.1 - Production...

CellCLI>
12. Examine the grid disks on qr01cel01. Notice the ASMModeStatus for the dropped disks.
CellCLI> list griddisk attributes name, size, ASMModeStatus
DATA_QR01_CD_00_qr01cel01 592M ONLINE
DATA_QR01_CD_01_qr01cel01 592M ONLINE
DATA_QR01_CD_02_qr01cel01 592M ONLINE
DATA_QR01_CD_03_qr01cel01 592M ONLINE
DATA_QR01_CD_04_qr01cel01 592M ONLINE
DATA_QR01_CD_05_qr01cel01 592M ONLINE
DATA_QR01_CD_06_qr01cel01 592M ONLINE
DATA_QR01_CD_07_qr01cel01 592M ONLINE
DATA_QR01_CD_08_qr01cel01 592M ONLINE
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 9
DATA_QR01_CD_09_qr01cel01 592M ONLINE
DATA_QR01_CD_10_qr01cel01 592M ONLINE
DATA_QR01_CD_11_qr01cel01 592M ONLINE
DBFS_DG_CD_00_qr01cel01 160M ONLINE
DBFS_DG_CD_01_qr01cel01 160M ONLINE
DBFS_DG_CD_02_qr01cel01 160M ONLINE
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

DBFS_DG_CD_03_qr01cel01 160M ONLINE


DBFS_DG_CD_04_qr01cel01 160M ONLINE
DBFS_DG_CD_05_qr01cel01 160M ONLINE
DBFS_DG_CD_06_qr01cel01 160M ONLINE
DBFS_DG_CD_07_qr01cel01 160M ONLINE
DBFS_DG_CD_08_qr01cel01 160M ONLINE
DBFS_DG_CD_09_qr01cel01 160M ONLINE
DBFS_DG_CD_10_qr01cel01 160M ONLINE
DBFS_DG_CD_11_qr01cel01 160M ONLINE
a
has
RECO_QR01_CD_00_qr01cel01 800M UNUSED
RECO_QR01_CD_01_qr01cel01 800M ) UNUSED
RECO_QR01_CD_02_qr01cel01
c
800M
ฺ om ฺ UNUSED
RECO_QR01_CD_03_qr01cel01
i rco uide
800M UNUSED
RECO_QR01_CD_04_qr01cel01
a l li@ nt G 800M UNUSED

av tude
RECO_QR01_CD_05_qr01cel01 800M UNUSED
RECO_QR01_CD_06_qr01cel01
a d 800M UNUSED
RECO_QR01_CD_07_qr01cel01
a rฺy his S 800M UNUSED

u k um se t
RECO_QR01_CD_08_qr01cel01 800M UNUSED

en e to u
RECO_QR01_CD_09_qr01cel01 800M UNUSED

( v
RECO_QR01_CD_10_qr01cel01 800M UNUSED

v a lli ens
RECO_QR01_CD_11_qr01cel01 800M UNUSED

a d a e lic
CellCLI>Y
r a b l
m
13. Drop the
u
agrid disks
s f eonr qr01cel01 previously associated with the RECO_QR01 disk group.
nuk CellCLI>
- t r androp griddisk all prefix=reco_qr01
e n
V noGridDisk RECO_QR01_CD_00_qr01cel01 successfully dropped
GridDisk RECO_QR01_CD_01_qr01cel01 successfully dropped
GridDisk RECO_QR01_CD_02_qr01cel01 successfully dropped
GridDisk RECO_QR01_CD_03_qr01cel01 successfully dropped
GridDisk RECO_QR01_CD_04_qr01cel01 successfully dropped
GridDisk RECO_QR01_CD_05_qr01cel01 successfully dropped
GridDisk RECO_QR01_CD_06_qr01cel01 successfully dropped
GridDisk RECO_QR01_CD_07_qr01cel01 successfully dropped
GridDisk RECO_QR01_CD_08_qr01cel01 successfully dropped
GridDisk RECO_QR01_CD_09_qr01cel01 successfully dropped
GridDisk RECO_QR01_CD_10_qr01cel01 successfully dropped
GridDisk RECO_QR01_CD_11_qr01cel01 successfully dropped

CellCLI>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 10
14. Create a new set of grid disks. Use the same grid disk prefix as before, but specify a size of
480 MB for each grid disk.
CellCLI> create griddisk all harddisk prefix=RECO_QR01, size=480M
GridDisk RECO_QR01_CD_00_qr01cel01 successfully created
GridDisk RECO_QR01_CD_01_qr01cel01 successfully created
GridDisk RECO_QR01_CD_02_qr01cel01 successfully created
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

GridDisk RECO_QR01_CD_03_qr01cel01 successfully created


GridDisk RECO_QR01_CD_04_qr01cel01 successfully created
GridDisk RECO_QR01_CD_05_qr01cel01 successfully created
GridDisk RECO_QR01_CD_06_qr01cel01 successfully created
GridDisk RECO_QR01_CD_07_qr01cel01 successfully created
GridDisk RECO_QR01_CD_08_qr01cel01 successfully created
GridDisk RECO_QR01_CD_09_qr01cel01 successfully created
GridDisk RECO_QR01_CD_10_qr01cel01 successfully created
GridDisk RECO_QR01_CD_11_qr01cel01 successfully created
a
CellCLI> ) has

15. Re-examine the grid disk on qr01cel01. Notice the reconfigured grid disks c omtheฺ
with
RECO_QR01 prefix. i rco uide
a l
CellCLI> list griddisk attributes name, size, ASMModeStatusli@ nt G
592M av
ONLINE de
DATA_QR01_CD_00_qr01cel01
y a d tu
DATA_QR01_CD_01_qr01cel01
r ฺ 592M S
ONLINE
a 592MthisONLINE
DATA_QR01_CD_02_qr01cel01
u m
k us592M e
DATA_QR01_CD_03_qr01cel01
e n u o
ONLINE

i ( v
DATA_QR01_CD_04_qr01cel01
e t 592M ONLINE

a l l ens
DATA_QR01_CD_05_qr01cel01 592M ONLINE
v
da le lic
DATA_QR01_CD_06_qr01cel01 592M ONLINE

Y a b
DATA_QR01_CD_07_qr01cel01 592M ONLINE
r
a sfer a
DATA_QR01_CD_08_qr01cel01 592M ONLINE

k m
u an DATA_QR01_CD_09_qr01cel01 592M ONLINE
n u r
t DATA_QR01_CD_10_qr01cel01
Ve non- DATA_QR01_CD_11_qr01cel01
592M ONLINE
592M ONLINE
DBFS_DG_CD_00_qr01cel01 160M ONLINE
DBFS_DG_CD_01_qr01cel01 160M ONLINE
DBFS_DG_CD_02_qr01cel01 160M ONLINE
DBFS_DG_CD_03_qr01cel01 160M ONLINE
DBFS_DG_CD_04_qr01cel01 160M ONLINE
DBFS_DG_CD_05_qr01cel01 160M ONLINE
DBFS_DG_CD_06_qr01cel01 160M ONLINE
DBFS_DG_CD_07_qr01cel01 160M ONLINE
DBFS_DG_CD_08_qr01cel01 160M ONLINE
DBFS_DG_CD_09_qr01cel01 160M ONLINE
DBFS_DG_CD_10_qr01cel01 160M ONLINE
DBFS_DG_CD_11_qr01cel01 160M ONLINE
RECO_QR01_CD_00_qr01cel01 480M UNUSED
RECO_QR01_CD_01_qr01cel01 480M UNUSED
RECO_QR01_CD_02_qr01cel01 480M UNUSED
RECO_QR01_CD_03_qr01cel01 480M UNUSED
RECO_QR01_CD_04_qr01cel01 480M UNUSED

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 11
RECO_QR01_CD_05_qr01cel01 480M UNUSED
RECO_QR01_CD_06_qr01cel01 480M UNUSED
RECO_QR01_CD_07_qr01cel01 480M UNUSED
RECO_QR01_CD_08_qr01cel01 480M UNUSED
RECO_QR01_CD_09_qr01cel01 480M UNUSED
RECO_QR01_CD_10_qr01cel01 480M UNUSED
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

RECO_QR01_CD_11_qr01cel01 480M UNUSED

CellCLI>
16. Exit your CellCLI session but keep your terminal session open. You will require a terminal
session connected to qr01cel01 as the celladmin user later in the practice.
CellCLI> exit
quitting

a
[celladmin@qr01cel01 ~]$
) h as
17. Back in your ASM administrator SQL session, re-execute the following query (orm
execute
the SQL script /home/oracle/labs/lab06-02-09.sql). Notice that the ฺ c o
reconfigured
grid disks are listed with HEADER_STATUS=CANDIDATE. i rco uideฺ
a
SQL> select path, free_mb, header_status, mount_status l li@ nt G
2 from v$asm_disk
a d av tude
3 where path like '%RECO_QR01%cel01'; ฺy
a r his S
u k um se t
en e to u
PATH

( v
------------------------------------------------------------------------------
li MOUNT_S
a
FREE_MB HEADER_STATU
v l
c e ns
ada ble li
---------- ------------ -------

Y
o/192.168.1.103/RECO_QR01_CD_04_qr01cel01
ar 0sCANDIDATEra
m f e CLOSED

n u kuo/192.168.1.103/RECO_QR01_CD_00_qr01cel01
t r an
e
V non - 0 CANDIDATE CLOSED

o/192.168.1.103/RECO_QR01_CD_02_qr01cel01
0 CANDIDATE CLOSED

o/192.168.1.103/RECO_QR01_CD_09_qr01cel01
0 CANDIDATE CLOSED

o/192.168.1.103/RECO_QR01_CD_03_qr01cel01
0 CANDIDATE CLOSED

o/192.168.1.103/RECO_QR01_CD_05_qr01cel01
0 CANDIDATE CLOSED

o/192.168.1.103/RECO_QR01_CD_08_qr01cel01

PATH
------------------------------------------------------------------------------

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 12
FREE_MB HEADER_STATU MOUNT_S
---------- ------------ -------
0 CANDIDATE CLOSED

o/192.168.1.103/RECO_QR01_CD_11_qr01cel01
0 CANDIDATE CLOSED
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

o/192.168.1.103/RECO_QR01_CD_07_qr01cel01
0 CANDIDATE CLOSED

o/192.168.1.103/RECO_QR01_CD_06_qr01cel01
0 CANDIDATE CLOSED

o/192.168.1.103/RECO_QR01_CD_10_qr01cel01
0 CANDIDATE CLOSED
a
o/192.168.1.103/RECO_QR01_CD_01_qr01cel01 ) has
0 CANDIDATE CLOSED
ฺ c om ฺ
i rco uide
a l li@ nt G
av tude
12 rows selected.

a d
SQL>
a rฺy his S
mRECO_QR01
18. Add the reconfigured grid disks back intouthe
k e t disk group, and at the same time
drop the disks associated with the n u s
u (use the SQL script
( v ecell qr01cel02
t o
li ense you prefer).
/home/oracle/labs/lab06-02-18.sql
a l if
a v licreco_qr01 add disk
SQL> alter diskgroup
d
Y a ble
2 'o/192.168.1.103/RECO_QR01_CD_00_qr01cel01',
r ra
3 a 'o/192.168.1.103/RECO_QR01_CD_01_qr01cel01',
e
m s f
n u ku 4 tr'o/192.168.1.103/RECO_QR01_CD_02_qr01cel01',
an
e -
V non5 'o/192.168.1.103/RECO_QR01_CD_03_qr01cel01',
6 'o/192.168.1.103/RECO_QR01_CD_04_qr01cel01',
7 'o/192.168.1.103/RECO_QR01_CD_05_qr01cel01',
8 'o/192.168.1.103/RECO_QR01_CD_06_qr01cel01',
9 'o/192.168.1.103/RECO_QR01_CD_07_qr01cel01',
10 'o/192.168.1.103/RECO_QR01_CD_08_qr01cel01',
11 'o/192.168.1.103/RECO_QR01_CD_09_qr01cel01',
12 'o/192.168.1.103/RECO_QR01_CD_10_qr01cel01',
13 'o/192.168.1.103/RECO_QR01_CD_11_qr01cel01'
14 drop disks in failgroup qr01cel02
15 rebalance power 11;

Diskgroup altered.

SQL>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 13
19. Monitor the rebalance operation by using the following query.
SQL> select * from gv$asm_operation;

INST_ID GROUP_NUMBER OPERA STAT POWER ACTUAL SOFAR EST_WORK


---------- ------------ ----- ---- ---------- ---------- ---------- ----------
EST_RATE EST_MINUTES ERROR_CODE
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

---------- ----------- --------------------------------------------


1 3 REBAL RUN 11 11 78 145
162 0

SQL>
20. Periodically repeat the query to monitor the rebalance operation. When the query returns no
results the rebalance operation is completed. Do not proceed to the next step until the
rebalance operation completes. a
SQL> select * from gv$asm_operation;
) has
ฺ c om ฺ
no rows selected
i rco uide
a l l i@ t G
SQL>
d a v den
21. Re-execute the query from step 4 (use the SQL script
r ฺ y S tu
a /home/oracle/labs/lab06-02-
04.sql if you prefer). Now you can see the m a thidisk
RECO_QR01 s group in a partially
u
reconfigured state. At this point the storageu e
k associated
s with the RECO_QR01 disk group has
e n o u
t and the disks on qr01cel02 have been
been reconfigured on qr01cel01
dropped. l l i (v (12sdisks)
e
a v a count(*),
l i c en d.total_mb,
ad bleMIN_FREE_MB, max(d.free_mb) MAX_FREE_MB
SQL> select dg.name,
Y
r ra d, v$asm_diskgroup dg
2 min(d.free_mb)
3 afrom v$asm_disk
e
m s f
n u ku 4 twhere
r a n dg.group_number=d.group_number and d.mount_status='CACHED'
Ve non5- group by dg.name, d.total_mb;
NAME COUNT(*) TOTAL_MB MIN_FREE_MB MAX_FREE_MB
------------------------------ ---------- ---------- ----------- -----------
DBFS_DG 36 160 80 136
DATA_QR01 36 592 268 344
RECO_QR01 12 800 756 768
RECO_QR01 12 480 436 444

SQL>

22. Establish a separate terminal connection to the qr01cel02 Exadata cell as the
celladmin user.

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 14
23. Launch the Exadata cell command-line interface (CellCLI).
[celladmin@qr01cel02 ~]$ cellcli
CellCLI: Release 11.2.3.2.1 - Production...

CellCLI>
24. Examine the grid disks on qr01cel02. Notice again the ASMModeStatus for the dropped
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

disks.
Note: If the ASMModeStatus for the RECO_QR01 prefixed grid disks is ONLINE then you
have either dropped the wrong disks in step 18 or you are connected to the wrong cell (you
should now be connected to qr01cel02). In either case, do not proceed to the next step
until you have resolved the problem.
CellCLI> list griddisk attributes name, size, ASMModeStatus
DATA_QR01_CD_00_qr01cel02 592M ONLINE
DATA_QR01_CD_01_qr01cel02 592M ONLINE
a
has
DATA_QR01_CD_02_qr01cel02 592M ONLINE
DATA_QR01_CD_03_qr01cel02 592M ONLINE
)
DATA_QR01_CD_04_qr01cel02 592M
om ฺ
ONLINE
ฺ c
rco uide
DATA_QR01_CD_05_qr01cel02 592M ONLINE
DATA_QR01_CD_06_qr01cel02 592Mi ONLINE
DATA_QR01_CD_07_qr01cel02
a l li@ nt G
592M ONLINE
DATA_QR01_CD_08_qr01cel02
a d av tude
592M ONLINE

rฺy his S
DATA_QR01_CD_09_qr01cel02 592M ONLINE
a
DATA_QR01_CD_10_qr01cel02 592M ONLINE

u k um se t
DATA_QR01_CD_11_qr01cel02 592M ONLINE

( v en e to u
DBFS_DG_CD_00_qr01cel02 160M ONLINE

lli ens
DBFS_DG_CD_01_qr01cel02 160M ONLINE

v a
DBFS_DG_CD_02_qr01cel02 160M ONLINE

a da le lic
DBFS_DG_CD_03_qr01cel02 160M ONLINE

a r Y erabDBFS_DG_CD_04_qr01cel02 160M ONLINE

k u m nsf DBFS_DG_CD_05_qr01cel02
DBFS_DG_CD_06_qr01cel02
160M
160M
ONLINE
ONLINE

e nu n-tra DBFS_DG_CD_07_qr01cel02 160M ONLINE


V no DBFS_DG_CD_08_qr01cel02 160M ONLINE
DBFS_DG_CD_09_qr01cel02 160M ONLINE
DBFS_DG_CD_10_qr01cel02 160M ONLINE
DBFS_DG_CD_11_qr01cel02 160M ONLINE
RECO_QR01_CD_00_qr01cel02 800M UNUSED
RECO_QR01_CD_01_qr01cel02 800M UNUSED
RECO_QR01_CD_02_qr01cel02 800M UNUSED
RECO_QR01_CD_03_qr01cel02 800M UNUSED
RECO_QR01_CD_04_qr01cel02 800M UNUSED
RECO_QR01_CD_05_qr01cel02 800M UNUSED
RECO_QR01_CD_06_qr01cel02 800M UNUSED
RECO_QR01_CD_07_qr01cel02 800M UNUSED
RECO_QR01_CD_08_qr01cel02 800M UNUSED
RECO_QR01_CD_09_qr01cel02 800M UNUSED
RECO_QR01_CD_10_qr01cel02 800M UNUSED
RECO_QR01_CD_11_qr01cel02 800M UNUSED

CellCLI>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 15
25. Drop the grid disks on qr01cel02 previously associated with the RECO_QR01 disk group.
CellCLI> drop griddisk all prefix=reco_qr01
GridDisk RECO_QR01_CD_00_qr01cel02 successfully dropped
GridDisk RECO_QR01_CD_01_qr01cel02 successfully dropped
GridDisk RECO_QR01_CD_02_qr01cel02 successfully dropped
GridDisk RECO_QR01_CD_03_qr01cel02 successfully dropped
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

GridDisk RECO_QR01_CD_04_qr01cel02 successfully dropped


GridDisk RECO_QR01_CD_05_qr01cel02 successfully dropped
GridDisk RECO_QR01_CD_06_qr01cel02 successfully dropped
GridDisk RECO_QR01_CD_07_qr01cel02 successfully dropped
GridDisk RECO_QR01_CD_08_qr01cel02 successfully dropped
GridDisk RECO_QR01_CD_09_qr01cel02 successfully dropped
GridDisk RECO_QR01_CD_10_qr01cel02 successfully dropped
GridDisk RECO_QR01_CD_11_qr01cel02 successfully dropped

a
CellCLI>
) has
c o m a size of
26. Create a new set of grid disks. Use the same grid disk prefix as before, but specify

rco uideฺ
480 MB for each grid disk.
CellCLI> create griddisk all harddisk prefix=RECO_QR01, size=480Mi
GridDisk RECO_QR01_CD_00_qr01cel02 successfully created
a l li@ nt G
v de
GridDisk RECO_QR01_CD_01_qr01cel02 successfullyacreated
d
r ฺ
GridDisk RECO_QR01_CD_02_qr01cel02 successfully y a S
createdtu
m a thiscreated
GridDisk RECO_QR01_CD_03_qr01cel02 successfully

u u e created
k successfully
s
GridDisk RECO_QR01_CD_04_qr01cel02
n u
e e tsuccessfully
o
i ( v
GridDisk RECO_QR01_CD_05_qr01cel02 created

v a ll ens successfully created


GridDisk RECO_QR01_CD_06_qr01cel02 successfully

d a l i c
GridDisk RECO_QR01_CD_07_qr01cel02 created

Y a ble
GridDisk RECO_QR01_CD_08_qr01cel02 successfully created
r
GridDisk
e r a
a RECO_QR01_CD_10_qr01cel02
RECO_QR01_CD_09_qr01cel02 successfully created
m
u an s f
u k GridDisk
n GridDisk r
successfully created
t RECO_QR01_CD_11_qr01cel02 successfully created
Ve non-
CellCLI>
27. Exit your CellCLI session.
CellCLI> exit
quitting

[celladmin@qr01cel02 ~]$

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 16
28. Back in your ASM administrator SQL session, add the reconfigured grid disks on
qr01cel02 back into the RECO_QR01 disk group, and at the same time drop the disks
associated with the cell qr01cel03 (use the SQL script /home/oracle/labs/lab06-
02-28.sql if you prefer).
SQL> alter diskgroup reco_qr01 add disk
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

2 'o/192.168.1.104/RECO_QR01_CD_00_qr01cel02',
3 'o/192.168.1.104/RECO_QR01_CD_01_qr01cel02',
4 'o/192.168.1.104/RECO_QR01_CD_02_qr01cel02',
5 'o/192.168.1.104/RECO_QR01_CD_03_qr01cel02',
6 'o/192.168.1.104/RECO_QR01_CD_04_qr01cel02',
7 'o/192.168.1.104/RECO_QR01_CD_05_qr01cel02',
8 'o/192.168.1.104/RECO_QR01_CD_06_qr01cel02',
9 'o/192.168.1.104/RECO_QR01_CD_07_qr01cel02',
a
has
10 'o/192.168.1.104/RECO_QR01_CD_08_qr01cel02',
)
om ฺ
11 'o/192.168.1.104/RECO_QR01_CD_09_qr01cel02',
ฺ c
rco uide
12 'o/192.168.1.104/RECO_QR01_CD_10_qr01cel02',
13 'o/192.168.1.104/RECO_QR01_CD_11_qr01cel02' i
14 drop disks in failgroup qr01cel03 a l li@ nt G
15 rebalance power 11;
a d av tude
a rฺy his S
Diskgroup altered.
u k um se t
( v en e to u
SQL>
v a lli ens
a da operation
29. Monitor the rebalance
l e licas before.
r Y *efrom
SQL> select
a r abgv$asm_operation;
umINST_ID n f
sGROUP_NUMBER OPERA STAT
u k t
n ---------- r a POWER ACTUAL SOFAR EST_WORK
e
V non - ------------ ----- ---- ---------- ---------- ---------- ----------
EST_RATE EST_MINUTES ERROR_CODE
---------- ----------- --------------------------------------------
1 3 REBAL RUN 11 11 39 125
131 0

SQL>
30. Periodically repeat the query to monitor the rebalance operation. When the query returns no
results, the rebalance operation is completed. Do not proceed to the next step until the
rebalance operation completes.
SQL> select * from gv$asm_operation;

no rows selected

SQL>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 17
31. Re-execute the query from step 4 (use the SQL script /home/oracle/labs/lab06-02-
04.sql if you prefer). Now the storage associated with the RECO_QR01 disk group has
been reconfigured on two cells (24 disks on qr01cel01 and qr01cel02) and the disks on
the remaining cell (qr01cel03) have been dropped.
SQL> select dg.name, count(*), d.total_mb,
2 min(d.free_mb) MIN_FREE_MB, max(d.free_mb) MAX_FREE_MB
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

3 from v$asm_disk d, v$asm_diskgroup dg


4 where dg.group_number=d.group_number and d.mount_status='CACHED'
5 group by dg.name, d.total_mb;

NAME COUNT(*) TOTAL_MB MIN_FREE_MB MAX_FREE_MB


------------------------------ ---------- ---------- ----------- -----------
DBFS_DG 36 160 80 136
DATA_QR01 36 592 268 344
RECO_QR01 24 480 432 452
a
) has
om ฺ
SQL>

32. Establish a separate terminal connection to the qr01cel03 Exadata celloas ฺ cthe
celladmin user.
@ irc uide
33. Launch the Exadata cell command-line interface (CellCLI). all
i t G
v
a tude n
[celladmin@qr01cel03 ~]$ cellcli a d
a
CellCLI: Release 11.2.3.2.1 – Production... rฺy his S
u k um se t
CellCLI>
( v en e to u
a
34. Examine the grid disks on li ens Notice again the ASMModeStatus for the dropped
lqr01cel03.
disks.
v
da le lic
a
Y rab for the RECO_QR01 prefixed grid disks is ONLINE then you
Note: If therASMModeStatus
a
m dropped
have either s fe the wrong disks in step 28 or you are connected to the wrong cell (you
k u n
e nushouldn
now
- rabe connected to qr01cel03). In either case, do not proceed to the next step
thave
V no until you resolved the problem.
CellCLI> list griddisk attributes name, size, ASMModeStatus
DATA_QR01_CD_00_qr01cel03 592M ONLINE
DATA_QR01_CD_01_qr01cel03 592M ONLINE
DATA_QR01_CD_02_qr01cel03 592M ONLINE
DATA_QR01_CD_03_qr01cel03 592M ONLINE
DATA_QR01_CD_04_qr01cel03 592M ONLINE
DATA_QR01_CD_05_qr01cel03 592M ONLINE
DATA_QR01_CD_06_qr01cel03 592M ONLINE
DATA_QR01_CD_07_qr01cel03 592M ONLINE
DATA_QR01_CD_08_qr01cel03 592M ONLINE
DATA_QR01_CD_09_qr01cel03 592M ONLINE
DATA_QR01_CD_10_qr01cel03 592M ONLINE
DATA_QR01_CD_11_qr01cel03 592M ONLINE
DBFS_DG_CD_00_qr01cel03 160M ONLINE
DBFS_DG_CD_01_qr01cel03 160M ONLINE
DBFS_DG_CD_02_qr01cel03 160M ONLINE
DBFS_DG_CD_03_qr01cel03 160M ONLINE

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 18
DBFS_DG_CD_04_qr01cel03 160M ONLINE
DBFS_DG_CD_05_qr01cel03 160M ONLINE
DBFS_DG_CD_06_qr01cel03 160M ONLINE
DBFS_DG_CD_07_qr01cel03 160M ONLINE
DBFS_DG_CD_08_qr01cel03 160M ONLINE
DBFS_DG_CD_09_qr01cel03 160M ONLINE
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

DBFS_DG_CD_10_qr01cel03 160M ONLINE


DBFS_DG_CD_11_qr01cel03 160M ONLINE
RECO_QR01_CD_00_qr01cel03 800M UNUSED
RECO_QR01_CD_01_qr01cel03 800M UNUSED
RECO_QR01_CD_02_qr01cel03 800M UNUSED
RECO_QR01_CD_03_qr01cel03 800M UNUSED
RECO_QR01_CD_04_qr01cel03 800M UNUSED
RECO_QR01_CD_05_qr01cel03 800M UNUSED
RECO_QR01_CD_06_qr01cel03 800M UNUSED
a
has
RECO_QR01_CD_07_qr01cel03 800M UNUSED
RECO_QR01_CD_08_qr01cel03 )
800M UNUSED
RECO_QR01_CD_09_qr01cel03
ฺ c om ฺ
800M UNUSED
RECO_QR01_CD_10_qr01cel03
i rco uide
800M UNUSED
RECO_QR01_CD_11_qr01cel03
a l li@ nt G 800M UNUSED

CellCLI>
a d av tude
35. Drop the grid disks on qr01cel03 previouslya rฺy hiswithSthe RECO_QR01 disk group.
associated

u k um se t
CellCLI> drop griddisk all prefix=reco_qr01
e o u
n tsuccessfully
( v
GridDisk RECO_QR01_CD_00_qr01cel03 dropped

v a lli ense successfully


GridDisk RECO_QR01_CD_01_qr01cel03 dropped

da le lic
GridDisk RECO_QR01_CD_02_qr01cel03 successfully dropped

Y a
GridDisk RECO_QR01_CD_03_qr01cel03
b successfully dropped

m ar RECO_QR01_CD_04_qr01cel03
GridDisk
s f e ra successfully dropped

u k uGridDiskanRECO_QR01_CD_06_qr01cel03 successfully
GridDisk RECO_QR01_CD_05_qr01cel03 dropped

e n GridDisk
n - r
t RECO_QR01_CD_07_qr01cel03 successfully dropped
successfully
V no dropped
GridDisk RECO_QR01_CD_08_qr01cel03 successfully dropped
GridDisk RECO_QR01_CD_09_qr01cel03 successfully dropped
GridDisk RECO_QR01_CD_10_qr01cel03 successfully dropped
GridDisk RECO_QR01_CD_11_qr01cel03 successfully dropped

CellCLI>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 19
36. Create a new set of grid disks. Use the same grid disk prefix as before, but specify a size of
480 MB for each grid disk.
CellCLI> create griddisk all harddisk prefix=RECO_QR01, size=480M
GridDisk RECO_QR01_CD_00_qr01cel03 successfully created
GridDisk RECO_QR01_CD_01_qr01cel03 successfully created
GridDisk RECO_QR01_CD_02_qr01cel03 successfully created
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

GridDisk RECO_QR01_CD_03_qr01cel03 successfully created


GridDisk RECO_QR01_CD_04_qr01cel03 successfully created
GridDisk RECO_QR01_CD_05_qr01cel03 successfully created
GridDisk RECO_QR01_CD_06_qr01cel03 successfully created
GridDisk RECO_QR01_CD_07_qr01cel03 successfully created
GridDisk RECO_QR01_CD_08_qr01cel03 successfully created
GridDisk RECO_QR01_CD_09_qr01cel03 successfully created
GridDisk RECO_QR01_CD_10_qr01cel03 successfully created
GridDisk RECO_QR01_CD_11_qr01cel03 successfully created
a
CellCLI> ) has
37. Exit your CellCLI session. ฺ c om ฺ
CellCLI> exit i rco uide
a l li@ nt G
av tude
quitting
a d
[celladmin@qr01cel03 ~]$ a rฺy his S
k um addsethetreconfigured grid disks on
38. Back in your ASM administrator SQL session,
u
qr01cel03 back into the RECO_QR01 en diskt o u (use the SQL script
group
( v
v a lli ense if you prefer).
/home/oracle/labs/lab06-02-38.sql

d a e licreco_qr01 add disk


SQL> alter diskgroup
a
r Y a b l
2 'o/192.168.1.105/RECO_QR01_CD_00_qr01cel03',

u m s er
3 a 'o/192.168.1.105/RECO_QR01_CD_01_qr01cel03',
f
an
nuk n4-tr'o/192.168.1.105/RECO_QR01_CD_02_qr01cel03',
e
V no 5 'o/192.168.1.105/RECO_QR01_CD_03_qr01cel03',
6 'o/192.168.1.105/RECO_QR01_CD_04_qr01cel03',
7 'o/192.168.1.105/RECO_QR01_CD_05_qr01cel03',
8 'o/192.168.1.105/RECO_QR01_CD_06_qr01cel03',
9 'o/192.168.1.105/RECO_QR01_CD_07_qr01cel03',
10 'o/192.168.1.105/RECO_QR01_CD_08_qr01cel03',
11 'o/192.168.1.105/RECO_QR01_CD_09_qr01cel03',
12 'o/192.168.1.105/RECO_QR01_CD_10_qr01cel03',
13 'o/192.168.1.105/RECO_QR01_CD_11_qr01cel03'
14 rebalance power 11;

Diskgroup altered.

SQL>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 20
39. Monitor the rebalance operation as before.
SQL> select * from gv$asm_operation;

INST_ID GROUP_NUMBER OPERA STAT POWER ACTUAL SOFAR EST_WORK


---------- ------------ ----- ---- ---------- ---------- ---------- ----------
EST_RATE EST_MINUTES ERROR_CODE
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

---------- ----------- --------------------------------------------


1 3 REBAL RUN 11 11 70 176
152 0

SQL>
40. Periodically repeat the query to monitor the rebalance operation. When the query returns no
results the rebalance operation is completed. Do not proceed to the next step until the
rebalance operation completes. a
SQL> select * from gv$asm_operation; ) has
ฺ c om ฺ
no rows selected
i rco uide
a l li@ nt G
SQL>
a d av tude
a ฺy /home/oracle/labs/lab06-02-
41. Re-execute the query from step 4 (use the SQL rscript
i s S
u m et
04.sql if you prefer). Now the storage associated h
with the RECO_QR01 disk group has
been reconfigured on all three cells. u
n k us
e t o
a l i (v nsd.total_mb,
SQL> select dg.name, count(*),
emax(d.free_mb) MAX_FREE_MB
lMIN_FREE_MB,
2 min(d.free_mb)
v c e
a da led,liv$asm_diskgroup
3 from v$asm_disk dg

r
4 where
a Y r a b
dg.group_number=d.group_number and d.mount_status='CACHED'

u m s
5 group by
n fedg.name, d.total_mb;
k
nu NAME tra
e n -
V no------------------------------ ---------- COUNT(*) TOTAL_MB MIN_FREE_MB MAX_FREE_MB
---------- ----------- -----------
DBFS_DG 36 160 80 136
DATA_QR01 36 592 268 344
RECO_QR01 36 480 432 460

SQL>

In the final part of this practice, the free space created by reconfiguring the RECO_QR01 disk
group will be provisioned into another set of grid disks.
42. Launch the Exadata cell command-line interface (CellCLI) on qr01cel01.
[celladmin@qr01cel01 ~]$ cellcli
CellCLI: Release 11.2.3.2.1 – Production...

CellCLI>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 21
43. Use the following CellCLI command to show the free space on each cell disk.
CellCLI> list celldisk attributes name, freeSpace where freeSpace != 0
CD_00_qr01cel01 320M
CD_01_qr01cel01 320M
CD_02_qr01cel01 320M
CD_03_qr01cel01 320M
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

CD_04_qr01cel01 320M
CD_05_qr01cel01 320M
CD_06_qr01cel01 320M
CD_07_qr01cel01 320M
CD_08_qr01cel01 320M
CD_09_qr01cel01 320M
CD_10_qr01cel01 320M
CD_11_qr01cel01 320M
a
CellCLI>
) has
44. Create a set of grid disks which consume all of the available free space. Specifym
prefix=DATA2_QR01. o ฺ co eฺ
CellCLI> create griddisk all harddisk prefix=DATA2_QR01 ir
c uid
@
lli nt G
v
GridDisk DATA2_QR01_CD_00_qr01cel01 successfully created a
GridDisk DATA2_QR01_CD_01_qr01cel01 successfully
a d a created
t u de
arฺy thiscreated
GridDisk DATA2_QR01_CD_02_qr01cel01 successfully
GridDisk DATA2_QR01_CD_03_qr01cel01m
S
ku successfully
successfully created

n
GridDisk DATA2_QR01_CD_04_qr01cel01u u se created
e o
(v se t successfully
GridDisk DATA2_QR01_CD_05_qr01cel01 created
l l
a iceni
GridDisk DATA2_QR01_CD_06_qr01cel01 successfully created
a v
ad ble l
GridDisk DATA2_QR01_CD_07_qr01cel01 successfully created
GridDiskY
r DATA2_QR01_CD_08_qr01cel01
er a
a DATA2_QR01_CD_09_qr01cel01
successfully created

u m
GridDisk
s f successfully created

n u k tran
GridDisk DATA2_QR01_CD_10_qr01cel01 successfully created

Ve non- GridDisk DATA2_QR01_CD_11_qr01cel01 successfully created

CellCLI>
45. Examine the newly created grid disks. Note that they are now ready to be consumed in an
ASM disk group.
CellCLI> list griddisk attributes name, size, ASMModeStatus -
> where name like 'DATA2.*'
DATA2_QR01_CD_00_qr01cel01 320M UNUSED
DATA2_QR01_CD_01_qr01cel01 320M UNUSED
DATA2_QR01_CD_02_qr01cel01 320M UNUSED
DATA2_QR01_CD_03_qr01cel01 320M UNUSED
DATA2_QR01_CD_04_qr01cel01 320M UNUSED
DATA2_QR01_CD_05_qr01cel01 320M UNUSED
DATA2_QR01_CD_06_qr01cel01 320M UNUSED
DATA2_QR01_CD_07_qr01cel01 320M UNUSED
DATA2_QR01_CD_08_qr01cel01 320M UNUSED
DATA2_QR01_CD_09_qr01cel01 320M UNUSED
DATA2_QR01_CD_10_qr01cel01 320M UNUSED

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 22
DATA2_QR01_CD_11_qr01cel01 320M UNUSED

CellCLI>
46. Exit your CellCLI session but keep your terminal session open.
CellCLI> exit
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

quitting

[celladmin@qr01cel01 ~]$
47. In step 44, a set of grid disks was created on qr01cel01. Use the following command to
create similar grid disks on qr01cel02 and qr01cel03.
[celladmin@qr01cel01 ~]$ dcli -c qr01cel02,qr01cel03 cellcli -e \
> create griddisk all harddisk prefix=DATA2_QR01
qr01cel02: GridDisk DATA2_QR01_CD_00_qr01cel02 successfully created
a
has
qr01cel02: GridDisk DATA2_QR01_CD_01_qr01cel02 successfully created

)
qr01cel02: GridDisk DATA2_QR01_CD_02_qr01cel02 successfully created

ฺ c om ฺ
qr01cel02: GridDisk DATA2_QR01_CD_03_qr01cel02 successfully created

rco uide
qr01cel02: GridDisk DATA2_QR01_CD_04_qr01cel02 successfully created
i
li@ nt G
qr01cel02: GridDisk DATA2_QR01_CD_05_qr01cel02 successfully created

a l
qr01cel02: GridDisk DATA2_QR01_CD_06_qr01cel02 successfully created

d av tude
qr01cel02: GridDisk DATA2_QR01_CD_07_qr01cel02 successfully created
a
rฺy his S
qr01cel02: GridDisk DATA2_QR01_CD_08_qr01cel02 successfully created
a
u k um se t
qr01cel02: GridDisk DATA2_QR01_CD_09_qr01cel02 successfully created

en e to u
qr01cel02: GridDisk DATA2_QR01_CD_10_qr01cel02 successfully created

( v
qr01cel02: GridDisk DATA2_QR01_CD_11_qr01cel02 successfully created

a lli ens
qr01cel03: GridDisk DATA2_QR01_CD_00_qr01cel03 successfully created
v
da le lic
qr01cel03: GridDisk DATA2_QR01_CD_01_qr01cel03 successfully created
a
r Y erab
qr01cel03: GridDisk DATA2_QR01_CD_02_qr01cel03 successfully created
a
m nsf
qr01cel03: GridDisk DATA2_QR01_CD_03_qr01cel03 successfully created

k u
nu n-tra
qr01cel03: GridDisk DATA2_QR01_CD_04_qr01cel03 successfully created

e
V no
qr01cel03: GridDisk DATA2_QR01_CD_05_qr01cel03 successfully created
qr01cel03: GridDisk DATA2_QR01_CD_06_qr01cel03 successfully created
qr01cel03: GridDisk DATA2_QR01_CD_07_qr01cel03 successfully created
qr01cel03: GridDisk DATA2_QR01_CD_08_qr01cel03 successfully created
qr01cel03: GridDisk DATA2_QR01_CD_09_qr01cel03 successfully created
qr01cel03: GridDisk DATA2_QR01_CD_10_qr01cel03 successfully created
qr01cel03: GridDisk DATA2_QR01_CD_11_qr01cel03 successfully created
[celladmin@qr01cel01 ~]$

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 23
48. Use the following command to verify the existence of the newly created grid disks on all
three cells.
[celladmin@qr01cel01 ~]$ dcli -c qr01cel01,qr01cel02,qr01cel03 "cellcli -e \
> list griddisk attributes name, size, ASMModeStatus \
> where name like \'DATA2.*\'"
qr01cel01: DATA2_QR01_CD_00_qr01cel01 320M UNUSED
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

qr01cel01: DATA2_QR01_CD_01_qr01cel01 320M UNUSED


qr01cel01: DATA2_QR01_CD_02_qr01cel01 320M UNUSED
qr01cel01: DATA2_QR01_CD_03_qr01cel01 320M UNUSED
qr01cel01: DATA2_QR01_CD_04_qr01cel01 320M UNUSED
qr01cel01: DATA2_QR01_CD_05_qr01cel01 320M UNUSED
qr01cel01: DATA2_QR01_CD_06_qr01cel01 320M UNUSED
qr01cel01: DATA2_QR01_CD_07_qr01cel01 320M UNUSED
qr01cel01: DATA2_QR01_CD_08_qr01cel01 320M UNUSED
qr01cel01: DATA2_QR01_CD_09_qr01cel01 320M UNUSED
a
qr01cel01: DATA2_QR01_CD_10_qr01cel01 320M UNUSED
) has
om ฺ
qr01cel01: DATA2_QR01_CD_11_qr01cel01 320M UNUSED
qr01cel02: DATA2_QR01_CD_00_qr01cel02 320M ฺ c
UNUSED
qr01cel02: DATA2_QR01_CD_01_qr01cel02 320M
i rco uide
UNUSED
qr01cel02: DATA2_QR01_CD_02_qr01cel02
a l li@ nt G
320M UNUSED

a d av tude
qr01cel02: DATA2_QR01_CD_03_qr01cel02 320M UNUSED

rฺy his S
qr01cel02: DATA2_QR01_CD_04_qr01cel02 320M UNUSED
a
qr01cel02: DATA2_QR01_CD_05_qr01cel02 320M UNUSED

u k um se t
qr01cel02: DATA2_QR01_CD_06_qr01cel02 320M UNUSED

( v en e to u
qr01cel02: DATA2_QR01_CD_07_qr01cel02 320M UNUSED

v a lli ens
qr01cel02: DATA2_QR01_CD_08_qr01cel02 320M UNUSED

da le lic
qr01cel02: DATA2_QR01_CD_09_qr01cel02 320M UNUSED

a
qr01cel02: DATA2_QR01_CD_10_qr01cel02 320M UNUSED

a r Y erab
qr01cel02: DATA2_QR01_CD_11_qr01cel02 320M UNUSED

k u m nsf
qr01cel03: DATA2_QR01_CD_00_qr01cel03 320M UNUSED

e nu n-traqr01cel03: DATA2_QR01_CD_01_qr01cel03 320M UNUSED


V no qr01cel03: DATA2_QR01_CD_02_qr01cel03
qr01cel03: DATA2_QR01_CD_03_qr01cel03
320M
320M
UNUSED
UNUSED
qr01cel03: DATA2_QR01_CD_04_qr01cel03 320M UNUSED
qr01cel03: DATA2_QR01_CD_05_qr01cel03 320M UNUSED
qr01cel03: DATA2_QR01_CD_06_qr01cel03 320M UNUSED
qr01cel03: DATA2_QR01_CD_07_qr01cel03 320M UNUSED
qr01cel03: DATA2_QR01_CD_08_qr01cel03 320M UNUSED
qr01cel03: DATA2_QR01_CD_09_qr01cel03 320M UNUSED
qr01cel03: DATA2_QR01_CD_10_qr01cel03 320M UNUSED
qr01cel03: DATA2_QR01_CD_11_qr01cel03 320M UNUSED
[celladmin@qr01cel01 ~]$
49. Exit your CellCLI and SQL*Plus sessions.

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 24
Practice 6-3: Consuming Grid Disks by Using ASM
Overview
In this practice, you consume some newly created Exadata grid disks using ASM.

Assumptions
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Before beginning this practice you must complete Practice 6-2. Your ability to complete this
practice depends on the existence of the grid disks that are created in practice 6-2.

Tasks
1. Establish a terminal connection to qr01db01 as the grid user.
2. By using SQL*Plus, connect to ASM as an ASM administrator.
[grid@qr01db01 ~]$ sqlplus / as sysasm
a
SQL*Plus: Release 11.2.0.3.0 Production...
) has
ฺ c om ฺ
SQL>
i rco uide
The ASM environment you are using is clustered across the entire lDatabase
a l i@ tMachine.
G All the
grid disks defined across all the Exadata cells are visible insidevASM. In the
agrid disks n
dinedifferent
previous practice
you configured some grid disks. Now you will consume those
y a d t u ways using
ASM. r ฺ
a this S
3. Execute the following query (or executekthe u mSQL e /home/oracle/labs/lab06-
03-03.sql). Note the capitalization n uinside theu sscript
string. The output shows a series of
( v e t o like

an ASM disk group and v a lli etonbeseconsumed


disks having HEADER_STATUS=CANDIDATE.
are ready
This indicates that the disks do not belong to
by ASM. Examine the PATH output. Can
d a l i cthat contains each grid
Y a ble
you determine the Exadata cell disk?
r name,
SQL>aselect
e ra header_status, path from v$asm_disk
m
u an s f
n u k 2 where
r
path like 'o/%/DATA2%'
3 tand header_status='CANDIDATE';
Ve non-
NAME HEADER_STATU
------------------------------ ------------
PATH
------------------------------------------------------------------------------
CANDIDATE
o/192.168.1.105/DATA2_QR01_CD_07_qr01cel03

CANDIDATE
o/192.168.1.103/DATA2_QR01_CD_07_qr01cel01

CANDIDATE
o/192.168.1.105/DATA2_QR01_CD_02_qr01cel03

CANDIDATE
o/192.168.1.105/DATA2_QR01_CD_00_qr01cel03

CANDIDATE

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 25
o/192.168.1.105/DATA2_QR01_CD_08_qr01cel03

CANDIDATE
o/192.168.1.105/DATA2_QR01_CD_06_qr01cel03

CANDIDATE
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

NAME HEADER_STATU
------------------------------ ------------
PATH
------------------------------------------------------------------------------
o/192.168.1.105/DATA2_QR01_CD_10_qr01cel03

CANDIDATE
o/192.168.1.105/DATA2_QR01_CD_09_qr01cel03
a
CANDIDATE ) has
o/192.168.1.105/DATA2_QR01_CD_03_qr01cel03
ฺ c om ฺ
i rco uide
CANDIDATE
a l li@ nt G
av tude
o/192.168.1.105/DATA2_QR01_CD_05_qr01cel03

a d
a
CANDIDATErฺy his S
u k um se t
o/192.168.1.105/DATA2_QR01_CD_01_qr01cel03

t o u
en CANDIDATE
( v
a lli ense
o/192.168.1.105/DATA2_QR01_CD_04_qr01cel03
v
a da le lic CANDIDATE
a r Y erab
k u m nsf
o/192.168.1.104/DATA2_QR01_CD_09_qr01cel02

e nu NAME
n - tra
V no------------------------------ HEADER_STATU
------------
PATH
------------------------------------------------------------------------------

CANDIDATE
o/192.168.1.104/DATA2_QR01_CD_06_qr01cel02

CANDIDATE
o/192.168.1.104/DATA2_QR01_CD_07_qr01cel02

CANDIDATE
o/192.168.1.104/DATA2_QR01_CD_11_qr01cel02

CANDIDATE
o/192.168.1.104/DATA2_QR01_CD_08_qr01cel02

CANDIDATE
o/192.168.1.104/DATA2_QR01_CD_01_qr01cel02
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 26
CANDIDATE
o/192.168.1.104/DATA2_QR01_CD_10_qr01cel02

NAME HEADER_STATU
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

------------------------------ ------------
PATH
------------------------------------------------------------------------------
CANDIDATE
o/192.168.1.104/DATA2_QR01_CD_03_qr01cel02

CANDIDATE
o/192.168.1.104/DATA2_QR01_CD_00_qr01cel02

a
has
CANDIDATE
o/192.168.1.104/DATA2_QR01_CD_04_qr01cel02 )
ฺ c om ฺ
CANDIDATE
i rco uide
o/192.168.1.104/DATA2_QR01_CD_02_qr01cel02
a l li@ nt G
CANDIDATE
a d av tude
a rฺy his S
o/192.168.1.104/DATA2_QR01_CD_05_qr01cel02

u um
CANDIDATEse
k t
( v en e to u
o/192.168.1.103/DATA2_QR01_CD_03_qr01cel01

v a lli ens
a da le lic CANDIDATE
NAMEa
r Y erab
u m s f HEADER_STATU

n u k tran
------------------------------ ------------

Ve noPATHn-
------------------------------------------------------------------------------
o/192.168.1.103/DATA2_QR01_CD_09_qr01cel01

CANDIDATE
o/192.168.1.103/DATA2_QR01_CD_08_qr01cel01

CANDIDATE
o/192.168.1.103/DATA2_QR01_CD_05_qr01cel01

CANDIDATE
o/192.168.1.103/DATA2_QR01_CD_06_qr01cel01

CANDIDATE
o/192.168.1.103/DATA2_QR01_CD_11_qr01cel01

CANDIDATE
o/192.168.1.103/DATA2_QR01_CD_04_qr01cel01

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 27
CANDIDATE
o/192.168.1.103/DATA2_QR01_CD_02_qr01cel01

NAME HEADER_STATU
------------------------------ ------------
PATH
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

------------------------------------------------------------------------------

CANDIDATE
o/192.168.1.103/DATA2_QR01_CD_10_qr01cel01

CANDIDATE
o/192.168.1.103/DATA2_QR01_CD_00_qr01cel01

CANDIDATE
a
has
o/192.168.1.103/DATA2_QR01_CD_01_qr01cel01
)
CANDIDATE
ฺ c om ฺ
o/192.168.1.105/DATA2_QR01_CD_11_qr01cel03
i rco uide
a l li@ nt G
36 rows selected.
a d av tude
a rฺy his S
SQL>
u k um se t
Exadata grid disks are consumed insidenASM in twouways. You can add disks to an existing
e ASM
ASM disk group or you can create(avnew e o group based on Exadata grid disks.
tdisk
a i
ll in theenoutput
s to step 3 and add it to the existing RECO disk
4. Select one of the disksvlisted
c
adascriptbl/home/oracle/labs/lab06-03-04.sql
group (use the SQL
Y e li if you prefer). Use
the PATHaofr your selected
ra disk to identify it in the ADD DISK clause.
m s f e
n u kuSQL>tralter
a n diskgroup reco_qr01
Ve non23- add disk 'o/192.168.1.103/DATA2_QR01_CD_00_qr01cel01'
rebalance power 0;

Diskgroup altered.

SQL>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 28
5. Verify that the disk is added to your disk group using the following query (or execute the
SQL script /home/oracle/labs/lab06-03-05.sql).
SQL> select dg.name GNAME, d.name DNAME, d.header_status, d.path
2 from v$asm_disk d left outer join
3 (select * from v$asm_diskgroup where group_number != 0) dg
4 on d.group_number = dg.group_number
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

5 where dg.name is not null and d.path like 'o/%/DATA2%';

GNAME DNAME HEADER_STATU


------------------------------ ------------------------------ ------------
PATH
------------------------------------------------------------------------------
RECO_QR01 DATA2_QR01_CD_00_QR01CEL01 MEMBER
o/192.168.1.103/DATA2_QR01_CD_00_qr01cel01
a
) h as
SQL>
m
cocommand
6. Remove the recently added disk from your disk group using the followingoSQL ฺ ฺ
(or execute the SQL script /home/oracle/labs/lab06-03-06.sql). i i deuse
rc Noteuthe of
l i @ G
a val is dcompletely
WAIT to ensure that the statement does not return until the disk
the disk group and the associated rebalance operationdcompletes. It e
nt removed from
may take a few
minutes for the command to complete.
r ฺ y a S tu
m a this
SQL> alter diskgroup reco_qr01
u u
k use
v n
2 drop disk DATA2_QR01_CD_00_QR01CEL01
e11 wait;
to
3 rebalance power i (
ll ens e
v a
a e lic
Diskgroupad l
r
a sferY a b
altered.

u m
n uk SQL> - t r an
e
V7. Create na new ASM disk group consuming all the grid disks created in the previous practice
nothe
(use SQL script /home/oracle/labs/lab06-03-07.sql if you prefer).
SQL> create diskgroup data2_qr01 normal redundancy
2 disk 'o/*/DATA2_QR01*'
3 attribute 'compatible.rdbms' = '11.2.0.0.0',
4 'compatible.asm' = '11.2.0.0.0',
5 'cell.smart_scan_capable' = 'TRUE',
6 'au_size' = '4M';

Diskgroup created.

SQL>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 29
The newly created disk group can be used to house Oracle data files in the same way as
an ASM disk group based on any other storage. To complement the recommended
AU_SIZE setting of 4 MB, you should set the initial extent size to 8 MB for large segments.
The recommended approaches are discussed in the lesson entitled Optimizing Database
Performance with Exadata.
8. Examine your newly created disk group using the following query (or execute the SQL
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

script /home/oracle/labs/lab06-03-08.sql). Note how the grid disks from each


different Exadata cell are automatically grouped into separate failure groups.
SQL> select d.path, dg.name GNAME, d.failgroup, d.state
2 from v$asm_disk d, v$asm_diskgroup dg
3 where d.group_number = dg.group_number
4 and dg.name = 'DATA2_QR01';

PATH
------------------------------------------------------------------------------
a
GNAME FAILGROUP STATE
) has
om ฺ
------------------------------ ------------------------------ --------
o/192.168.1.105/DATA2_QR01_CD_07_qr01cel03
ฺ c
DATA2_QR01 QR01CEL03
i rco uide
NORMAL

a l li@ nt G
o/192.168.1.105/DATA2_QR01_CD_11_qr01cel03
a d av tude NORMAL
rฺy his S
DATA2_QR01 QR01CEL03
a
k um se t
o/192.168.1.105/DATA2_QR01_CD_02_qr01cel03
u
DATA2_QR01
e n o u
QR01CEL03
t
NORMAL

a l li (v ense
v lic QR01CEL03
o/192.168.1.105/DATA2_QR01_CD_00_qr01cel03
DATA2_QR01 da
Y a ble NORMAL

m ar sfera
kuDATA2_QR01
o/192.168.1.105/DATA2_QR01_CD_08_qr01cel03

n u - t r an QR01CEL03 NORMAL
e n
V noo/192.168.1.105/DATA2_QR01_CD_06_qr01cel03
DATA2_QR01 QR01CEL03 NORMAL

o/192.168.1.105/DATA2_QR01_CD_10_qr01cel03

PATH
------------------------------------------------------------------------------
GNAME FAILGROUP STATE
------------------------------ ------------------------------ --------
DATA2_QR01 QR01CEL03 NORMAL

o/192.168.1.105/DATA2_QR01_CD_09_qr01cel03
DATA2_QR01 QR01CEL03 NORMAL

o/192.168.1.103/DATA2_QR01_CD_03_qr01cel01
DATA2_QR01 QR01CEL01 NORMAL

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 30
o/192.168.1.103/DATA2_QR01_CD_09_qr01cel01
DATA2_QR01 QR01CEL01 NORMAL

o/192.168.1.103/DATA2_QR01_CD_08_qr01cel01
DATA2_QR01 QR01CEL01 NORMAL
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

o/192.168.1.103/DATA2_QR01_CD_05_qr01cel01
DATA2_QR01 QR01CEL01 NORMAL

o/192.168.1.103/DATA2_QR01_CD_06_qr01cel01
DATA2_QR01 QR01CEL01 NORMAL

PATH
------------------------------------------------------------------------------
GNAME FAILGROUP STATE
a
has
------------------------------ ------------------------------ --------
)
o/192.168.1.103/DATA2_QR01_CD_11_qr01cel01
ฺ c om ฺ
DATA2_QR01 QR01CEL01
i rcoNORMAL
u ide
@
lli nt G
o/192.168.1.103/DATA2_QR01_CD_04_qr01cel01
v a
a tude NORMAL
DATA2_QR01 QR01CEL01
a d
a rฺy his S
u um
o/192.168.1.103/DATA2_QR01_CD_02_qr01cel01
QR01CEL01se
k t
DATA2_QR01
e n o u NORMAL

l l i (v se t
a v a icen QR01CEL01
o/192.168.1.103/DATA2_QR01_CD_10_qr01cel01
DATA2_QR01
a d le l NORMAL

a r Y erab
k u m nsf
o/192.168.1.103/DATA2_QR01_CD_00_qr01cel01

n u t r a
DATA2_QR01 QR01CEL01 NORMAL

n-
Ve noo/192.168.1.103/DATA2_QR01_CD_01_qr01cel01
DATA2_QR01 QR01CEL01 NORMAL

PATH
------------------------------------------------------------------------------
GNAME FAILGROUP STATE
------------------------------ ------------------------------ --------
o/192.168.1.103/DATA2_QR01_CD_07_qr01cel01
DATA2_QR01 QR01CEL01 NORMAL

o/192.168.1.105/DATA2_QR01_CD_03_qr01cel03
DATA2_QR01 QR01CEL03 NORMAL

o/192.168.1.105/DATA2_QR01_CD_05_qr01cel03
DATA2_QR01 QR01CEL03 NORMAL

o/192.168.1.105/DATA2_QR01_CD_01_qr01cel03
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 31
DATA2_QR01 QR01CEL03 NORMAL

o/192.168.1.105/DATA2_QR01_CD_04_qr01cel03
DATA2_QR01 QR01CEL03 NORMAL

o/192.168.1.104/DATA2_QR01_CD_09_qr01cel02
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

DATA2_QR01 QR01CEL02 NORMAL

o/192.168.1.104/DATA2_QR01_CD_06_qr01cel02

PATH
------------------------------------------------------------------------------
GNAME FAILGROUP STATE
------------------------------ ------------------------------ --------
DATA2_QR01 QR01CEL02 NORMAL
a
o/192.168.1.104/DATA2_QR01_CD_07_qr01cel02 ) has
DATA2_QR01 QR01CEL02
c om ฺ
NORMAL

i rco uide
o/192.168.1.104/DATA2_QR01_CD_11_qr01cel02
a l li@ ntNORMAL
G
DATA2_QR01 QR01CEL02
d v
a tude
a
rฺy his S
a
o/192.168.1.104/DATA2_QR01_CD_08_qr01cel02
m et
DATA2_QR01
k u
QR01CEL02
u o us
NORMAL

e n t
l l i (v sQR01CEL02
e
o/192.168.1.104/DATA2_QR01_CD_01_qr01cel02
DATA2_QR01
v a c e n NORMAL

Y ada ble li
ar sfera
o/192.168.1.104/DATA2_QR01_CD_10_qr01cel02

u m
DATA2_QR01 QR01CEL02 NORMAL

- t r an
nuk o/192.168.1.104/DATA2_QR01_CD_03_qr01cel02
e n
V noDATA2_QR01 QR01CEL02 NORMAL

PATH
------------------------------------------------------------------------------
GNAME FAILGROUP STATE
------------------------------ ------------------------------ --------

o/192.168.1.104/DATA2_QR01_CD_00_qr01cel02
DATA2_QR01 QR01CEL02 NORMAL

o/192.168.1.104/DATA2_QR01_CD_04_qr01cel02
DATA2_QR01 QR01CEL02 NORMAL

o/192.168.1.104/DATA2_QR01_CD_02_qr01cel02
DATA2_QR01 QR01CEL02 NORMAL

o/192.168.1.104/DATA2_QR01_CD_05_qr01cel02
DATA2_QR01 QR01CEL02 NORMAL
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 32
36 rows selected.

SQL>
9. Drop the disk group you created in step 7.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

SQL> drop diskgroup data2_qr01;

Diskgroup dropped.

SQL>
10. Exit your SQL*Plus session.

a
) has
ฺ c om ฺ
i rco uide
a l li@ nt G
a d av tude
a rฺy his S
u k um se t
( v en e to u
v a lli ens
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 33
Practice 6-4: Configuring Exadata Storage Security
Overview
In this practice, you configure Exadata storage security.

Assumptions
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Before beginning this practice you must complete Practice 6-2. Your ability to complete this
practice depends on the existence of the grid disks that are created in practice 6-2.

Tasks
Exadata storage security has two modes; ASM-scoped security and database-scoped security.
ASM-scoped security must be implemented before database-scoped security can be
configured. In the first part of this practice, you will configure ASM-scoped security across your
lab environment.
a
has
1. Establish a terminal connection to qr01db01 as the grid user.
2. Using SQL*Plus, connect to ASM as an ASM administrator. )
[grid@qr01db01 ~]$ sqlplus / as sysasm ฺ c om ฺ
i rco uide
SQL*Plus: Release 11.2.0.3.0 Production... a l li@ nt G
a d av tude
SQL>
a rฺy his S
u um
3. Note the DB_UNIQUE_NAME setting forkthe e t
ASM environment
s and then exit SQL*Plus.
SQL> show parameter vunique n
e e to u
i (
ll ens
v a
NAME
a da le lic TYPE VALUE

a r Y r ab
------------------------------------ ----------- -------------
m ns f e
udb_unique_name string +ASM
u k r a
n SQL> n-t exit from Oracle Database 11g Enterprise Edition Release
Ve noDisconnected
11.2.0.3.0 - 64bit Production...
[oracle@qr01db01 ~]$
4. Use the su command to assume the privileges of the root user. Enter oracle when
prompted for the password.
[grid@qr01db01 ~]$ su
Password: <oracle>
[root@qr01db01 grid]#
5. Shut down the Oracle Database, ASM, and Grid Infrastructure. Note that on a Database
Machine, you would need to perform this step on every server in the ASM cluster.
[root@qr01db01 grid]# crsctl stop crs
CRS-2791: Starting shutdown of Oracle High Availability Services-managed
resources on 'qr01db01'
CRS-2673: Attempting to stop 'ora.crsd' on 'qr01db01'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on
'qr01db01'
CRS-2673: Attempting to stop 'ora.oc4j' on 'qr01db01'
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 34
CRS-2673: Attempting to stop 'ora.qr01db02.vip' on 'qr01db01'
...
CRS-2673: Attempting to stop 'ora.net1.network' on 'qr01db01'
CRS-2677: Stop of 'ora.net1.network' on 'qr01db01' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'qr01db01'
has completed
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

CRS-2677: Stop of 'ora.crsd' on 'qr01db01' succeeded


CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'qr01db01'
...
CRS-2677: Stop of 'ora.diskmon' on 'qr01db01' succeeded
CRS-2677: Stop of 'ora.gpnpd' on 'qr01db01' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on
'qr01db01' has completed
CRS-4133: Oracle High Availability Services has been stopped.
[root@qr01db01 grid]#
a
has
6. Exit the root user session.
[root@qr01db01 grid]# exit )
exit ฺ c om ฺ
[grid@qr01db01 ~]$ i rco uide
a l li@terminal
7. Leave the current terminal session active and establish a separate n t Gconnection to
the qr01cel01 Exadata cell as the celladmin user.da
v de
a
ฺy is S t u
8. Launch the Exadata cell command-line interfacer(CellCLI).
a
m e th
k u
us
[celladmin@qr01cel01 ~]$ cellcli
e n u –oProduction...
CellCLI: Release 11.2.3.2.1
t
a l li (v ense
CellCLI>
d a v lic
Y a KEY command
b le to generate a random hexadecimal key string. Then exit
r
9. Use the CREATE
a sfer a
m
CellCLI.
u
nuk CellCLI>
- t r an create key
e
V non aecacf517c96683eb33eaff589a59818
CellCLI> exit
quitting

[celladmin@qr01cel01 ~]$
10. Use the ASSIGN KEY command to assign the security key generated in step 9 to the
Oracle ASM cluster on all the cells that you want the Oracle ASM cluster to access. Use the
DB_UNIQUE_NAME observed earlier. Note that this is case-sensitive.
[celladmin@qr01cel01 ~]$ dcli -c qr01cel01,qr01cel02,qr01cel03 "cellcli -e \
> assign key for +ASM=\'aecacf517c96683eb33eaff589a59818\'"
qr01cel01: Key for +ASM successfully created
qr01cel02: Key for +ASM successfully created
qr01cel03: Key for +ASM successfully created
[celladmin@qr01cel01 ~]$

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 35
11. Use the CREATE GRIDDISK or ALTER GRIDDISK command to configure security on the
grid disks you want the Oracle ASM cluster to access. Set the Oracle ASM
DB_UNIQUE_NAME in the availableTo attribute of each grid disk.
[celladmin@qr01cel01 ~]$ dcli -c qr01cel01,qr01cel02,qr01cel03 "cellcli -e \
> alter griddisk all availableTo=\'+ASM\'"
qr01cel01: GridDisk DATA2_QR01_CD_00_qr01cel01 successfully altered
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

qr01cel01: GridDisk DATA2_QR01_CD_01_qr01cel01 successfully altered


qr01cel01: GridDisk DATA2_QR01_CD_02_qr01cel01 successfully altered
qr01cel01: GridDisk DATA2_QR01_CD_03_qr01cel01 successfully altered
qr01cel01: GridDisk DATA2_QR01_CD_04_qr01cel01 successfully altered
...
qr01cel03: GridDisk RECO_QR01_CD_07_qr01cel03 successfully altered
qr01cel03: GridDisk RECO_QR01_CD_08_qr01cel03 successfully altered
qr01cel03: GridDisk RECO_QR01_CD_09_qr01cel03 successfully altered
qr01cel03: GridDisk RECO_QR01_CD_10_qr01cel03 successfully altered
a
qr01cel03: GridDisk RECO_QR01_CD_11_qr01cel03 successfully altered
) has
[celladmin@qr01cel01 ~]$
m
12. Return to your grid user session on qr01db01 and change directory to ฺco
/etc/oracle/cell/network-config. i rco uideฺ
a l li@ nt G
av tude
[grid@qr01db01 ~]$ cd /etc/oracle/cell/network-config
[grid@qr01db01 network-config]$ a d
rฺy from
13. Create a cellkey.ora file containing the keyavalue
h i s S
step 9 and the
DB_UNIQUE_NAME for the ASM cluster.ku
m et
n u s
ucat
( v e
[grid@qr01db01 network-config]$
e t o << END > cellkey.ora
a i
ll ens
> key=aecacf517c96683eb33eaff589a59818
> asm=+ASMda
v lic
> ENDr Y
a l e
a f e r ab
k m ns
u[grid@qr01db01 network-config]$
u
n n-the r a
t contents of the cellkey.ora file.
Ve14. Confirm
o
n [grid@qr01db01 network-config]$ cat cellkey.ora
key=aecacf517c96683eb33eaff589a59818
asm=+ASM
[grid@qr01db01 network-config]$
15. Set the file permissions and verify the settings. Note that on a Database Machine you would
need to configure the cellkey.ora file on every server in the ASM cluster.
[grid@qr01db01 network-config]# chown grid:asmadmin cellkey.ora
[grid@qr01db01 network-config]$ chmod 640 cellkey.ora
[grid@qr01db01 network-config]$ ls -l cellkey.ora
-rw-r----- 1 grid asmadmin 46 Jul 17 20:50 cellkey.ora
[grid@qr01db01 network-config]$

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 36
16. Use the su command to assume the privileges of the root user. Enter oracle when
prompted for the password.
[grid@qr01db01 network-config]$ su
Password: <oracle>
[root@qr01db01 network-config]#
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

17. Restart the Oracle Database, ASM and Grid Infrastructure. Note that on a Database
Machine you would need to perform this step on every server in the ASM cluster.
[root@qr01db01 network-config]# crsctl start crs
CRS-4123: Oracle High Availability Services has been started.
[root@qr01db01 network-config]#
18. Verify that all the Oracle cluster resources restart using the following command. Note that
you may receive an error message indicating a failure to communicate with a cluster
service if you execute the command while the cluster is restarting. You can safely ignore
a
has
the error message and re-execute the command until all the resources start. Do not
proceed to the next step before all the cluster resources restart.
)
[root@qr01db01 network-config]# crsctl stat res -w "TARGET = ONLINE"
ฺ c om-t ฺ
o ide
rcSTATE_DETAILS
------------------------------------------------------------------------------
i
NAME TARGET STATE SERVER
l l i @ t Gu
d a va den
------------------------------------------------------------------------------
Local Resources
r ฺ y a S tu
a this
------------------------------------------------------------------------------
m
ora.DATA_QR01.dg
ONLINE ONLINEuk
u se
n
e e to u
qr01db01
ora.DBFS_DG.dg
i ( v
a ll ONLINE
ONLINE
v e ns qr01db01
c
adaONLINE li
ora.LISTENER.lsnr
Y l e
b ONLINE
a r r a qr01db01

k u m nsfe ONLINE ONLINE


ora.RECO_QR01.dg

n u t r a qr01db01

n-
Ve noora.asm ONLINE ONLINE qr01db01 Started
ora.net1.network
ONLINE ONLINE qr01db01
ora.ons
ONLINE ONLINE qr01db01
------------------------------------------------------------------------------
Cluster Resources
------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE qr01db01
ora.LISTENER_SCAN2.lsnr
1 ONLINE ONLINE qr01db01
ora.LISTENER_SCAN3.lsnr
1 ONLINE ONLINE qr01db01
ora.cvu
1 ONLINE ONLINE qr01db01
ora.dbm.db
1 ONLINE ONLINE qr01db01 Open
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 37
2 ONLINE OFFLINE
ora.oc4j
1 ONLINE ONLINE qr01db01
ora.qr01db01.vip
1 ONLINE ONLINE qr01db01
ora.qr01db02.vip
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

1 ONLINE INTERMEDIATE qr01db01 FAILED OVER


ora.scan1.vip
1 ONLINE ONLINE qr01db01
ora.scan2.vip
1 ONLINE ONLINE qr01db01
ora.scan3.vip
1 ONLINE ONLINE qr01db01

[root@qr01db01 network-config]#
a
19. Exit the root user session and change back to the grid user home directory.
) h as
[root@qr01db01 network-config]# exit
ฺ c om ฺ
exit
i rco uide
[grid@qr01db01 network-config]$ cd
a l li@ nt G
[grid@qr01db01 ~]$
d a v de
ASM-scoped security is now configured. The fact that ASM
r ฺ y a tu Database restarted
and Oracle
S
shows that the ASM environment can access the grid
m is
a disksthconfigured on the Exadata storage.
To further prove this is the case, you will now
u u
k us
create a e
disk group on some of the grid disks.

v n
20. Using SQL*Plus, connect to ASMeas an ASM to administrator.
i (
ll sqlplus e
[grid@qr01db01 ~]$
v a c e ns / as sysasm
a da le li
SQL*Plus:
a Y
r Release r ab 11.2.0.3.0 Production...
um ans f e
u k
n SQL> tr
e
V21. Create n -
no a new ASM disk group consuming the grid disks created in a previous practice (use
the SQL script /home/oracle/labs/lab06-04-21.sql if you prefer).
SQL> create diskgroup data2_qr01_asm_sec normal redundancy
2 disk 'o/*/DATA2_QR01*'
3 attribute 'compatible.rdbms' = '11.2.0.0.0',
4 'compatible.asm' = '11.2.0.0.0',
5 'cell.smart_scan_capable' = 'TRUE',
6 'au_size' = '4M';

Diskgroup created.

SQL>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 38
22. Drop the newly created disk group and exit SQL*Plus.
SQL> drop diskgroup data2_qr01_asm_sec;

Diskgroup dropped.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release
11.2.0.3.0 - 64bit Production...
[grid@qr01db01 ~]$
As expected, the ASM cluster is able to access the Exadata storage using ASM-scoped
security. Now imagine that another ASM cluster is configured and some of the grid disks are
assigned to it. In the next part of this practice you will reconfigure the Exadata storage and see
the effect.
a
has
23. Leave the current terminal session active and establish a separate terminal connection to
the qr01cel01 Exadata cell as the celladmin user. )
24. Launch the Exadata cell command-line interface (CellCLI).
ฺ c om ฺ
[celladmin@qr01cel01 ~]$ cellcli i rco uide
CellCLI: Release 11.2.3.2.1 – Production...lli@ t G
v a
a tude n
a d
CellCLI>
a rฺy his S
25. Use the CREATE KEY command to generate
u k umanother
s e trandom hexadecimal key string. Then
exit CellCLI.
v e n to u
CellCLI> create lkey (
li ense
v a
a e lic
4b03b5b2b54c871de54784b8064dabdd
a d
exit bl
CellCLI>
r Y
a sfera
m
quitting
ku tran
n u
n-
Ve no[celladmin@qr01cel01 ~]$
26. Use the ASSIGN KEY command to assign the security key generated in step 25 to another
Oracle ASM cluster called +ASM2.
[celladmin@qr01cel01 ~]$ dcli -c qr01cel01,qr01cel02,qr01cel03 "cellcli -e \
> assign key for +ASM2=\'4b03b5b2b54c871de54784b8064dabdd\'"
qr01cel01: Key for +ASM2 successfully created
qr01cel02: Key for +ASM2 successfully created
qr01cel03: Key for +ASM2 successfully created
[celladmin@qr01cel01 ~]$
27. Confirm the key assignment. Note that each cell now has two key assignments for different
ASM clusters.
[celladmin@qr01cel01 ~]$ dcli -c qr01cel01,qr01cel02,qr01cel03 cellcli -e \
> list key
qr01cel01: +ASM aecacf517c96683eb33eaff589a59818
qr01cel01: +ASM2 4b03b5b2b54c871de54784b8064dabdd
qr01cel02: +ASM aecacf517c96683eb33eaff589a59818
qr01cel02: +ASM2 4b03b5b2b54c871de54784b8064dabdd

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 39
qr01cel03: +ASM aecacf517c96683eb33eaff589a59818
qr01cel03: +ASM2 4b03b5b2b54c871de54784b8064dabdd
[celladmin@qr01cel01 ~]$

28. Drop the grid disks having prefix=DATA2_QR01.


[celladmin@qr01cel01 ~]$ dcli -c qr01cel01,qr01cel02,qr01cel03 cellcli -e \
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

> drop griddisk all prefix=DATA2_QR01


qr01cel01: GridDisk DATA2_QR01_CD_00_qr01cel01 successfully dropped
qr01cel01: GridDisk DATA2_QR01_CD_01_qr01cel01 successfully dropped
qr01cel01: GridDisk DATA2_QR01_CD_02_qr01cel01 successfully dropped
qr01cel01: GridDisk DATA2_QR01_CD_03_qr01cel01 successfully dropped
qr01cel01: GridDisk DATA2_QR01_CD_04_qr01cel01 successfully dropped
...
qr01cel03: GridDisk DATA2_QR01_CD_07_qr01cel03 successfully dropped
qr01cel03: GridDisk DATA2_QR01_CD_08_qr01cel03 successfully dropped
a
has
qr01cel03: GridDisk DATA2_QR01_CD_09_qr01cel03 successfully dropped
qr01cel03: GridDisk DATA2_QR01_CD_10_qr01cel03 successfully dropped
)
qr01cel03: GridDisk DATA2_QR01_CD_11_qr01cel03 successfully dropped
ฺ c om ฺ
co
[celladmin@qr01cel01 ~]$

29. Create a new set of grid disks with the availableTo attribute set toir+ASM2. uid
e
@
lli nt G
v a
[celladmin@qr01cel01 ~]$ dcli -c qr01cel01,qr01cel02,qr01cel03
a e "cellcli -e \
> create griddisk all harddisk prefix=DATA2_QR01, d d
tu created
a successfully
availableTo=\'+ASM2\'"
qr01cel01: GridDisk DATA2_QR01_CD_00_qr01cel01 r ฺ y is S
a thsuccessfully
u m
qr01cel01: GridDisk DATA2_QR01_CD_01_qr01cel01
k e created

n u
qr01cel01: GridDisk DATA2_QR01_CD_02_qr01cel01u s successfully created
( e
v se t o
l l i
qr01cel01: GridDisk DATA2_QR01_CD_03_qr01cel01 successfully created
qr01cel01: GridDisk
a v l i c en
a DATA2_QR01_CD_04_qr01cel01 successfully created
... d leDATA2_QR01_CD_07_qr01cel03 successfully created
aGridDisk
Y
r GridDisk
qr01cel03:
a r ab DATA2_QR01_CD_08_qr01cel03 successfully created
f e
m nsGridDisk DATA2_QR01_CD_09_qr01cel03 successfully created
qr01cel03:
uqr01cel03:
u k
n qr01cel03: tra GridDisk DATA2_QR01_CD_10_qr01cel03 successfully created
e n -
V noqr01cel03: GridDisk DATA2_QR01_CD_11_qr01cel03 successfully created
[celladmin@qr01cel01 ~]$

Note that the ALTER GRIDDISK command could have been used instead of dropping and
recreating the grid disks. However, the ALTER GRIDDISK command can only be run
against all the grid disks (regardless of prefix) or it can be used to modify an individual grid
disk. Hence, using the ALTER GRIDDISK command in this case would require 36 separate
commands (or equivalent scripting).
30. Confirm the availableTo attribute setting for all the grid disks.
[celladmin@qr01cel01 ~]$ dcli -c qr01cel01,qr01cel02,qr01cel03 cellcli -e \
> list griddisk attributes name,availableTo
qr01cel01: DATA2_QR01_CD_00_qr01cel01 +ASM2
qr01cel01: DATA2_QR01_CD_01_qr01cel01 +ASM2
qr01cel01: DATA2_QR01_CD_02_qr01cel01 +ASM2
qr01cel01: DATA2_QR01_CD_03_qr01cel01 +ASM2
qr01cel01: DATA2_QR01_CD_04_qr01cel01 +ASM2
...
qr01cel03: RECO_QR01_CD_07_qr01cel03 +ASM
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 40
qr01cel03: RECO_QR01_CD_08_qr01cel03 +ASM
qr01cel03: RECO_QR01_CD_09_qr01cel03 +ASM
qr01cel03: RECO_QR01_CD_10_qr01cel03 +ASM
qr01cel03: RECO_QR01_CD_11_qr01cel03 +ASM
[celladmin@qr01cel01 ~]$
ASM-scoped security is now reconfigured. Now see what happens when +ASM attempts to use
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

the grid disks assigned to +ASM2.


31. Return to your qr01db01 terminal session. Using SQL*Plus, connect to ASM as an ASM
administrator.
[grid@qr01db01 ~]$ sqlplus / as sysasm

SQL*Plus: Release 11.2.0.3.0 Production...

SQL> a
32. Create an ASM disk group referencing the grid disks assigned to +ASM2 (use the SQL ) has
script /home/oracle/labs/lab06-04-21.sql if you prefer). Note that the
c m
ocommand
fails with an error message indicating that the disks do not exist. ฺ
co uideฺ
i r
SQL> create diskgroup data2_qr01_asm_sec normal
a l li@ redundancy
n t G
2 disk 'o/*/DATA2_QR01*' v
da tude
3 attribute 'compatible.rdbms'ฺy =a'11.2.0.0.0',
a r his S
4 'compatible.asm' = '11.2.0.0.0',
u k um = s'TRUE',
e t
en e to u
5 'cell.smart_scan_capable'
( v
llidata2_qr01_asm_sec
6 'au_size' = '4M';
create diskgroup v a c e ns normal redundancy
*
a
ad ble l i
Y
ar at sline ra1:
ERROR
m f e
n u kuORA-15018:
t r a n diskgroup cannot be created
n-
Ve noORA-15031: disk specification 'o/*/DATA2_QR01*' matches no disks

SQL>
33. Execute the following query to confirm that the disks are not visible to ASM. Exadata
storage security limits the visibility of grid disks to the environments which are allows to
access them.
SQL> select * from v$asm_disk where path like '%DATA2_QR01%';

no rows selected

SQL>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 41
34. Exit your SQL*Plus session.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release
11.2.0.3.0 - 64bit Production...
[grid@qr01db01 ~]$
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

So far you have examined ASM-scoped security. Database-scoped security can only be
implemented after ASM-scoped security is already in place. The configuration process for
database-scoped security very similar to the process you have already used for ASM-scoped
security. In the final part of this practice you will configure database-scoped security for one
Oracle Database. In a Database Machine environment with multiple databases you would be
required to repeat the process for each database.
35. Establish a terminal connection to qr01db01 as the oracle user.
36. Using SQL*Plus, connect as a database administrator.
a
has
[oracle@qr01db01 ~]$ sqlplus / as sysdba
)
SQL*Plus: Release 11.2.0.3.0 Production...
ฺ c om ฺ
i rco uide
SQL>
a l li@ nt G
37. Note the DB_UNIQUE_NAME setting for the database and
d v exitdSQL*Plus.
athen e
a t u
SQL> show parameter unique
a rฺy his S
u k um se t
NAME
( v en e to u TYPE VALUE

v a lli ens
------------------------------------ ----------- -------------
db_unique_name
a d a e lic string dbm
SQL> exit
r Y rab l
a
m nsfe- from
Disconnected Oracle Database 11g Enterprise Edition Release
k u a
e nu [oracle@qr01db01
- t r
11.2.0.3.0 64bit Production...
V non ~]$
38. Use the su command to assume the privileges of the root user. Enter oracle when
prompted for the password.
[oracle@qr01db01 ~]$ su
Password: <oracle>
[root@qr01db01 oracle]#
39. Shut down the Oracle Database, ASM and Grid Infrastructure. Note that on a Database
Machine you would need to perform this step on every server in the ASM cluster.
[root@qr01db01 oracle]# /u01/app/11.2.0/grid/bin/crsctl stop crs
CRS-2791: Starting shutdown of Oracle High Availability Services-managed
resources on 'qr01db01'
CRS-2673: Attempting to stop 'ora.crsd' on 'qr01db01'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on
'qr01db01'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'qr01db01'
CRS-2673: Attempting to stop 'ora.registry.acfs' on 'qr01db01'
...

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 42
CRS-2673: Attempting to stop 'ora.net1.network' on 'qr01db01'
CRS-2677: Stop of 'ora.net1.network' on 'qr01db01' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'qr01db01'
has completed
CRS-2677: Stop of 'ora.crsd' on 'qr01db01' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'qr01db01'
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

...
CRS-2673: Attempting to stop 'ora.gpnpd' on 'qr01db01'
CRS-2677: Stop of 'ora.gpnpd' on 'qr01db01' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on
'qr01db01' has completed
CRS-4133: Oracle High Availability Services has been stopped.
[root@qr01db01 oracle]#

40. Exit the root user session.


[root@qr01db01 oracle]# exit
a
exit
) has
[oracle@qr01db01 ~]$
c o m
41. Leave the current terminal session active and establish a separate terminal
c ฺ
o connection
e ฺ to
i r i d
the qr01cel01 Exadata cell as the celladmin user.
l l i @ t Gu
42. Launch the Exadata cell command-line interface (CellCLI).va n
d a d e
[celladmin@qr01cel01 ~]$ cellcli
r ฺ y a S tu
m a this
CellCLI: Release 11.2.3.2.1 – Production...
u u
k use
v n
e e to
CellCLI>
i (
ll toengenerate
s a random hexadecimal key string. Then exit
a
43. Use the CREATE KEYvcommand
c
CellCLI.
Y ada ble li
ar screate
CellCLI>
m f e ra key
n u ku tran2877208d48fa273d86ee6492cd6fe331
n-
Ve noCellCLI> exit
quitting

[celladmin@qr01cel01 ~]$
44. Use the ASSIGN KEY command to assign the security key generated in step 43 to your
Oracle Database on all the cells that you want the database to access. Use the
DB_UNIQUE_NAME observed in step 37. Note that this is case-sensitive.
[celladmin@qr01cel01 ~]$ dcli -c qr01cel01,qr01cel02,qr01cel03 "cellcli -e \
> assign key for dbm=\'2877208d48fa273d86ee6492cd6fe331\'"
qr01cel01: Key for dbm successfully created
qr01cel02: Key for dbm successfully created
qr01cel03: Key for dbm successfully created
[celladmin@qr01cel01 ~]$

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 43
45. Use the CREATE GRIDDISK or ALTER GRIDDISK command to configure security on the
grid disks. For database-scoped security you must set the availableTo attribute of each
grid disk to include both the ASM environment and the database which are allowed to
access the grid disk. Use the following command to make all the grid disks accessible to
the dbm database. Note that in other environments you would typically assign groups of grid
disks to different databases.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

[celladmin@qr01cel01 ~]$ dcli -c qr01cel01,qr01cel02,qr01cel03 "cellcli -e \


> alter griddisk all availableTo=\'+ASM,dbm\'"
qr01cel01: GridDisk DATA2_QR01_CD_00_qr01cel01 successfully altered
qr01cel01: GridDisk DATA2_QR01_CD_01_qr01cel01 successfully altered
qr01cel01: GridDisk DATA2_QR01_CD_02_qr01cel01 successfully altered
qr01cel01: GridDisk DATA2_QR01_CD_03_qr01cel01 successfully altered
qr01cel01: GridDisk DATA2_QR01_CD_04_qr01cel01 successfully altered
...
qr01cel03: GridDisk RECO_QR01_CD_07_qr01cel03 successfully altered a
qr01cel03: GridDisk RECO_QR01_CD_08_qr01cel03 successfully altered
) has
om ฺ
qr01cel03: GridDisk RECO_QR01_CD_09_qr01cel03 successfully altered
ฺ c
rco uide
qr01cel03: GridDisk RECO_QR01_CD_10_qr01cel03 successfully altered
i
qr01cel03: GridDisk RECO_QR01_CD_11_qr01cel03 successfully altered
[celladmin@qr01cel01 ~]$
a l li@ nt G
46. Return to your oracle user session on qr01db01 and d v a directory
acreate de at
a
y is S t u
$ORACLE_HOME/admin/<DB_UNIQUE_NAME>/pfile
a rฺdatabase.
where <DB_UNIQUE_NAME>
represents the DB_UNIQUE_NAME setting for
k u m e th Change into the newly created
the
directory.
e n u o us
[oracle@qr01db01 ~]$
l l i (v se-pt $ORACLE_HOME/admin/dbm/pfile
mkdir
[oracle@qr01db01
a v a ~]$iccd
l en$ORACLE_HOME/admin/dbm/pfile
ad blepfile]$
[oracle@qr01db01
Y
47. Create a a r e ra file containing the database key value from step 43 and the
m s f
cellkey.ora

n u ku tran for the ASM cluster associated with the database.


DB_UNIQUE_NAME
n-
Ve no[oracle@qr01db01 pfile]$ cat << END > cellkey.ora
> key=2877208d48fa273d86ee6492cd6fe331
> asm=+ASM
> END
[oracle@qr01db01 pfile]$
48. Confirm the contents of the cellkey.ora file.
[oracle@qr01db01 pfile]$ cat cellkey.ora
key=2877208d48fa273d86ee6492cd6fe331
asm=+ASM
[oracle@qr01db01 pfile]$

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 44
49. Set the file permissions and verify the settings. Note that on a Database Machine you would
need to configure the cellkey.ora file on every database server associated with the
database.
[oracle@qr01db01 pfile]$ chmod 600 cellkey.ora
[oracle@qr01db01 pfile]$ ls -l cellkey.ora
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

-rw------- 1 oracle oinstall 46 Jul 17 21:08 cellkey.ora


[oracle@qr01db01 pfile]$
50. Use the su command to assume the privileges of the root user. Enter oracle when
prompted for the password.
[oracle@qr01db01 pfile]$ su
Password: <oracle>
[root@qr01db01 pfile]#
51. Restart the Oracle Database, ASM and Grid Infrastructure. Note that on a Database a
Machine you would need to perform this step on every server in the ASM cluster.
) h as
[root@qr01db01 pfile]# /u01/app/11.2.0/grid/bin/crsctl start crs
CRS-4123: Oracle High Availability Services has been started. ฺc
om ฺ
[root@qr01db01 pfile]# i rco uide
a l li@ command.
52. Verify that all the Oracle cluster resources restart using the following n t G Note that
you may receive an error message indicating a failure d toa v
communicate de with a cluster
service if you execute the command while the clusterฺ a is t
restarting.
u
y is S You can safely ignore
the error message and re-execute the command a r hthe resources start. Do not
until tall
k u m restarts.
e
e n u o us
proceed to the next step before the cluster

( v t
[root@qr01db01 pfile]# /u01/app/11.2.0/grid/bin/crsctl
i e stat res \

a
> -w "TARGET = ONLINE"
v ll -t ens
ic
daTARGETle lSTATE
------------------------------------------------------------------------------
a
NAME
r
a sferY a b SERVER STATE_DETAILS

u m
------------------------------------------------------------------------------

n u Local
- t r an
k ------------------------------------------------------------------------------
Resources
e n
V noora.DATA_QR01.dg
ONLINE ONLINE qr01db01
ora.DBFS_DG.dg
ONLINE ONLINE qr01db01
ora.LISTENER.lsnr
ONLINE ONLINE qr01db01
ora.RECO_QR01.dg
ONLINE ONLINE qr01db01
ora.asm
ONLINE ONLINE qr01db01 Started
ora.net1.network
ONLINE ONLINE qr01db01
ora.ons
ONLINE ONLINE qr01db01
------------------------------------------------------------------------------
Cluster Resources
------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 45
1 ONLINE ONLINE qr01db01
ora.LISTENER_SCAN2.lsnr
1 ONLINE ONLINE qr01db01
ora.LISTENER_SCAN3.lsnr
1 ONLINE ONLINE qr01db01
ora.cvu
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

1 ONLINE ONLINE qr01db01


ora.dbm.db
1 ONLINE ONLINE qr01db01 Open
2 ONLINE OFFLINE
ora.oc4j
1 ONLINE ONLINE qr01db01
ora.qr01db01.vip
1 ONLINE ONLINE qr01db01
ora.qr01db02.vip
a
has
1 ONLINE INTERMEDIATE qr01db01 FAILED OVER
ora.scan1.vip )
1 ONLINE ONLINE qr01db01
ฺ c om ฺ
ora.scan2.vip
i rco uide
1 ONLINE ONLINE qr01db01
a l li@ nt G
ora.scan3.vip
qr01db01 da
v de
1 ONLINE ONLINE
r ฺ y a S tu
m a this
[root@qr01db01 pfile]#
u u seoracle user home directory.
kback touthe
53. Exit the root user session and change
v n
e e to
[root@qr01db01 pfile]# i (
ll enexit s
v a c
ada blepfile]$ li
exit

a r Y
[oracle@qr01db01
r a cd

k u m nsfe
[oracle@qr01db01 ~]$

nu thatnthe a security is now configured. The fact that ASM and Oracle Database restarted
trboth
Database-scoped
-
e
V no
shows environments can access the grid disks configured on the Exadata storage.
54. Confirm that the database can access its storage by connecting to the database and
executing a query.
[oracle@qr01db01 ~]$ sqlplus sales/sales

SQL*Plus: Release 11.2.0.3.0 Production...

SQL> select count(*) from customers;

COUNT(*)
----------
1500000

SQL> exit

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 46
Disconnected from Oracle Database 11g Enterprise Edition Release
11.2.0.3.0 - 64bit Production...
[oracle@qr01db01 ~]$
In the final part of the practice you will remove the Exadata storage security that you have
configured during this practice.
55. Use the su command to assume the privileges of the root user.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

[oracle@qr01db01 ~]$ su
Password: <oracle>
[root@qr01db01 oracle]#
56. Shut down the Oracle Database, ASM and Grid Infrastructure.
[root@qr01db01 oracle]# /u01/app/11.2.0/grid/bin/crsctl stop crs
CRS-2791: Starting shutdown of Oracle High Availability Services-managed
resources on 'qr01db01'
a
has
CRS-2673: Attempting to stop 'ora.crsd' on 'qr01db01'

)
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on
'qr01db01'
ฺ c om ฺ
rco uide
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'qr01db01'
i
CRS-2673: Attempting to stop 'ora.registry.acfs' on 'qr01db01'
...
a l li@ nt G
d av tude
CRS-2673: Attempting to stop 'ora.net1.network' on 'qr01db01'
a
rฺy his S
CRS-2677: Stop of 'ora.net1.network' on 'qr01db01' succeeded
a
um se t
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'qr01db01'
has completed
u k
( v en e to u
CRS-2677: Stop of 'ora.crsd' on 'qr01db01' succeeded

v a lli ens
CRS-2673: Attempting to stop 'ora.ctssd' on 'qr01db01'

da le lic
...

a
CRS-2673: Attempting to stop 'ora.gpnpd' on 'qr01db01'

a r Y erab
CRS-2677: Stop of 'ora.gpnpd' on 'qr01db01' succeeded

k u m nsf
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on

nu n-tra
'qr01db01' has completed
e
V no CRS-4133: Oracle High Availability Services has been stopped.
[root@qr01db01 oracle]#

57. Back in your celladmin session on qr01cel01, use the following command to clear the
availableTo grid disk attribute.
[celladmin@qr01cel01 ~]$ dcli -c qr01cel01,qr01cel02,qr01cel03 "cellcli -e \
> alter griddisk all availableTo=\'\'"
qr01cel01: GridDisk DATA2_QR01_CD_00_qr01cel01 successfully altered
qr01cel01: GridDisk DATA2_QR01_CD_01_qr01cel01 successfully altered
qr01cel01: GridDisk DATA2_QR01_CD_02_qr01cel01 successfully altered
qr01cel01: GridDisk DATA2_QR01_CD_03_qr01cel01 successfully altered
qr01cel01: GridDisk DATA2_QR01_CD_04_qr01cel01 successfully altered
...
qr01cel03: GridDisk RECO_QR01_CD_07_qr01cel03 successfully altered
qr01cel03: GridDisk RECO_QR01_CD_08_qr01cel03 successfully altered
qr01cel03: GridDisk RECO_QR01_CD_09_qr01cel03 successfully altered
qr01cel03: GridDisk RECO_QR01_CD_10_qr01cel03 successfully altered
qr01cel03: GridDisk RECO_QR01_CD_11_qr01cel03 successfully altered
[celladmin@qr01cel01 ~]$

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 47
58. Clear the key assignment for the dbm database.
[celladmin@qr01cel01 ~]$ dcli -c qr01cel01,qr01cel02,qr01cel03 "cellcli -e \
> assign key for dbm=\'\'"
qr01cel01: Key for dbm successfully dropped
qr01cel02: Key for dbm successfully dropped
qr01cel03: Key for dbm successfully dropped
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

[celladmin@qr01cel01 ~]$

59. Clear the key assignments for +ASM and +ASM2.


[celladmin@qr01cel01 ~]$ dcli -c qr01cel01,qr01cel02,qr01cel03 "cellcli -e \
> assign key for +ASM=\'\'"
qr01cel01: Key for +ASM successfully dropped
qr01cel02: Key for +ASM successfully dropped
qr01cel03: Key for +ASM successfully dropped
[celladmin@qr01cel01 ~]$ dcli -c qr01cel01,qr01cel02,qr01cel03 "cellcli -e \
a
has
> assign key for +ASM2=\'\'"
qr01cel01: Key for +ASM2 successfully dropped
)
qr01cel02: Key for +ASM2 successfully dropped
ฺ c om ฺ
rco uide
qr01cel03: Key for +ASM2 successfully dropped
i
li@
[celladmin@qr01cel01 ~]$
a l that n t G
60. Return to your root session and remove the cellkey.ora
d a v files
d e you created earlier in
the practice.
r ฺ y a S tu
a this
[root@qr01db01 oracle]# rm $ORACLE_HOME/admin/dbm/pfile/cellkey.ora
m
rm: remove regular file
u u
k use
[root@qr01db01 oracle]#(v
n
`/u01/app/oracle/product/11.2.0/dbhome_1/admin/dbm/pfile/cellkey.ora'?
rme/etc/oracle/cell/network-config/cellkey.ora
t o
y

rm: remove regularafile


e n se
lli `/etc/oracle/cell/network-config/cellkey.ora'?
v
daoracle]# li c
y

a
[root@qr01db01
Y l e
a f e ab ASM and Grid Infrastructure.
61. Restart therOracle Database,
r
k m ns pfile]# /u01/app/11.2.0/grid/bin/crsctl start crs
u[root@qr01db01
e u - tra Oracle High Availability Services has been started.
n [root@qr01db01
CRS-4123:
n
V no pfile]#
62. Exit all of your terminal sessions.

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 48
Practice 6-5: Cell User Accounts
Overview
In this practice, you exercise the privileges available to the celladmin and cellmonitor
Exadata administration accounts.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Tasks
1. Establish a terminal connection to the qr01cel01 Exadata cell as the cellmonitor user.
Enter welcome as the password when prompted.
2. Launch the Exadata cell command-line interface (CellCLI).
[cellmonitor@qr01cel01 ~]$ cellcli
CellCLI: Release 11.2.3.2.1 – Production...

a
has
CellCLI>
)
The cellmonitor user can only view Exadata cell objects using the CellCLI LIST command.
3. Confirm that cellmonitor can view the Exadata cell attributes. ฺ c om ฺ
CellCLI> list cell detail i rco uide
name: qr01cel01
a l li@ nt G
bbuTempThreshold: 60
a d av tude
bbuChargeThreshold: 800
a rฺy his S
bmcType:
k m et
absent
uOSS_11.2.3.2.1_LINUX.X64_130109
cellVersion:
n u 1 o u
s
e t
li (v ense7
cpuCount:

a l
diagHistoryDays:
v lic
d
a blea
fanCount: 1/1

r Y
a id:
fanStatus:
r a
normal

m
u an s f e
flashCacheMode: WriteThrough

n u k r
t interconnectCount:
8ab50138-a667-4793-a976-c540dc1930c5

Ve non- interconnect1:
3
eth1
iormBoost: 0.0
ipaddress1: 192.168.1.103/24
kernelVersion: 2.6.32-400.11.1.el5uek
makeModel: Fake hardware
metricHistoryDays: 7
notificationMethod: mail
notificationPolicy: critical,warning,clear
offloadEfficiency: 596.0
powerCount: 1/1
powerStatus: normal
releaseVersion: 11.2.3.2.1
releaseTrackingBug: 14522699
smtpFrom: "John Doe"
smtpFromAddr: john.doe@example.com
smtpServer: my_mail.example.com
smtpToAddr: jane.smith@example.com
status: online

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 49
temperatureReading: 0.0
temperatureStatus: normal
upTime: 0 days, 2:45
cellsrvStatus: running
msStatus: running
rsStatus: running
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

CellCLI>

4. Confirm that cellmonitor cannot modify the Exadata cell attributes.


CellCLI> alter cell smtpToAddr='admin@example.com'
CELL-01520: This command is not permitted in monitor mode.

CellCLI>
a
5. Confirm that cellmonitor cannot create or modify the Exadata cell objects.
) has
CellCLI> create celldisk all harddisk
ฺ c om ฺ
CELL-01520: This command is not permitted in monitor
i rco mode.u ide
@
lli a comment"
t G
CellCLI> alter griddisk all comment="Here v a
a tude
is n
a d
CELL-01520: This command is not permitted
a rฺy his Sin monitor mode.
u k um se t
CellCLI>
en t o u
6. Establish a terminal connection
l i ( v to the
s e
qr01cel01 Exadata cell as the celladmin user.
a l n
7. Launch the Exadata cell
d a l i ce interface (CellCLI).
v command-line
Y a ble ~]$ cellcli
[celladmin@qr01cel01
r
a sRelease e ra 11.2.3.2.1 – Production...
m
CellCLI: f
n u ku tran
n-
Ve noCellCLI>
In previous practices you have already seen how the celladmin user can create, modify and
drop Exadata cell objects. In fact, the celladmin user can execute any CellCLI command
except for the CALIBRATE command. The CALIBRATE command can only be executed by the
root user.
8. Confirm that celladmin cannot run the CALIBRATE command.
CellCLI> calibrate
CELL-01522: CALIBRATE must be run as the root user id.

CellCLI>
9. Exit your CellCLI sessions.

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 50
Practice 6-6: Using the Distributed Command-Line Utility (dcli)

Overview
The distributed command-line utility (dcli) is a utility program that is provided with Database
Machine. Its purpose is to provide a means to simultaneously execute monitoring and
administration commands across multiple servers.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

In earlier practices you used dcli to execute CellCLI commands across multiple Exadata cells.
In this practice you will extend your use of dcli by performing the initial configuration required
to enable dcli to issue commands to all of your cells from your database server (qr01db01).
You will also exercise some additional dcli functions.

Tasks
1. Establish a terminal connection to qr01db01 as the oracle user.
2. Create a file named mycells that contains the names of your Exadata cells on separate a
lines.
) has
[oracle@qr01db01 ~]$ cat << END > mycells
ฺ c om ฺ
> qr01cel01
i rco uide
> qr01cel02
a l li@ nt G
> qr01cel03
a d av tude
rฺy his S
> END
[oracle@qr01db01 ~]$
m eta
3. Generate a private/public key pair foruusek uwith s using the ssh-keygen command as
e n o u
SSH
t the default key file and just press Enter
v seaccept
shown below. For the sake of(simplicity,
lia passphrase.
when you are prompteda
v l
for
en -t rsa
a l i
d le rsa key pair.c
Y apublic/private
[oracle@qr01db01 ~]$ ssh-keygen

a f r ab to save the key (/home/oracle/.ssh/id_rsa):


rfile inewhich
Generating

k m passphrase
uEnter
Enter
n s (empty for no passphrase):
u r a
n n-t same passphrase again:
Ve noEnter
Your identification has been saved in /home/oracle/.ssh/id_rsa.
Your public key has been saved in /home/oracle/.ssh/id_rsa.pub.
The key fingerprint is:
26:ee:bd:76:6c:33:20:3f:8b:9f:23:49:77:6a:15:97 oracle@qr01db01
[oracle@qr01db01 ~]$

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 51
4. Execute the following command to configure SSH user-equivalence between your database
server OS account (oracle) and the celladmin user on the cells specified in the
mycells file.
Answer yes if you are prompted to acknowledge server authenticity.
[oracle@qr01db01 ~]$ dcli -g mycells -k
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

The authenticity of host 'qr01cel01 (192.0.2.103)' can't be established.


RSA key fingerprint is fb:f9:ec:56:6b:8c:5b:a0:90:82:20:36:51:b8:59:af.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'qr01cel01,192.0.2.103' (RSA) to the list of known
hosts.
celladmin@qr01cel01's password: <welcome>
The authenticity of host 'qr01cel03 (192.0.2.105)' can't be established.
RSA key fingerprint is fb:f9:ec:56:6b:8c:5b:a0:90:82:20:36:51:b8:59:af.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'qr01cel03,192.0.2.105' (RSA) to the list of known a
hosts.
) has
om ฺ
celladmin@qr01cel03's password: <welcome>

ฺ c
The authenticity of host 'qr01cel02 (192.0.2.104)' can't be established.

i rco uide
RSA key fingerprint is fb:f9:ec:56:6b:8c:5b:a0:90:82:20:36:51:b8:59:af.

l
Are you sure you want to continue connecting (yes/no)? yes
a li@ nt G
hosts.
a d av tude
Warning: Permanently added 'qr01cel02,192.0.2.104' (RSA) to the list of known

a
celladmin@qr01cel02's password: <welcome>rฺy his S
qr01cel01: ssh key added
u k um se t
en e to u
qr01cel02: ssh key added
qr01cel03: ssh key added
( v
v a
[oracle@qr01db01 ~]$lli ens
You have now completed
a l e lic configuration required to enable dcli between the
dathe one-time
Y raband the celladmin user on each Exadata cell. After dcli is
oracle user onr qr01db01
a
m withnsthefe–k option, subsequent dcli commands between the same servers and
executeduonce
k
e nuaccounts
user
n - trdoanot require the –k option and do not require a password.
V5. The
noprimary use for dcli is to simultaneously execute CellCLI commands across multiple
cells. Use the following command to check on the status of your Exadata cells.
[oracle@qr01db01 ~]$ dcli -g mycells cellcli -e list cell
qr01cel01: qr01cel01 online
qr01cel02: qr01cel02 online
qr01cel03: qr01cel03 online
[oracle@qr01db01 ~]$

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 52
6. dcli can also be used to execute any non-interactive operating system commands on
multiple cells and/or database servers. You can use quotes to surround compound
commands and commands which contain pipes. Execute the following example command
or construct an alternative command of your own.
[oracle@qr01db01 ~]$ dcli -g mycells "cat /proc/meminfo | grep Mem"
qr01cel01: MemTotal: 1993500 kB
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

qr01cel01: MemFree: 62564 kB


qr01cel02: MemTotal: 1993500 kB
qr01cel02: MemFree: 71484 kB
qr01cel03: MemTotal: 1993500 kB
qr01cel03: MemFree: 73124 kB
[oracle@qr01db01 ~]$

7. dcli is not just limited to monitoring. It is often used to ensure that consistent settings are
applied across multiple systems. Use the following commands to view and adjust IORM
settings on your Exadata cells. a
[oracle@qr01db01 ~]$ dcli -g mycells cellcli -e \
) has
> list iormplan attributes objective
ฺ c om ฺ
qr01cel01: basic
i rco uide
li@ nt G
qr01cel02: basic
qr01cel03: basic a l
v iormplan
[oracle@qr01db01 ~]$ dcli -g mycells cellcli -eaalter
a d t u de objective=auto
qr01cel01: IORMPLAN successfully altered ฺy
a r his S
qr01cel02: IORMPLAN successfully altered
k m et
ualtered
qr01cel03: IORMPLAN successfully
[oracle@qr01db01 ~]$ dcli e n u
t o us
li (v eobjective
-g mycells cellcli -e \

a l
> list iormplan attributes
n se
v
da le lic
qr01cel01: auto
qr01cel02: a
r Y auto ab
auto
a f e r
m ns ~]$ dcli -g mycells cellcli -e alter iormplan objective=basic
qr01cel03:
k u[oracle@qr01db01
e u
n - tra IORMPLAN successfully altered
n qr01cel01:
V noqr01cel02: IORMPLAN successfully altered
qr01cel03: IORMPLAN successfully altered
[oracle@qr01db01 ~]$ dcli -g mycells cellcli -e \
> list iormplan attributes objective
qr01cel01: basic
qr01cel02: basic
qr01cel03: basic
[oracle@qr01db01 ~]$

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 53
8. Sometimes dcli commands return a lot of output. The following command uses wildcards
and a WHERE condition to return the current metric observations for small write I/O requests
for every disk-based cell disk across all the cells. Execute the command and examine the
output for your cells.
[oracle@qr01db01 ~]$ dcli -g mycells "cellcli -e list metriccurrent \
> where name like \'CD_IO_RQ_W_S.?\' and metricobjectname like \'CD.*\'"
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

qr01cel01: CD_IO_RQ_W_SM CD_00_qr01cel01 13,855 IO requests


qr01cel01: CD_IO_RQ_W_SM CD_01_qr01cel01 1,393 IO requests
qr01cel01: CD_IO_RQ_W_SM CD_02_qr01cel01 1,424 IO requests
qr01cel01: CD_IO_RQ_W_SM CD_03_qr01cel01 2,965 IO requests
qr01cel01: CD_IO_RQ_W_SM CD_04_qr01cel01 4,364 IO requests
qr01cel01: CD_IO_RQ_W_SM CD_05_qr01cel01 1,624 IO requests
qr01cel01: CD_IO_RQ_W_SM CD_06_qr01cel01 1,049 IO requests
qr01cel01: CD_IO_RQ_W_SM CD_07_qr01cel01 3,648 IO requests
qr01cel01: CD_IO_RQ_W_SM CD_08_qr01cel01 1,567 IO requests a
qr01cel01: CD_IO_RQ_W_SM CD_09_qr01cel01
) has
2,352 IO requests

om ฺ
qr01cel01: CD_IO_RQ_W_SM CD_10_qr01cel01 1,323 IO requests
ฺ c
rco uide
qr01cel01: CD_IO_RQ_W_SM CD_11_qr01cel01 1,591 IO requests
qr01cel02: CD_IO_RQ_W_SM i
CD_00_qr01cel02 14,336 IO requests
qr01cel02: CD_IO_RQ_W_SM
l li@ nt G
CD_01_qr01cel02
a 4,056 IO requests
qr01cel02: CD_IO_RQ_W_SM
a d av tude
CD_02_qr01cel02 846 IO requests

rฺy his S
qr01cel02: CD_IO_RQ_W_SM CD_03_qr01cel02 1,732 IO requests
qr01cel02: CD_IO_RQ_W_SM a CD_04_qr01cel02 3,031 IO requests

u k
qr01cel02: CD_IO_RQ_W_SM um se t CD_05_qr01cel02 1,150 IO requests

( v en e to u
qr01cel02: CD_IO_RQ_W_SM CD_06_qr01cel02 1,862 IO requests

v a lli ens
qr01cel02: CD_IO_RQ_W_SM CD_07_qr01cel02 1,506 IO requests

da le lic
qr01cel02: CD_IO_RQ_W_SM CD_08_qr01cel02 3,420 IO requests
a
qr01cel02: CD_IO_RQ_W_SM CD_09_qr01cel02 1,283 IO requests

a r Y erab
qr01cel02: CD_IO_RQ_W_SM CD_10_qr01cel02 3,313 IO requests

k u m nsf
qr01cel02: CD_IO_RQ_W_SM CD_11_qr01cel02 2,835 IO requests

e nu n-traqr01cel03: CD_IO_RQ_W_SM CD_00_qr01cel03 13,564 IO requests


V no qr01cel03: CD_IO_RQ_W_SM CD_01_qr01cel03 590 IO requests
qr01cel03: CD_IO_RQ_W_SM CD_02_qr01cel03 4,480 IO requests
qr01cel03: CD_IO_RQ_W_SM CD_03_qr01cel03 4,783 IO requests
qr01cel03: CD_IO_RQ_W_SM CD_04_qr01cel03 3,063 IO requests
qr01cel03: CD_IO_RQ_W_SM CD_05_qr01cel03 1,074 IO requests
qr01cel03: CD_IO_RQ_W_SM CD_06_qr01cel03 695 IO requests
qr01cel03: CD_IO_RQ_W_SM CD_07_qr01cel03 5,879 IO requests
qr01cel03: CD_IO_RQ_W_SM CD_08_qr01cel03 562 IO requests
qr01cel03: CD_IO_RQ_W_SM CD_09_qr01cel03 1,449 IO requests
qr01cel03: CD_IO_RQ_W_SM CD_10_qr01cel03 1,269 IO requests
qr01cel03: CD_IO_RQ_W_SM CD_11_qr01cel03 547 IO requests
[oracle@qr01db01 ~]$

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 54
9. This command is essentially the same as the command you just executed in step 8. It uses
the –r option along with a regular expression string to specify which output dcli should
delete from the output. The result is that only the output that does not match the –r regular
expression is returned to the user. Execute the command and examine the output for your
cells.
[oracle@qr01db01 ~]$ dcli -g mycells -r '.*CD_0.*' "cellcli -e list \
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

> metriccurrent where name like \'CD_IO_RQ_W_S.?\' \


> and metricobjectname like \'CD.*\'"
.*CD_0.*: ['qr01cel01', 'qr01cel02', 'qr01cel03']
qr01cel01: CD_IO_RQ_W_SM CD_10_qr01cel01 1,323 IO requests
qr01cel01: CD_IO_RQ_W_SM CD_11_qr01cel01 1,591 IO requests
qr01cel02: CD_IO_RQ_W_SM CD_10_qr01cel02 3,313 IO requests
qr01cel02: CD_IO_RQ_W_SM CD_11_qr01cel02 2,835 IO requests
qr01cel03: CD_IO_RQ_W_SM CD_10_qr01cel03 1,269 IO requests
qr01cel03: CD_IO_RQ_W_SM CD_11_qr01cel03 547 IO requests a
[oracle@qr01db01 ~]$
) has
comthis
10. While the –r option specifies what to restrict from the dcli output, there is no dcli option
to explicitly define the output that should be returned from a long list. To o ฺ
achieve ฺ
eandaim
use the grep command in conjunction with dcli. Execute the following i rc command
i d
examine the output for your cells. l l i @ t Gu
a a metriccurrent
vlist e n
[oracle@qr01db01 ~]$ dcli -g mycells "cellclid-e
a t u d \
> where name like \'CD_IO_RQ_W_S.?\' \ ฺy S
a rgrep CD_00"
h i s
> and metricobjectname like \'CD.*\'
k m et
uCD_00_qr01cel01
|
qr01cel01: CD_IO_RQ_W_SM u u s
n CD_00_qr01cel02 14,133 IO requests
qr01cel02: CD_IO_RQ_W_SMve t o
i ( e
ll ens CD_00_qr01cel03
14,571 IO requests

v a
qr01cel03: CD_IO_RQ_W_SM
c
13,663 IO requests

a da le li
[oracle@qr01db01 ~]$

dcli can also be


a Y
rnext
used to a
r b files to numerous remote systems. You will exercise this
copy
u m ns
capability in the f e
series of steps.
11.nu k ra text file that contains a short message identifying you. Name the file
Create a tsmall
e n -
V no to your assigned student account. Confirm the existence and contents of the file.
according
[oracle@qr01db01 ~]$ cat << END > message.txt
> Hello World!
> END
[oracle@qr01db01 ~]$ cat message.txt
Hello World!
[oracle@qr01db01 ~]$
12. Use dcli with the –f option to copy your file to the default home directory of the
celladmin user on your Exadata cells.
[oracle@qr01db01 ~]$ dcli -g mycells -f message.txt
[oracle@qr01db01 ~]$

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 55
13. Use the following command to confirm the success of the operation in step 12.
[oracle@qr01db01 ~]$ dcli -g mycells cat message.txt
qr01cel01: Hello World!
qr01cel02: Hello World!
qr01cel03: Hello World!
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

[oracle@qr01db01 ~]$
In addition to copying a file to multiple remote locations, dcli can copy a file and execute it
simultaneously on the specified remote systems. You will exercise this capability in the next
series of steps.
14. Create a simple shell script such as the one shown below. Name the file according to your
assigned student account.
[oracle@qr01db01 ~]$ cat << END > script.sh
> HST=\`hostname -s\`
a
> DTE=\`date\`
) has
> echo -n \`cat message.txt\`
ฺ c om ฺ
rco uide
> echo " on \${HST} at \${DTE}."
i
li@ nt G
> END
a l
av filetuexecutable.
[oracle@qr01db01 ~]$
15. Use the chmod command to make your newly created a dscript
de
a rฺy his S
[oracle@qr01db01 ~]$ chmod +x
u k um se t
script.sh
[oracle@qr01db01 ~]$
en ande run
t u
othe
16. Use dcli with the –x option
l i (
tov copy
s script you just created.
a l
[oracle@qr01db01v~]$ dcli e n
qr01cel01: a da World! l i c-gqr01cel01
mycells -x script.sh

Y Hello
b l e on at Wed Jul 17 21:27:28 EDT 2013.

ar sHello
qr01cel02:
m f e raWorld! on qr01cel02 at Wed Jul 17 21:27:29 EDT 2013.

u k u[oracle@qr01db01
a n
qr01cel03: Hello World! on qr01cel03 at Wed Jul 17 21:27:29 EDT 2013.
n n-t r
Ve Note
~]$

nothat script files with the .scl extension are run by the CellCLI utility on the remote
server.
17. Use dcli in conjunction with rm to delete the files you copied to your cells during this
practice. Please be careful not to mistakenly delete any other files.
[oracle@qr01db01 ~]$ dcli -g mycells rm message.txt script.sh
[oracle@qr01db01 ~]$

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Exadata Storage Server Configuration


Chapter 6 - Page 56
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a
) has
ฺ c om ฺ
i rco uide
Practices for a l i@ t G7: I/O
lLesson
d a v den
Resource
r ฺ y S tu
a Management
m a 7 this
u u
k use
Chapter

v n
e e to
i (
ll ens
v a
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 7: I/O Resource Management


Chapter 7 - Page 1
Practices for Lesson 7
Practices Overview
There is no practice for Lesson 3.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a
) has
ฺ c om ฺ
i rco uide
a l li@ nt G
a d av tude
a rฺy his S
u k um se t
( v en e to u
v a lli ens
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 7: I/O Resource Management


Chapter 7 - Page 2
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a
) has
ฺ c om ฺ
i rco uide
Practices for a l i@ t G8:
lLesson
d a v den
Recommendations
r ฺ y a S tu for
a this Database
Optimizing
m
u u se
k Performance
n
e e to u
i ( v
v a ll ens Chapter 8
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Recommendations for Optimizing Database Performance


Chapter 8 - Page 1
Practices for Lesson 8
Practices Overview
In these practices, you will explore the following performance optimization techniques and
technologies:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• Configuring write back flash cache


• Using Exadata Hybrid Columnar Compression
• Testing index elimination

a
) has
ฺ c om ฺ
i rco uide
a l li@ nt G
a d av tude
a rฺy his S
u k um se t
( v en e to u
v a lli ens
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Recommendations for Optimizing Database Performance


Chapter 8 - Page 2
Practice 8-1: Configuring Write Back Flash Cache
Overview
In this practice you will reconfigure Exadata Smart Flash Cache so that write operations can be
serviced by flash only, instead of using disks. This mode of operation is known as write back
flash cache.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Tasks
Reconfiguring Exadata Storage Servers to enable write back flash cache can be achieved
in a rolling manner (one cell at a time) or all-at-once. In this practice you will reconfigure all
the cells at once, which requires that Oracle Database and Grid Infrastructure are shut
down on all database servers. To configure write back flash cache in a rolling manner some
additional steps and checks are recommended. Refer to My Oracle Support bulletin
1500257.1 for details.
1. Establish a terminal connection to qr01db01 as the grid user.
s a
2. Use the su command to assume the privileges of the root user. Enter oracle whenha
)
prompted for the password.
ฺ c om ฺ
[grid@qr01db01 ~]$ su
i r co uide
Password: <oracle>
a l li@ nt G
[root@qr01db01 grid]#
a d av tude
ฺy is SNote that on a Database
3. Shut down the Oracle Database, ASM and Grid rInfrastructure.
a
k m e thserver in the ASM cluster. Do not
Machine you would need to perform this step on every
ucompletes.
proceed to the next step until this u
e n step
t o us
li (v enofsOracle
e High Availability Services-managed
[root@qr01db01 grid]# crsctl stop crs

a l
CRS-2791: Starting shutdown
v
da letolistop
resources on 'qr01db01' c
Y a
CRS-2673: Attempting
b 'ora.crsd' on 'qr01db01'
r
a sfer
CRS-2790: a
Starting shutdown of Cluster Ready Services-managed resources on
m
kuCRS-2673: anAttempting to stop 'ora.oc4j' on 'qr01db01'
'qr01db01'

e n u - t r
n
V noCRS-2673: Attempting to stop 'ora.qr01db02.vip' on 'qr01db01'
...
CRS-2673: Attempting to stop 'ora.net1.network' on 'qr01db01'
CRS-2677: Stop of 'ora.net1.network' on 'qr01db01' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'qr01db01'
has completed
CRS-2677: Stop of 'ora.crsd' on 'qr01db01' succeeded
CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'qr01db01'
...
CRS-2677: Stop of 'ora.diskmon' on 'qr01db01' succeeded
CRS-2677: Stop of 'ora.gpnpd' on 'qr01db01' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on
'qr01db01' has completed
CRS-4133: Oracle High Availability Services has been stopped.
[root@qr01db01 grid]#

4. Leave the root terminal session active and establish a separate terminal connection to the
qr01cel01 Exadata cell as the celladmin user.

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Recommendations for Optimizing Database Performance


Chapter 8 - Page 3
5. Examine the cell flashCacheMode attribute setting on all of the cells. By default, each cell
is configured in WriteThrough mode, which means that write operations must be
persisted to disk regardless of whether or not the data resides inside Exadata Smart Flash
Cache.
[celladmin@qr01cel01 ~]$ dcli -c qr01cel01,qr01cel02,qr01cel03 cellcli -e \
> list cell attributes flashCacheMode
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

qr01cel01: WriteThrough
qr01cel02: WriteThrough
qr01cel03: WriteThrough
[celladmin@qr01cel01 ~]$
6. Drop the existing Exadata Smart Flash Cache.
[celladmin@qr01cel01 ~]$ dcli -c qr01cel01,qr01cel02,qr01cel03 cellcli -e \
> drop flashcache
qr01cel01: Flash cache qr01cel01_FLASHCACHE successfully dropped
a
has
qr01cel02: Flash cache qr01cel02_FLASHCACHE successfully dropped
qr01cel03: Flash cache qr01cel03_FLASHCACHE successfully dropped
)
[celladmin@qr01cel01 ~]$
ฺ c om ฺ
7. Stop cellsrv on all of the cells.
i r co uide
l li@ nt G
[celladmin@qr01cel01 ~]$ dcli -c qr01cel01,qr01cel02,qr01cel03
a
cellcli -e \
> alter cell shutdown services cellsrv
a d av tude
qr01cel01:
qr01cel01: Stopping CELLSRV services...rฺ
a y is S
qr01cel01: The SHUTDOWN of CELLSRV
k u m e th successful.
services was
qr01cel02:
e n u o us
i e t
(v services...
l l
qr01cel02: Stopping CELLSRV
s
n services was successful.
va liofceCELLSRV
qr01cel02: The SHUTDOWN
qr01cel03: da
Y aStoppingbleCELLSRV services...
r
qr01cel03:
a sThe e a
rSHUTDOWN
u m
qr01cel03:
n f of CELLSRV services was successful.

n k
u -tra[celladmin@qr01cel01 ~]$
e on
V8. Commencing with Exadata storage server release 11.2.3.2.0, the flashCacheMode
n
attribute can be set to WriteBack, which means that write operations can be serviced by
flash instead of using disks. Enable write back flash cache on all of the cells.
[celladmin@qr01cel01 ~]$ dcli -c qr01cel01,qr01cel02,qr01cel03 cellcli -e \
> alter cell flashCacheMode = WriteBack
qr01cel01: Cell qr01cel01 successfully altered
qr01cel02: Cell qr01cel02 successfully altered
qr01cel03: Cell qr01cel03 successfully altered
[celladmin@qr01cel01 ~]$

9. Restart cellsrv on all of the cells.


[celladmin@qr01cel01 ~]$ dcli -c qr01cel01,qr01cel02,qr01cel03 cellcli -e \
> alter cell startup services cellsrv
qr01cel01:
qr01cel01: Starting CELLSRV services...
qr01cel01: The STARTUP of CELLSRV services was successful.
qr01cel02:
qr01cel02: Starting CELLSRV services...

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Recommendations for Optimizing Database Performance


Chapter 8 - Page 4
qr01cel02: The STARTUP of CELLSRV services was successful.
qr01cel03:
qr01cel03: Starting CELLSRV services...
qr01cel03: The STARTUP of CELLSRV services was successful.
[celladmin@qr01cel01 ~]$
10. Re-create Exadata Smart Flash Cache on all the cells.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

[celladmin@qr01cel01 ~]$ dcli -c qr01cel01,qr01cel02,qr01cel03 cellcli -e \


> create flashcache all
qr01cel01: Flash cache qr01cel01_FLASHCACHE successfully created
qr01cel02: Flash cache qr01cel02_FLASHCACHE successfully created
qr01cel03: Flash cache qr01cel03_FLASHCACHE successfully created
[celladmin@qr01cel01 ~]$

11. Verify the cell flashCacheMode attribute setting on all of the cells.
[celladmin@qr01cel01 ~]$ dcli -c qr01cel01,qr01cel02,qr01cel03 cellcli -e \
a
has
> list cell attributes flashCacheMode
qr01cel01: WriteBack )
qr01cel02: WriteBack
ฺ c om ฺ
qr01cel03: WriteBack
i rco uide
[celladmin@qr01cel01 ~]$
a l l i@ t G
Now that write back flash cache is enabled, each cache may
a v containd e n data that is
updated
different from the data copy held on disk. This is called
y d
a dirty tuand
data, you can monitor the
r ฺ is S
ma of edirtythdata
amount of dirty data inside Exadata Smart Flash Cache using cell metrics.
12. Use the following command to view thekamount
u u s currently inside Exadata Smart
Flash Cache on each cell. Becausenthe cachesuhave only just been created and no
( v ecells,ethetoamount should be zero.
databases are currently using
a i the
ll ~]$ dcli ns-c qr01cel01,qr01cel02,qr01cel03 cellcli -e \
v c e
ada bleFC_BY_DIRTY
li
[celladmin@qr01cel01

Y
> list metriccurrent

ar sFC_BY_DIRTYra
qr01cel01:
m
uqr01cel03: f e FLASHCACHE 0.000 MB

u k qr01cel02:
t r a n FC_BY_DIRTY FLASHCACHE 0.000 MB

e n [celladmin@qr01cel01
n - FC_BY_DIRTY FLASHCACHE 0.000 MB
V no ~]$
13. Return to you root terminal session and restart Grid Infrastructure, ASM and Oracle
Database.
[root@qr01db01 grid]# crsctl start crs
CRS-4123: Oracle High Availability Services has been started.
[root@qr01db01 grid]#

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Recommendations for Optimizing Database Performance


Chapter 8 - Page 5
14. Wait for a few minutes until your database restarts. Execute the following command to
monitor the status of the database. Note that you may see an error similar to that shown
below if you execute this command before clusterware is restarted. Proceed to the next
stop only after your database is started on qr01db01.
[root@qr01db01 grid]# srvctl status database -d dbm
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

PRCD-1027 : Failed to retrieve database dbm


PRCR-1115 : Failed to find entities of type resource that match
filters ((NAME == ora.dbm.db) && (TYPE == ora.database.type))
and contain attributes VERSION,ORACLE_HOME,DATABASE_TYPE
Cannot communicate with crsd
[root@qr01db01 grid]# srvctl status database -d dbm
Instance dbm1 is not running on node qr01db01
Instance dbm2 is not running on node qr01db02
[root@qr01db01 grid]# srvctl status database -d dbm a
Instance dbm1 is running on node qr01db01
) has
Instance dbm2 is not running on node qr01db02
ฺ c om ฺ
[root@qr01db01 grid]#
i rco uide
15. Return to your celladmin terminal session and view the amount
a l li@of dirty
n t G in each cell
data
cache.
d v
a tude
a
rฺy his S
[celladmin@qr01cel01 ~]$ dcli -c qr01cel01,qr01cel02,qr01cel03 cellcli -e \
a
um s0.961 t MB
> list metriccurrent FC_BY_DIRTY
qr01cel01: FC_BY_DIRTY
u k
FLASHCACHE e
qr01cel02: FC_BY_DIRTY
( v en e to u 0.961 MB
FLASHCACHE
qr01cel03: FC_BY_DIRTY
v a lli~]$ FLASHCACHE
e n s 0.922 MB

a d a e lic
[celladmin@qr01cel01

r Y
At this point, you b l
have configured
a write back flash cache and you have confirmed that it is
m a
being used.
f e
Over timer you would see more dirty data reported in the cache as you transact
u s
an of this practice, you will reconfigure the cells once more and revert back to
nuInkthenfinal
against your databases.
e - trpart
V writenothrough flash cache.
16. Return to you root terminal session and shut down the Oracle Database, ASM, and Grid
Infrastructure. Do not proceed to the next step until this step completes.
[root@qr01db01 grid]# crsctl stop crs
CRS-2791: Starting shutdown of Oracle High Availability Services-managed
resources on 'qr01db01'
CRS-2673: Attempting to stop 'ora.crsd' on 'qr01db01'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on
'qr01db01'
CRS-2673: Attempting to stop 'ora.oc4j' on 'qr01db01'
CRS-2673: Attempting to stop 'ora.qr01db02.vip' on 'qr01db01'
...
CRS-2673: Attempting to stop 'ora.net1.network' on 'qr01db01'
CRS-2677: Stop of 'ora.net1.network' on 'qr01db01' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'qr01db01'
has completed
CRS-2677: Stop of 'ora.crsd' on 'qr01db01' succeeded
CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'qr01db01'

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Recommendations for Optimizing Database Performance


Chapter 8 - Page 6
...
CRS-2677: Stop of 'ora.diskmon' on 'qr01db01' succeeded
CRS-2677: Stop of 'ora.gpnpd' on 'qr01db01' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on
'qr01db01' has completed
CRS-4133: Oracle High Availability Services has been stopped.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

[root@qr01db01 grid]#
Switching back to write through flash cache involves essentially the same steps as
switching to write back flash cache. However, because write back flash cache is currently
enabled note that you must first flush the flash cache before dropping it. Flushing Exadata
Smart Flash Cache ensures that all modified data is written to disk.
17. Flush the write back flash cache on all of the cells. Note that the flush operation may take a
few minutes to complete. If you receive a message indicating that the flush operation timed
out for some of the flash disks, repeat this step until your output matches the example
shown below.
a
[celladmin@qr01cel01 ~]$ dcli -c qr01cel01,qr01cel02,qr01cel03 cellcli -e \
> alter flashcache all flush ) has
qr01cel01: Flash cache qr01cel01_FLASHCACHE altered successfully
ฺ c om ฺ
i rco uide
qr01cel02: Flash cache qr01cel02_FLASHCACHE altered successfully

l li@ nt G
qr01cel03: Flash cache qr01cel03_FLASHCACHE altered successfully
a
18. Drop the Exadata Smart Flash Cache on all of the cells. av
a d t u de cellcli -e \
rฺy his S
[celladmin@qr01cel01 ~]$ dcli -c qr01cel01,qr01cel02,qr01cel03
a
um se successfully
t
> drop flashcache

n u k
qr01cel01: Flash cache qr01cel01_FLASHCACHE
u dropped

v e e to
qr01cel02: Flash cache qr01cel02_FLASHCACHE
( successfully dropped
qr01cel03: Flash cache
a i
ll ~]$ ens
qr01cel03_FLASHCACHE successfully dropped
v
a e lic
[celladmin@qr01cel01
d
19. Stop cellsrv Y a
on all of b l cells.
the
r a
a sfer ~]$ dcli -c qr01cel01,qr01cel02,qr01cel03 cellcli -e \
u m
[celladmin@qr01cel01
n shutdown services cellsrv
e nuk >qr01cel01:
n
alteracell
- t r
V noqr01cel01: Stopping CELLSRV services...
qr01cel01: The SHUTDOWN of CELLSRV services was successful.
qr01cel02:
qr01cel02: Stopping CELLSRV services...
qr01cel02: The SHUTDOWN of CELLSRV services was successful.
qr01cel03:
qr01cel03: Stopping CELLSRV services...
qr01cel03: The SHUTDOWN of CELLSRV services was successful.
[celladmin@qr01cel01 ~]$

20. Set the flashCacheMode attribute back to WriteThrough.


[celladmin@qr01cel01 ~]$ dcli -c qr01cel01,qr01cel02,qr01cel03 cellcli -e \
> alter cell flashCacheMode = WriteThrough
qr01cel01: Cell qr01cel01 successfully altered
qr01cel02: Cell qr01cel02 successfully altered
qr01cel03: Cell qr01cel03 successfully altered
[celladmin@qr01cel01 ~]$

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Recommendations for Optimizing Database Performance


Chapter 8 - Page 7
21. Restart cellsrv on all of the cells.
[celladmin@qr01cel01 ~]$ dcli -c qr01cel01,qr01cel02,qr01cel03 cellcli -e \
> alter cell startup services cellsrv
qr01cel01:
qr01cel01: Starting CELLSRV services...
qr01cel01: The STARTUP of CELLSRV services was successful.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

qr01cel02:
qr01cel02: Starting CELLSRV services...
qr01cel02: The STARTUP of CELLSRV services was successful.
qr01cel03:
qr01cel03: Starting CELLSRV services...
qr01cel03: The STARTUP of CELLSRV services was successful.
[celladmin@qr01cel01 ~]$
22. Re-create Exadata Smart Flash Cache on all the cells.
a
has
[celladmin@qr01cel01 ~]$ dcli -c qr01cel01,qr01cel02,qr01cel03 cellcli -e \
> create flashcache all
)
qr01cel01: Flash cache qr01cel01_FLASHCACHE successfully created
ฺ c om ฺ
rco uide
qr01cel02: Flash cache qr01cel02_FLASHCACHE successfully created
i
li@ nt G
qr01cel03: Flash cache qr01cel03_FLASHCACHE successfully created
[celladmin@qr01cel01 ~]$
a l
23. Verify the cell flashCacheMode attribute setting on all
a d aof vthe cells.
t u de
a rฺy his S
[celladmin@qr01cel01 ~]$ dcli -c qr01cel01,qr01cel02,qr01cel03 cellcli -e \
m
ku use
> list cell attributes flashCacheMode t
qr01cel01: WriteThrough n u
e e to
qr01cel02: WriteThrough(v
a i
ll ens
v
da le~]$lic
qr01cel03: WriteThrough

a
[celladmin@qr01cel01
24. Return toayour Yroot eterminal
r ab session and restart Grid Infrastructure, ASM, and Oracle
um ans
Database. f
u k tr
n [root@qr01db01
e n - grid]# crsctl start crs
V noCRS-4123: Oracle High Availability Services has been started.
[root@qr01db01 grid]#
25. Wait for a few minutes until your database restarts. Execute the following command to
monitor the status of the database. Proceed to the next practice only after your
database is started on qr01db01.
[root@qr01db01 grid]# srvctl status database -d dbm
Instance dbm1 is running on node qr01db01
Instance dbm2 is not running on node qr01db02
[root@qr01db01 grid]#
26. Exit all of your terminal sessions.

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Recommendations for Optimizing Database Performance


Chapter 8 - Page 8
Practice 8-2: Using Exadata Hybrid Columnar Compression
Overview
In this practice, you will examine the performance of Exadata Hybrid Columnar Compression.
You will compare predicted and actual compression ratios using an example dataset. You will
also examine how bulk data loading and query operations are affected using the different
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

compression modes.

Tasks
1. Establish a terminal connection to your database server as the oracle user.
2. Connect to your database with SQL*Plus. Log in as the sales user.
[oracle@qr01db01 ~]$ sqlplus sales/sales

SQL*Plus: Release 11.2.0.3.0 Production... a


) has
SQL>
ฺ c om ฺ
3. Configure the session to display server output and timing statistics. rco
@ i u ide
SQL> set serveroutput on
v a lli nt G
SQL> set timing on
a d a tude
SQL>
a rฺy his S
4. Use dbms_compression.get_compression_ratio
u k um se t to predict the expected
table u
Columnar Compression modes ( v en theeSQL
compression ratio for the MYCUSTOMERS
(use t using all the different Exadata Hybrid
o script
a llithat this
04.sql if you prefer).vNote e n s
step can take
/home/oracle/labs/lab08-02-
more than 10 minutes to complete.
a l i c
Y ad ble
SQL> declare

m
2
arb_cmp
s f e ra
number;

n u ku 4 trar_cmp
3
n number;
b_ucmp number;

e -
V non5 r_ucmp number;
6 cmp_ratio number(6,2);
7 cmp_type varchar2(1024);
8 begin
9 dbms_compression.get_compression_ratio('USERS','SALES',
10 'MYCUSTOMERS',NULL,DBMS_COMPRESSION.COMP_FOR_QUERY_LOW,
11 b_cmp,b_ucmp, r_cmp, r_ucmp, cmp_ratio, cmp_type);
12 dbms_output.put_line('Table: MYCUSTOMERS');
13 dbms_output.put_line('Compression Ratio: '||cmp_ratio);
14 dbms_output.put_line('Compression Type: '|| cmp_type);
15 end;
16 /
Compression Advisor self-check validation successful. select count(*) on both
Uncompressed and EHCC Compressed format = 1000001 rows
Table: MYCUSTOMERS
Compression Ratio: 4.2
Compression Type: "Compress For Query Low"

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Recommendations for Optimizing Database Performance


Chapter 8 - Page 9
PL/SQL procedure successfully completed.

Elapsed: 00:02:49.58
SQL> declare
2 b_cmp number;
3 b_ucmp number;
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

4 r_cmp number;
5 r_ucmp number;
6 cmp_ratio number(6,2);
7 cmp_type varchar2(1024);
8 begin
9 dbms_compression.get_compression_ratio('USERS','SALES',
10 'MYCUSTOMERS',NULL,DBMS_COMPRESSION.COMP_FOR_QUERY_HIGH,
11 b_cmp,b_ucmp, r_cmp, r_ucmp, cmp_ratio, cmp_type);
12 dbms_output.put_line('Table: MYCUSTOMERS');
a
has
13 dbms_output.put_line('Compression Ratio: '||cmp_ratio);
14 dbms_output.put_line('Compression Type: '|| cmp_type);
)
15 end;
ฺ c om ฺ
16 /
i rco uide
a l li@ nt G
Compression Advisor self-check validation successful. select count(*) on both

av tude
Uncompressed and EHCC Compressed format = 1000001 rows
Table: MYCUSTOMERS
a d
Compression Ratio: 7
a rฺy his S
u k um se t
Compression Type: "Compress For Query High"

t o u
en completed.
( v
lli ense
PL/SQL procedure successfully

v a
a e lic
a d
Elapsed: 00:02:47.54
l
r Y
SQL> declare
r a b
2 a b_cmp e
u m n s f number;

nuk n4-trar_cmp number;


3 b_ucmp number;
e
V no 5 r_ucmp number;
6 cmp_ratio number(6,2);
7 cmp_type varchar2(1024);
8 begin
9 dbms_compression.get_compression_ratio('USERS', 'SALES',
10 'MYCUSTOMERS',NULL,DBMS_COMPRESSION.COMP_FOR_ARCHIVE_LOW,
11 b_cmp,b_ucmp, r_cmp, r_ucmp, cmp_ratio, cmp_type);
12 dbms_output.put_line('Table: MYCUSTOMERS');
13 dbms_output.put_line('Compression Ratio: '||cmp_ratio);
14 dbms_output.put_line('Compression Type: '|| cmp_type);
15 end;
16 /
Compression Advisor self-check validation successful. select count(*) on both
Uncompressed and EHCC Compressed format = 1000001 rows
Table: MYCUSTOMERS
Compression Ratio: 9.1
Compression Type: "Compress For Archive Low"

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Recommendations for Optimizing Database Performance


Chapter 8 - Page 10
PL/SQL procedure successfully completed.

Elapsed: 00:02:32.60
SQL> declare
2 b_cmp number;
3 b_ucmp number;
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

4 r_cmp number;
5 r_ucmp number;
6 cmp_ratio number(6,2);
7 cmp_type varchar2(1024);
8 begin
9 dbms_compression.get_compression_ratio('USERS', 'SALES',
10 'MYCUSTOMERS',NULL,DBMS_COMPRESSION.COMP_FOR_ARCHIVE_HIGH,
11 b_cmp,b_ucmp, r_cmp, r_ucmp, cmp_ratio, cmp_type);
12 dbms_output.put_line('Table: MYCUSTOMERS');
a
has
13 dbms_output.put_line('Compression Ratio: '||cmp_ratio);
14 dbms_output.put_line('Compression Type: '|| cmp_type);
)
15 end;
ฺ c om ฺ
16 /
i rco uide
a l li@ nt G
Compression Advisor self-check validation successful. select count(*) on both

av tude
Uncompressed and EHCC Compressed format = 1000001 rows
Table: MYCUSTOMERS
a d
Compression Ratio: 11.1
a rฺy his S
u k um se t
Compression Type: "Compress For Archive High"

en completed.
t o u
( v
lli ense
PL/SQL procedure successfully

v a
a e lic
a d
Elapsed: 00:03:32.62
l
SQL>
r Y a b
5. Exadata
u m er Compression achieves its highest levels of compression with
aHybridsColumnar
f
n
k that tisradirect-path
e nudata - inserted. Execute the following ALTER SESSION commands to
nthe use of direct-path inserts later in the practice.
V ensure
noSQL> alter session force parallel query;

Session altered.

Elapsed: 00:00:00.00
SQL> alter session force parallel ddl;

Session altered.

Elapsed: 00:00:00.00
SQL> alter session force parallel dml;

Session altered.

Elapsed: 00:00:00.01
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Recommendations for Optimizing Database Performance


Chapter 8 - Page 11
6. Use the following commands (or execute the SQL script /home/oracle/labs/lab08-
02-06.sql) to create compressed copies of the MYCUSTOMERS table. Notice the relative
difference in the time taken to create each table by using the different compression modes.
SQL> create table mycust_query_low
2 compress for query low
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

3 nologging parallel 4
4 as select * from mycustomers;

Table created.

Elapsed: 00:00:13.53
SQL>
SQL> create table mycust_query_high
a
has
2 compress for query high
3 nologging parallel 4 )
4 as select * from mycustomers; ฺ c om ฺ
i rco uide
Table created. a l li@ nt G
a d av tude
Elapsed: 00:00:15.13
a rฺy his S
SQL>
u k um se t
e n to u
SQL> create table mycust_archive_low
v
l (
2 compress forli archivese low
v a e n
3 nologging
a d a parallel
e l ic 4
l
4 asYselect b* from mycustomers;
m ar sfera
n u kuTable
t r n
acreated.
e
V non -
Elapsed: 00:00:22.62
SQL>
SQL> create table mycust_archive_high
2 compress for archive high
3 nologging parallel 4
4 as select * from mycustomers;

Table created.

Elapsed: 00:01:13.98
SQL>
7. Use the following query (or execute the SQL script /home/oracle/labs/lab08-02-
07.sql) to compare the size of the original uncompressed table with the newly created
compressed copies. Calculate the compression ratios achieved using the formula:
Compression Ratio = Uncompressed Size / Compressed Size
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Recommendations for Optimizing Database Performance


Chapter 8 - Page 12
Compare the actual compression ratios achieved with the ones predicted in step 4.
SQL> col segment_name format a30
SQL> select segment_name,sum(bytes)/1024/1024 MB
2 from user_segments
3 where segment_name like 'MYCUST%'
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

4 group by segment_name;

SEGMENT_NAME MB
------------------------------ ----------
MYCUSTOMERS 208
MYCUST_QUERY_LOW 51
MYCUST_QUERY_HIGH 31
MYCUST_ARCHIVE_LOW 27
a
MYCUST_ARCHIVE_HIGH 19
) has
ฺ c om ฺ
rco uide
Elapsed: 00:00:02.74
i
li@ nt G
SQL>
In the next part of the practice, you will compare direct path insert a l
v samedtransaction
performance for compressed
d a u e
and uncompressed tables. On each occasion you will perform
ฺ y a
r consistent
the
S t twice. The
first time will help to prime the system in order to ensure
particular note of the timings for the second insert m acommand. t h s willresult.
iThis help
You should take
you to determine the
u k u on sbulk e
impact of Exadata Hybrid Columnar Compression
entransactions
t o u data loading operations.
8. As a baseline, execute the following( v
i time ntaken
lthe s e to perform
to load data into the uncompressed
MYCUSTOMERS table. Note
v a l e the second insert.
a l i c
SQL> insert
Y ad /*+APPEND
b l e */ into mycustomers
2 arselect r*afrom seed_data;
u m n s fe
k
nu 200000 tra rows created.
e
V no n -
Elapsed: 00:00:10.37
SQL> commit;

Commit complete.

Elapsed: 00:00:00.07
SQL> insert /*+APPEND */ into mycustomers
2 select * from seed_data;

200000 rows created.

Elapsed: 00:00:07.62
SQL> commit;

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Recommendations for Optimizing Database Performance


Chapter 8 - Page 13
Commit complete.

Elapsed: 00:00:00.03
SQL>
9. Execute the same insert transactions against the COMPRESS FOR QUERY LOW copy of the
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

table. Note the time taken to perform the second insert. You may observe that the time for
this insert is better than the uncompressed insert in step 8. In this case, the cost of
performing the compression is offset by the lower number of I/O operations that are
required. This characteristic is one of the reasons why query compression is well suited to
data warehouse environments where large data loads exist.
SQL> insert /*+APPEND */ into mycust_query_low
2 select * from seed_data;

a
has
200000 rows created.
)
Elapsed: 00:00:04.36
ฺ c om ฺ
SQL> commit;
i rco uide
a l li@ nt G
Commit complete.
a d av tude
a rฺy his S
Elapsed: 00:00:00.04
SQL> insert /*+APPEND */uinto k ummycust_query_low
s e t
v en e to u
2 select * from (seed_data;
v a lli ens
200000 rowsa dacreated.
l e lic
a r Y erab
u f
m ns00:00:03.07
k Elapsed:
nu SQL> a
trcommit;
e
V no n -
Commit complete.

Elapsed: 00:00:00.03
SQL>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Recommendations for Optimizing Database Performance


Chapter 8 - Page 14
10. Execute the same insert transactions against the COMPRESS FOR QUERY HIGH copy of
the table. Note the time taken to perform the second insert and compare it with the previous
results.
SQL> insert /*+APPEND */ into mycust_query_high
2 select * from seed_data;
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

200000 rows created.

Elapsed: 00:00:03.25
SQL> commit;

Commit complete.

a
Elapsed: 00:00:00.04
) has
om ฺ
SQL> insert /*+APPEND */ into mycust_query_high
ฺ c
rco uide
2 select * from seed_data;
i
a l li@ nt G
av tude
200000 rows created.
a d
Elapsed: 00:00:03.29 a rฺy his S
SQL> commit;
u k um se t
( v en e to u
Commit complete.lli
v a c e ns
da le li
a00:00:00.08
r
Elapsed:
a Y r ab
um ans
SQL> f e
u k tr same insert transactions against the COMPRESS FOR ARCHIVE LOW copy of
11.n Execute-the
e n
V thenotable. Note the time taken to perform the second insert. You should observe that the
load times are steadily increasing as more aggressive compression modes are used.
SQL> insert /*+APPEND */ into mycust_archive_low
2 select * from seed_data;

200000 rows created.

Elapsed: 00:00:03.74
SQL> commit;

Commit complete.

Elapsed: 00:00:00.04
SQL> insert /*+APPEND */ into mycust_archive_low
2 select * from seed_data;

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Recommendations for Optimizing Database Performance


Chapter 8 - Page 15
200000 rows created.

Elapsed: 00:00:03.83
SQL> commit;
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Commit complete.

Elapsed: 00:00:00.02
SQL>

12. Execute the insert transaction against the COMPRESS FOR ARCHIVE HIGH copy of the
table. Note the time taken to perform the second insert. This time you should observe a
a
) has
more substantial cost for the data compression. This is because COMPRESS FOR ARCHIVE
HIGH uses a more costly compression algorithm to achieve higher levels of compression.
c om ฺ
This extra cost is generally acceptable in archiving situations because the data does not

change (or changes very little) after it is loaded.
i rco uide
l
SQL> insert /*+APPEND */ into mycust_archive_high
a li@ nt G
2 select * from seed_data;
a d av tude
a rฺy his S
200000 rows created.
u k um se t
( v en e to u
Elapsed: 00:00:05.81
SQL> commit; va
lli ens
a da le lic
a r Ycomplete.
e r ab
Commit
um ans f
u k
n Elapsed:tr 00:00:00.03
e n -
V noSQL> insert /*+APPEND */ into mycust_archive_high
2 select * from seed_data;

200000 rows created.

Elapsed: 00:00:05.71
SQL> commit;

Commit complete.

Elapsed: 00:00:00.03
SQL>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Recommendations for Optimizing Database Performance


Chapter 8 - Page 16
In the final part of the practice, you will compare query performance for compressed and
uncompressed tables.
13. Reconnect to your database as the sales user. This clears the session-level statistics,
which will be used later to compare query performance.
SQL> connect sales/sales
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Connected.
SQL>
14. Execute the following test query against the uncompressed table. Note the time taken to
execute the query.
SQL> select avg(cust_credit_limit) from mycustomers;

AVG(CUST_CREDIT_LIMIT)
----------------------
a
6176.17987
) has
ฺ c om ฺ
rco uide
Elapsed: 00:00:09.07
i
li@
SQL>
a l n t G
d v
15. Examine the I/O statistics for the query you just ran (use the SQL script
a Thistuwilldeprovide a baseline for
/home/oracle/labs/lab08-02-15.sql if you prefer).
later comparison.
a
rฺy his S
a
SQL> select a.name, b.value/1024/1024
u k um MBse t
2 from v$sysstat a, v$mystat
3 where a.statistic#(v
en eb to uand
4 (a.name in v a lli eread ns total bytes',
= b.statistic#
('physical
da 'physical c
li write total bytes',
5
Y a l e
b IO uncompressed bytes')
6
a r e r a'cell
u m ns
7 or f
a.name like 'cell phy%');
k
nu NAME tra
e n -
V no---------------------------------------------------------------- ---------- MB

physical read total bytes 291.875


physical write total bytes 0
cell physical IO interconnect bytes 18.3570175
cell physical IO bytes saved during optimized file creation 0
cell physical IO bytes saved during optimized RMAN file restore 0
cell physical IO bytes eligible for predicate offload 291.859375
cell physical IO bytes saved by storage index 0
cell physical IO bytes sent directly to DB node to balance CPU 0
cell physical IO interconnect bytes returned by smart scan 18.3413925
cell IO uncompressed bytes 291.859375

10 rows selected.

Elapsed: 00:00:00.14
SQL>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Recommendations for Optimizing Database Performance


Chapter 8 - Page 17
16. Reconnect to your database as the sales user.
SQL> connect sales/sales
Connected.
SQL>
17. Execute the following test query against the COMPRESS FOR QUERY LOW copy of the
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

table. Compare the time taken to execute the query with the query performance observed in
step 14.
SQL> select avg(cust_credit_limit) from mycust_query_low;

AVG(CUST_CREDIT_LIMIT)
----------------------
6176.17987
a
Elapsed: 00:00:07.06
) has
SQL>
c o m
18. Examine the I/O statistics for the query you just ran (use the SQL scriptco ฺ e ฺ
/home/oracle/labs/lab08-02-15.sql if you prefer). Compare the statistics i r i d
u with the
results observed in step 15. Note the substantial decrease inathe l li@ t G
I/O required
n to satisfy the
a v e
query.
ฺ y a d
S t ud
SQL> select a.name, b.value/1024/1024 MB
2 from v$sysstat a, v$mystat b m
ar this
n
3 where a.statistic# = b.statistic#u ku uand se
4 (a.name in ('physical
( v eread etotal
to bytes',
a i
ll ewrite n s total bytes',
5
v'physical
c
6
7 or Y adalike 'cell lIO
b l e i uncompressed bytes')
a r a.name
r a 'cell phy%');

k u m nsfe
NAME
- t a
nu ----------------------------------------------------------------
r MB
e n
V nophysical ----------
read total bytes 79.6796875
physical write total bytes 0
cell physical IO interconnect bytes 12.45961
cell physical IO bytes saved during optimized file creation 0
cell physical IO bytes saved during optimized RMAN file restore 0
cell physical IO bytes eligible for predicate offload 72.5625
cell physical IO bytes saved by storage index 0
cell physical IO bytes sent directly to DB node to balance CPU 0
cell physical IO interconnect bytes returned by smart scan 5.34242249
cell IO uncompressed bytes 247.398615

10 rows selected.

Elapsed: 00:00:00.01
SQL>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Recommendations for Optimizing Database Performance


Chapter 8 - Page 18
19. Reconnect to your database as the sales user.
SQL> connect sales/sales
Connected.
SQL>
20. Execute the following test query against the COMPRESS FOR QUERY HIGH copy of the
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

table. Compare the time taken to execute the query with the query performance observed
previously.
SQL> select avg(cust_credit_limit) from mycust_query_high;

AVG(CUST_CREDIT_LIMIT)
----------------------
6176.17987
a
Elapsed: 00:00:04.23
) has
SQL>
ฺ c om ฺ
21. Examine the I/O statistics for the query you just ran (use the SQL script
i r co uide
/home/oracle/labs/lab08-02-15.sql if you prefer). Compare
a l li@ then t
statistics with the
G the query.
d v
results observed previously. Note again the decline in the I/O required
a tude to satisfy
SQL> select a.name, b.value/1024/1024 MB a
rฺy his S
2 from v$sysstat a, v$mystat b a
3 where a.statistic# = b.statistic#
u k um and s e t
4 (a.name in ('physical read n total
ewrite t o ubytes',
5 (
'physicalv se
li IO euncompressed
total bytes',

v a l n
6
a 'cell
l i c bytes')

Y ad ble
7 or a.name like 'cell phy%');

m ar sfera
k u
NAME
n MB

e nu physical
n - tra read total bytes
---------------------------------------------------------------- ----------
V nophysical write total bytes 52.96875
0
cell physical IO interconnect bytes 11.8664856
cell physical IO bytes saved during optimized file creation 0
cell physical IO bytes saved during optimized RMAN file restore 0
cell physical IO bytes eligible for predicate offload 45.984375
cell physical IO bytes saved by storage index 0
cell physical IO bytes sent directly to DB node to balance CPU 0
cell physical IO interconnect bytes returned by smart scan 4.8821106
cell IO uncompressed bytes 248.547052

10 rows selected.

Elapsed: 00:00:00.01
SQL>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Recommendations for Optimizing Database Performance


Chapter 8 - Page 19
22. Reconnect to your database as the sales user.
SQL> connect sales/sales
Connected.
SQL>
23. Execute the following test query against the COMPRESS FOR ARCHIVE LOW copy of the
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

table. Compare the time taken to execute the query with the query performance observed in
previously.
SQL> select avg(cust_credit_limit) from mycust_archive_low;

AVG(CUST_CREDIT_LIMIT)
----------------------
6176.17987
a
Elapsed: 00:00:03.50
) has
SQL>
ฺ c om ฺ
24. Examine the I/O statistics for the query you just ran (use the SQL script
i r co uide
/home/oracle/labs/lab08-02-15.sql if you prefer). Compare
results observed previously. Note the continued decline in v a
the
li@
lI/O the statistics with the
n t
required
Gto satisfy the
d a d e
query.
r ฺ y a S tu
SQL> select a.name, b.value/1024/1024 MB
2 from v$sysstat a, v$mystat bum
a this
n u k uand se
eread etotal
3 where a.statistic# = b.statistic#
( v to bytes',
4 (a.name in ('physical
a i
ll ewrite ns total bytes',
5
v'physical
da 'cell c
lIOi uncompressed bytes')
6
Y a l e
7 or
a f ab 'cell phy%');
r a.nameerlike
k m ns
uNAME
u - t r a
n ---------------------------------------------------------------- MB
e n
V nophysical ----------
read total bytes 49.3203125
physical write total bytes 0
cell physical IO interconnect bytes 11.5118637
cell physical IO bytes saved during optimized file creation 0
cell physical IO bytes saved during optimized RMAN file restore 0
cell physical IO bytes eligible for predicate offload 42.046875
cell physical IO bytes saved by storage index 0
cell physical IO bytes sent directly to DB node to balance CPU 0
cell physical IO interconnect bytes returned by smart scan 4.23842621
cell IO uncompressed bytes 249.937677

10 rows selected.

Elapsed: 00:00:00.01
SQL>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Recommendations for Optimizing Database Performance


Chapter 8 - Page 20
25. Reconnect to your database as the sales user.
SQL> connect sales/sales
Connected.
SQL>
26. Execute the following test query against the COMPRESS FOR ARCHIVE HIGH copy of the
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

table. Compare the time taken to execute the query with the query performance observed
previously. Note that in all cases, the queries against the compressed tables outperformed
the query against the uncompressed table. With compression, you will often observe
improved query performance for scanning queries because less I/O is required.
SQL> select avg(cust_credit_limit) from mycust_archive_high;

AVG(CUST_CREDIT_LIMIT)
----------------------
a
6176.17987
) has
ฺ c om ฺ
rco uide
Elapsed: 00:00:03.53
SQL> i
27. Examine the I/O statistics for the query you just ran (use the a l
SQL
li@scriptnt
G
d v
a Compare dethe statistics with the
/home/oracle/labs/lab08-02-15.sql if you prefer).
a t u
a rฺyin the
results previously observed. Note again the decline
h i I/OS
s required to satisfy the query.

k
SQL> select a.name, b.value/1024/1024
u um MBse t
=e
2 from v$sysstat a, v$mystat
3 where a.statistic#(v
n to uand
b

a lli eread setotal bytes',


b.statistic#
n
v
4 (a.name in ('physical
da 'physicallic write total bytes',
5
a
Y ra'cell l e
b IO uncompressed bytes')
6
a r
u m s
7 or a.name
n fe like 'cell phy%');
k
nu NAME tra
e n -
V no---------------------------------------------------------------- ---------- MB

physical read total bytes 34.125


physical write total bytes 0
cell physical IO interconnect bytes 9.19754791
cell physical IO bytes saved during optimized file creation 0
cell physical IO bytes saved during optimized RMAN file restore 0
cell physical IO bytes eligible for predicate offload 28.265625
cell physical IO bytes saved by storage index 0
cell physical IO bytes sent directly to DB node to balance CPU 0
cell physical IO interconnect bytes returned by smart scan 3.33817291
cell IO uncompressed bytes 247.281427

10 rows selected.

Elapsed: 00:00:00.01
SQL>
28. Exit your SQL*Plus session.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Recommendations for Optimizing Database Performance


Chapter 8 - Page 21
Practice 8-3: Testing Index Elimination
Overview
In this practice, you make an index invisible so that you can test the effect of removing the index
on your queries without actually dropping the index.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Tasks
1. Establish a terminal connection to your database server.
2. Connect to your database with SQL*Plus. Log in as the sales user.
[oracle@qr01db01 ~]$ sqlplus sales/sales

SQL*Plus: Release 11.2.0.3.0 Production...

a
SQL>
3. Configure your session to display timing statistics and execution plans. Then flush )theh
as
database buffer cache to ensure consistent results in the following steps. com

SQL> set timing on i rco uideฺ
SQL> set autotrace on explain
a l li@ nt G
SQL> alter system flush buffer_cache;dav de
a t u
a rฺy his S
System altered.
u k um se t
v e n to u
Elapsed: 00:00:00.47
l (
li ense
v a
SQL>
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Recommendations for Optimizing Database Performance


Chapter 8 - Page 22
4. Execute the following query. Note that the execution plan uses an index range scan on the
CUSTOMERS_PK index. Note also the time taken to execute the query using the index.
SQL> select avg(cust_credit_limit) from customers
2 where cust_id between 200000 and 320000;

AVG(CUST_CREDIT_LIMIT)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

----------------------
7682.74014

Elapsed: 00:00:06.43

Execution Plan
----------------------------------------------------------
Plan hash value: 3995619262
a
has
------------------------------------------------------------------------------
)
om ฺ
| Id | Operation | Name | Rows | Bytes | Cost
ฺ c
rco uide
------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | i 10 | 9837
| 1 | SORT AGGREGATE | |
a l li@ nt G
1 | 10 |
| 2 | TABLE ACCESS BY INDEX ROWID| CUSTOMERS
a d av tude
| 120K| 1171K| 9837

rฺy his S
|* 3 | INDEX RANGE SCAN | CUSTOMERS_PK | 120K| | 260
a
------------------------------------------------------------------------------

u k um se t
en e by u
tooperation
( v
Predicate Informationi (identified
l s
a l
v lice n
id):

d
a blea
---------------------------------------------------

a Y
3 -r access("CUST_ID">=200000
r a AND "CUST_ID"<=320000)
m ns
uSQL> f e
k
n n-tra
u
e
V5. Reconfigure
no your session to disable the automatic output of execution plans.
SQL> set autotrace off
SQL>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Recommendations for Optimizing Database Performance


Chapter 8 - Page 23
6. Make the CUSTOMERS_PK index invisible. An invisible index still exists and is maintained by
DML operations, but it is not used by the optimizer for queries.
SQL> alter index customers_pk invisible;

Index altered.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Elapsed: 00:00:00.35
SQL>

7. The index you have just made invisible is associated with a primary key constraint. Use the
following query to check the status of the constraint. Note that even though the index is
invisible, the associated constraint is still enabled.
SQL> select status from user_constraints
a
has
2 where constraint_name='CUSTOMERS_PK';
)
STATUS
ฺ c om ฺ
--------
i rco uide
ENABLED
a l li@ nt G
Elapsed: 00:00:00.64
a d av tude
SQL>
a rฺy his S
8. Reconfigure your session to automatically
k m execution
ushow e t plans.
SQL> set autotrace oneexplain
u
n to u s
( v
SQL>
v a lli ense
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Recommendations for Optimizing Database Performance


Chapter 8 - Page 24
9. Re-execute the query from step 4. Notice that an Exadata Smart Scan is used rather than
an index range scan.
SQL> select avg(cust_credit_limit) from customers
2 where cust_id between 200000 and 320000;

AVG(CUST_CREDIT_LIMIT)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

----------------------
7682.74014

Elapsed: 00:00:19.45

Execution Plan
----------------------------------------------------------
Plan hash value: 296924608
a
has
------------------------------------------------------------------------------
)
om ฺ
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)|
ฺ c
------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 |
i rco uide
10 | 12093 (1)|
| 1 | SORT AGGREGATE | |
a l li@ nt G
1 | 10 | |
|* 2 | TABLE ACCESS STORAGE FULL| CUSTOMERS |
a d av tude
120K| 1171K| 12093 (1)|

rฺy his S
------------------------------------------------------------------------------
a
u k um se t
en e by
Predicate Information (identified
t u
ooperation id):
( v
v a lli ens
---------------------------------------------------

a da le lic
2 - storage("CUST_ID"<=320000 AND "CUST_ID">=200000)

a r Y r a b
filter("CUST_ID"<=320000 AND "CUST_ID">=200000)
m ns
uSQL> f e
k
n n-tra
u
e
VCompare
nothe time taken to execute the query with and without the index. Note that in some
cases, Exadata Smart Scan may deliver better query performance than using an index.
However, this may not always be the case. Even in cases where an index delivers better query
performance you might choose to remove it if you determine that the un-indexed query
performance is acceptable and the index is otherwise unnecessary. Removing unnecessary
indexes saves space and improves DML performance by eliminating the maintenance
operations associated with the index. If you decide not to remove the index, you can quickly and
easily make it visible.
10. Make the index visible again.
SQL> alter index customers_pk visible;

Index altered.

Elapsed: 00:00:00.04
SQL>
11. Exit your SQL*Plus session.

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Recommendations for Optimizing Database Performance


Chapter 8 - Page 25
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a
) has
ฺ c om ฺ
i rco uide
a l li@ nt G
a d av tude
a rฺy his S
u k um se t
( v en e to u
v a lli ens
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 8: Recommendations for Optimizing Database Performance


Chapter 8 - Page 26
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a
) has
ฺ c om ฺ
i rco uide
Practices for a l i@ t G9: Using
lLesson
d a v den
Smart
r ฺ y aScanStu
m a 9 this
u u
k use
Chapter

v n
e e to
i (
ll ens
v a
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9: Using Smart Scan


Chapter 9 - Page 1
Practices for Lesson 9
Practices Overview
In these practices, you will exercise Exadata Smart Scan and examine various statistics and
wait events to determine what is occurring.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a
) has
ฺ c om ฺ
i rco uide
a l li@ nt G
a d av tude
a rฺy his S
u k um se t
( v en e to u
v a lli ens
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9: Using Smart Scan


Chapter 9 - Page 2
Practice 9-1: Monitoring Exadata Smart Scan
Overview
In this practice, you will examine various Exadata Smart Scan statistics and measures which
can be observed within Oracle Database.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Tasks
1. Establish a terminal connection to qr01db01 as the oracle user.
2. Connect to your database with SQL*Plus. Login as the sales user.
[oracle@qr01db01 ~]$ sqlplus sales/sales

SQL*Plus: Release 11.2.0.3.0 Production...

a
has
SQL>
)
3. Flush the buffer cache to ensure a consistent starting point for this practice, and reconnect
m
to the database to reset the session statistics. Then, configure your session ฺ toodisplay
c
query execution plans and statement timings.
i rco uideฺ
SQL> alter system flush buffer_cache;
a l li@ nt G
a d av tude
System altered.
a rฺy his S
u k um se t
SQL> connect sales/sales
( v en e to u
Connected.
v a lli on eexplain
ns
da lon
SQL> set autotrace
li c
SQL> set atiming e
SQL>ar
Y r ab
um ans f e
u k
n n-tr
e
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9: Using Smart Scan


Chapter 9 - Page 3
4. Execute the following query. You can identify whether Smart Scan is possible by examining
the query execution plan. Smart Scan is indicated for this query by the TABLE ACCESS
STORAGE FULL operation. You can also see that the WHERE clause predicate
(occupation = 'Farming') can be evaluated by Exadata.
SQL> select count(*) from cust_info where occupation = 'Farming';
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

COUNT(*)
----------
13845

Elapsed: 00:00:03.58

Execution Plan
----------------------------------------------------------
Plan hash value: 1273666552 a
) has
om(%CPU)|
------------------------------------------------------------------------------
| Rows | Bytes ฺ|cCost
rco uideฺ
| Id | Operation | Name
i
------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | |
a l l1i@
|
n
7 G
t | 4176 (1)|
| 1 | SORT AGGREGATE |
d | v
a| 115K| 1 |
de788K| 4176 (1)||
7 |
a t u
rฺy his S
|* 2 | TABLE ACCESS STORAGE FULL| CUST_INFO
a
um se t
------------------------------------------------------------------------------

u k u
( v en e by
Predicate Informationi (identified
tooperation
a l l n s id):

a v lice
---------------------------------------------------
d
Y a ble
2 -r storage("OCCUPATION"='Farming')
m f e ra
a filter("OCCUPATION"='Farming')
ku tran s
n u
Ve noSQL> n-
5. Reconfigure your session to disable the automatic output of execution plans.
SQL> set autotrace off
SQL>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9: Using Smart Scan


Chapter 9 - Page 4
6. Execute the following query (or execute the SQL script /home/oracle/labs/lab09-
01-06.sql) and examine the statistics for the current session. Since the query in step 4 is
the only query that has been executed during this session we can safely assume that the
statistics relate to that query. The statistics show that approximately 120 MB of I/O was
performed to scan the cust_info table (physical read total bytes), and that
almost all of the I/O was eligible for Smart Scan (cell physical IO bytes eligible
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

for predicate offload). The statistics further show that Smart Scan returned
approximately 200 KB of data back to the database server (cell physical IO
interconnect bytes returned by smart scan).
SQL> SELECT s.name, m.value/1024/1024 MB FROM V$SYSSTAT s, V$MYSTAT m
2 WHERE s.statistic# = m.statistic# AND
3 (s.name LIKE 'physical%total bytes' OR s.name LIKE 'cell phys%'
4 OR s.name LIKE 'cell IO%');

a
has
NAME MB
---------------------------------------------------------------- ----------
)
physical read total bytes
ฺ c om ฺ 119.875

rco uide
physical write total bytes 0
cell physical IO interconnect bytes i .555992126

a l li@ nt G
cell physical IO bytes saved during optimized file creation 0

d av tude
cell physical IO bytes saved during optimized RMAN file restore
a
0

a rฺy his S
cell physical IO bytes eligible for predicate offload 119.523438

um se t
cell physical IO bytes saved by storage index 0

u k
cell physical IO bytes sent directly to DB node to balance CPU 0

v en e to u
cell physical IO interconnect bytes returned by smart scan
(
.204429626

v a lli ens
cell IO uncompressed bytes 119.523438

a da le lic
r Y erab
10 rows selected.
a f
m n00:00:00.11
s
k u
Elapsed:

e nu SQL>
n - tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9: Using Smart Scan


Chapter 9 - Page 5
7. Execute the following query (or execute the SQL script /home/oracle/labs/lab09-
01-07.sql) and examine the cell wait events associated with the current session. Note
that the amount of time associated with the cell smart table scan wait event
accounts for most of the execution time observed in step 4. This is normal for a query using
Smart Scan. You may also see some other wait events that relate to other activities in the
session, such as executing the statistics queries in this step and the prior step.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

SQL> SELECT DISTINCT event, total_waits,


2 time_waited/100 wait_secs, average_wait/100 avg_wait_secs
3 FROM V$SESSION_EVENT e, V$MYSTAT s
4 WHERE event LIKE 'cell%' AND e.sid = s.sid;

EVENT TOTAL_WAITS
---------------------------------------------------------------- -----------
WAIT_SECS AVG_WAIT_SECS
---------- ------------- a
cell smart table scan 37
) has
om ฺ
3.05 .0824
ฺ c
cell single block physical read i rco uide 75
1.09 .0145
a l li@ nt G
a d av tude
Elapsed: 00:00:00.10 a rฺy his S
SQL>
u k um se t
Examining the statistics and wait events enassociated
t o uwith the query executed at step 4 indicates
( v e Smart Scan just as the query execution plan
that the query did make efficient
v a lliuse e n syou
of Exadata
suggested. In the next part
d a of this
l i c
practice will consider a scenario where the query
execution plan indicates
Y a the buseleof Smart Scan but the statistics and wait events suggest
r
a sfera
something more.
8. Leave m
ku your nthe oracle
current SQL session active and establish a second terminal connection to
n u - t r a
as user.
Ve9. Inntheonsecond
qr01db01
terminal, connect to your database with SQL*Plus. Log in as the sales user
and set the SQL prompt to UPDATE> so that you can easily distinguish this session from
your other SQL session.
[oracle@qr01db01 ~]$ sqlplus sales/sales

SQL*Plus: Release 11.2.0.3.0 Production...

SQL> set sqlprompt "UPDT> "


UPDT>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9: Using Smart Scan


Chapter 9 - Page 6
10. In the second terminal, execute the following command to update a substantial number of
customer records. Following the update, flush the buffer cache. This simulates a long
running update transaction where the updated blocks (and associated rollback segment
blocks) have been aged out of the buffer cache. Leave the transaction in this terminal
window uncommitted for now. Do not proceed to the next step until the update
command completes and the buffer cache is flushed.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

UPDT> update cust_info set


2 affinity_card = 0
3 where occupation = 'Farming';

13845 rows updated.

UPDT> alter system flush buffer_cache;


a
System altered.
) has
ฺ c om ฺ
UPDT>
i rco uide
11. Switch back to your first SQL session, leaving the second terminal
a l l i@session
t Gin the
background for now.
a v de n
y a
12. Back in the first SQL session, reconnect to the database d tu a fresh database
to establish
session as the sales user. r ฺ
a this S
u m
SQL> connect sales/salesuk
n u se
Connected. ( v e e to
a i
ll ens
SQL>
v
dacreated ic to display query execution plans.
lsession
a
13. Configure your newly l e
Y rab on explain
SQL>arset autotrace
u m
SQL> ans
fe
k
nu n-tr
e
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9: Using Smart Scan


Chapter 9 - Page 7
14. Re-execute the query from step 4. Notice again that the query execution plan indicates the
use of Smart Scan. Notice also that the execution time increases substantially compared
with step 4.
SQL> select count(*) from cust_info where occupation = 'Farming';

COUNT(*)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

----------
13845

Elapsed: 00:00:06.05

Execution Plan
----------------------------------------------------------
Plan hash value: 1273666552

a
has
------------------------------------------------------------------------------
)
om ฺ
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)|

ฺ c
------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 |
i rco uide
7 | 4176 (1)|
| 1 | SORT AGGREGATE | |
l
1 |
a li@ nt G
7 | |
|* 2 | TABLE ACCESS STORAGE FULL| CUST_INFO |
a d av tude
115K| 788K| 4176 (1)|

rฺy his S
------------------------------------------------------------------------------
a
u k um se t
en e by
Predicate Information (identified
t u
ooperation id):
( v
v a lli ens
---------------------------------------------------

a da le lic
2 - storage("OCCUPATION"='Farming')

a Y rab
rfilter("OCCUPATION"='Farming')
k u m nsfe
e nu n-tra
SQL>
V15. Reconfigure
no your session to disable the automatic output of execution plans.
SQL> set autotrace off
SQL>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9: Using Smart Scan


Chapter 9 - Page 8
16. Execute the following query (or execute the SQL script /home/oracle/labs/lab09-
01-06.sql) and examine the statistics for the current session. Compare the output with
the observations at step 6. This time the same amount of I/O is eligible for Smart Scan
(cell physical IO bytes eligible for predicate offload); however,
substantially more data was transported to the database server (cell physical IO
interconnect bytes returned by smart scan).
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

SQL> SELECT s.name, m.value/1024/1024 MB FROM V$SYSSTAT s, V$MYSTAT m


2 WHERE s.statistic# = m.statistic# AND
3 (s.name LIKE 'physical%total bytes' OR s.name LIKE 'cell phys%'
4 OR s.name LIKE 'cell IO%');

NAME MB
---------------------------------------------------------------- ----------
physical read total bytes 121.90625
a
has
physical write total bytes 0
cell physical IO interconnect bytes 73.2464371
)
ฺ c om ฺ
cell physical IO bytes saved during optimized file creation 0

rco uide
cell physical IO bytes saved during optimized RMAN file restore 0
i
cell physical IO bytes eligible for predicate offload 119.523438

a l
cell physical IO bytes saved by storage index li@ nt G 0

d av tude
cell physical IO bytes sent directly to DB node to balance CPU
a
0

a rฺy his S
cell physical IO interconnect bytes returned by smart scan 70.8636246

um se t
cell IO uncompressed bytes 119.523438

u k
10 rows selected.
( v en e to u
v a lli ens
da le lic
Elapsed: 00:00:00.00
a
r Y erab
SQL>

a
m nsf
k u
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9: Using Smart Scan


Chapter 9 - Page 9
17. Execute the following query (or execute the SQL script /home/oracle/labs/lab09-
01-07.sql) and examine the cell wait events associated with the current session.
Compare the output with the observations at step 7. Notice that this time a significant
amount of time is associated with the cell single block physical read wait event.
This is because the uncommitted update transaction has forced a substantial number of
reads to be transferred to the traditional buffer cache read-consistency path and since the
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

required blocks were not in the buffer cache a large number of single block physical reads
were required. Notice also the amount of time associated with the different wait events and
how they correlate with the overall query execution time. Clearly, the efficiency and
performance of Smart Scan were severely compromised by the pending transaction.
SQL> SELECT DISTINCT event, total_waits,
2 time_waited/100 wait_secs, average_wait/100 avg_wait_secs
3 FROM V$SESSION_EVENT e, V$MYSTAT s
4 WHERE event LIKE 'cell%' AND e.sid = s.sid;

a
EVENT TOTAL_WAITS
) has
om ฺ
---------------------------------------------------------------- -----------
WAIT_SECS AVG_WAIT_SECS
ฺ c
---------- -------------
i rco uide
cell smart table scan
a l li@ nt G 65
1.54 .0236
a d av tude
cell single block physical read
a rฺy his S 305
4.34 .0142 m
ku use t
n u
e e to
i ( v
Elapsed: 00:00:00.11
v a ll ens
SQL>
a da le lic
In the final
a rpartYof this
e r b you will consider another scenario where the query
apractice,
um plan
execution
n s f
indicates the use of Smart Scan but the statistics and wait events suggest
u k
n n-t
something r a
different.
Ve18. Switch
no back to the second SQL session which contains the update transaction.

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9: Using Smart Scan


Chapter 9 - Page 10
19. Commit the current transaction and then execute another update command to update a
substantial number of customer records. This time, do not flush the buffer cache after the
update command. Like you did in step 10, leave the transaction in this terminal
window uncommitted for now. Do not proceed to the next step until the update
command completes.
UPDT> commit;
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Commit complete.

UPDT> update cust_info set


2 affinity_card = 1
3 where occupation = 'Farming';

13845 rows updated. a


) has
UPDT>
ฺ c om ฺ
20. Back in the first SQL session, reconnect to the database to establish a
i r o database
cfresh ide
session as the sales user. @
lli nt G u
SQL> connect sales/sales v a
a tude
a d
Connected.
a rฺy his S
SQL>
u k um se t
21. Configure your newly created session
e n to uquery execution plans.
display
t o
v explain
li (on se
SQL> set autotrace
v a l e n
SQL>
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9: Using Smart Scan


Chapter 9 - Page 11
22. Re-execute the query from step 4. Notice again that the query execution plan indicates the
use of Smart Scan. Notice also the execution time difference compared with the previous
runs.
SQL> select count(*) from cust_info where occupation = 'Farming';

COUNT(*)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

----------
13845

Elapsed: 00:00:00.35

Execution Plan
----------------------------------------------------------
Plan hash value: 1273666552

a
has
------------------------------------------------------------------------------
)
om ฺ
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)|

ฺ c
------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 |
i rco uide
7 | 4176 (1)|
| 1 | SORT AGGREGATE | |
l
1 |
a li@ nt G
7 | |
|* 2 | TABLE ACCESS STORAGE FULL| CUST_INFO |
a d av tude
115K| 788K| 4176 (1)|

rฺy his S
------------------------------------------------------------------------------
a
u k um se t
en e by
Predicate Information (identified
t u
ooperation id):
( v
v a lli ens
---------------------------------------------------

a da le lic
2 - storage("OCCUPATION"='Farming')

a Y rab
rfilter("OCCUPATION"='Farming')
k u m nsfe
e nu n-tra
SQL>
V23. Reconfigure
no your session to disable the automatic output of execution plans.
SQL> set autotrace off
SQL>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9: Using Smart Scan


Chapter 9 - Page 12
24. Execute the following query (or execute the SQL script /home/oracle/labs/lab09-
01-06.sql) and examine the statistics for the current session. Now the statistics relate to
the query at step 22. Notice that all the statistics are zero (or very near to zero).
SQL> SELECT s.name, m.value/1024/1024 MB FROM V$SYSSTAT s, V$MYSTAT m
2 WHERE s.statistic# = m.statistic# AND
3 (s.name LIKE 'physical%total bytes' OR s.name LIKE 'cell phys%'
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

4 OR s.name LIKE 'cell IO%');

NAME MB
---------------------------------------------------------------- ----------
physical read total bytes 0
physical write total bytes 0
cell physical IO interconnect bytes 0
cell physical IO bytes saved during optimized file creation 0
cell physical IO bytes saved during optimized RMAN file restore 0 a
cell physical IO bytes eligible for predicate offload 0
) has
cell physical IO bytes saved by storage index 0
ฺ c om ฺ
rco uide
cell physical IO bytes sent directly to DB node to balance CPU 0
cell physical IO interconnect bytes returned by smart scan i 0
cell IO uncompressed bytes
a l li@ nt G0

a d av tude
rฺy his S
10 rows selected.
a
Elapsed: 00:00:00.00
u k um se t
SQL>
( v en e to u
25. Execute the following query
v a lli(or execute
e ns events
the SQL script /home/oracle/labs/lab09-
01-07.sql) and examine a e li
dtime the c
cell wait associated with the current session. This
a l
r Y realized
time the amount
databaseakernel
of
e r a
waiting
bthat the
for the
query
cells
could
is zero
be
(or very close to zero). This time, the
satisfied using blocks in the buffer cache.
m
u though
Sokeven s f
n the query plan indicted the use of Smart Scan, the database kernel used
n u t r a
Ve noSQL> n- SELECT DISTINCT and
the buffer cache at runtime avoided the need for I/O against the cells.
event, total_waits,
2 time_waited/100 wait_secs, average_wait/100 avg_wait_secs
3 FROM V$SESSION_EVENT e, V$MYSTAT s
4 WHERE event LIKE 'cell%' AND e.sid = s.sid;

no rows selected

Elapsed: 00:00:00.08
SQL>
In this practice you have seen a variety of scenarios where the optimizer indicated the use
of Smart Scan. However you have also seen that depending on the situation, the
performance of Smart Scan may be impacted by other concurrent transactions, or Smart
Scan may be skipped, partially or completely, if the database kernel can make use of
information in the buffer cache to avoid I/O operations.
26. Switch back to the second SQL session which contains the update transaction.

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9: Using Smart Scan


Chapter 9 - Page 13
27. Commit the transaction.
UPDATE> commit;

Commit complete.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

UPDATE>
28. Exit all your terminal sessions.

a
) has
ฺ c om ฺ
i rco uide
a l li@ nt G
a d av tude
a rฺy his S
u k um se t
( v en e to u
v a lli ens
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9: Using Smart Scan


Chapter 9 - Page 14
Practice 9-2: Monitoring Cell Wait Events for Parallel Query
Overview
In this practice, you consider strategies for monitoring cell wait events when parallel query is
used.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Tasks
1. Establish a terminal connection to qr01db01 as the oracle user.
2. Connect to your database with SQL*Plus. Log in as the sales user.
[oracle@qr01db01 ~]$ sqlplus sales/sales

SQL*Plus: Release 11.2.0.3.0 Production...

a
has
SQL>
3. Configure your session to display query execution plans and statement timings. )
ฺ c om ฺ
rco uide
SQL> set autotrace on explain
SQL> set timing on i
a l li@ nt G
SQL>
d v de
aparallel
4. Typically Exadata Smart Scan is used in conjunctionawith
r ฺ y S tuquery. Configure your
session to force the use of parallel query.
m a this
SQL> alter session force parallel
u u
k usequery parallel 2;
v n
e e to
Session altered.ll i (
v a c e ns
a da le li
Elapsed:
a Y
r 00:00:00.00
r ab
m ns
uSQL> f e
k
n n-tra
u
e
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9: Using Smart Scan


Chapter 9 - Page 15
5. Execute the following query. The query execution plan indicates the use of parallel query
and Exadata Smart Scan.
SQL> select count(*) from cust_info where occupation = 'Farming';

COUNT(*)
----------
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

13845

Elapsed: 00:01:19.23

Execution Plan
----------------------------------------------------------
Plan hash value: 3555626242

------------------------------------------------------------------------------
a
| Id | Operation | Name
has
| Rows | Bytes | Cost
)
om ฺ
------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | ฺ
1 | c 7 | 2317
| 1 | SORT AGGREGATE | |
i rco uide
1 | 7 |
| 2 | PX COORDINATOR |
a l li@ nt G
| | |
| 3 | PX SEND QC (RANDOM)
av tude
| :TQ10000 |
a d
1 | 7 |

rฺy his S
| 4 | SORT AGGREGATE | | 1 | 7 |
| 5 | PX BLOCK ITERATOR a | | 115K| 788K| 2317
|* 6 |
k um se t
TABLE ACCESS STORAGE FULL| CUST_INFO |
u
115K| 788K| 2317

( v en e to u
------------------------------------------------------------------------------

v a lli ens
a
Predicate Information lic
da le (identified by operation id):
Y
ar sfera b
---------------------------------------------------
m
ku 6 t-rastorage("OCCUPATION"='Farming')
n
e n u -
V non filter("OCCUPATION"='Farming')
SQL>
6. Reconfigure your session to disable the automatic output of execution plans.
SQL> set autotrace off
SQL>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9: Using Smart Scan


Chapter 9 - Page 16
7. Execute the following query (or execute the SQL script /home/oracle/labs/lab09-
02-07.sql) and examine the statistics for the current session. The statistics confirm the
use of Smart Scan for the query in step 5.
SQL> SELECT s.name, m.value/1024/1024 MB FROM V$SYSSTAT s, V$MYSTAT m
2 WHERE s.statistic# = m.statistic# AND
3 (s.name LIKE 'physical%total bytes' OR s.name LIKE 'cell phys%'
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

4 OR s.name LIKE 'cell IO%');

NAME MB
---------------------------------------------------------------- ----------
physical read total bytes 119.53125
physical write total bytes 0
cell physical IO interconnect bytes .219009399
cell physical IO bytes saved during optimized file creation 0
cell physical IO bytes saved during optimized RMAN file restore 0 a
cell physical IO bytes eligible for predicate offload
) has 119.523438
cell physical IO bytes saved by storage index
ฺ c om ฺ 0

rco uide
cell physical IO bytes sent directly to DB node to balance CPU 0
cell physical IO interconnect bytes returned by smart scan i .211196899
cell IO uncompressed bytes
a l li@ nt G 119.523438

a d av tude
rฺy his S
10 rows selected.
a
Elapsed: 00:00:00.03
u k um se t
SQL>
( v en e to u
8. Execute the following query
v a lli(or execute
e ns events
the SQL script /home/oracle/labs/lab09-
02-08.sql) and examine a e li the c
cell wait associated with the current session. Notice
that there areY adfew
very (if l
any) waits.
r r
SQL>aSELECT DISTINCT
f e ab event, total_waits,
u k um a n s
n t r
2 time_waited/100 wait_secs, average_wait/100 avg_wait_secs

Ve non34- FROM V$SESSION_EVENT e, V$MYSTAT s


WHERE event LIKE 'cell%' AND e.sid = s.sid;

no rows selected

Elapsed: 00:00:00.06
SQL>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9: Using Smart Scan


Chapter 9 - Page 17
Based on the statistics in step 7, you might reasonably expect to see wait events for cell
smart table scan in step 8. What happened? Because parallel query was used, the query
I/O was performed by parallel server processes. The associated wait events are connected to
the parallel server sessions, not the current session. Note that this behavior is symptomatic of
parallel query and is not Exadata-specific. So when parallel query is used, the wait events must
be observed differently. The rest of the practice shows two alternative strategies for observing
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

the wait events.


9. Execute the following query (or execute the SQL script /home/oracle/labs/lab09-
02-09.sql) to display the cell wait events across the entire system.
SQL> select event, total_waits,
2 time_waited/100 wait_secs, average_wait/100 avg_wait_secs
3 from v$system_event where event like 'cell%';

EVENT TOTAL_WAITS
a
has
---------------------------------------------------------------- -----------
WAIT_SECS AVG_WAIT_SECS
)
---------- -------------
ฺ c om ฺ
rco uide
cell smart table scan 9277
550.44 .0593 i
a l li@ nt G
cell single block physical read
d a v de 6099
a t u
216.74 .0355
a rฺy his S
cell multiblock physical read ku
m et
.0354 en
u u s 1826
64.57
i ( v e to
v a llphysical e s
nread
a .3342
cell list of blocks
12.37 ad
l i c 37

r Y a b le
m a sfer
u an00:00:00.24
e nuk Elapsed:
n - t r
V noSQL>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9: Using Smart Scan


Chapter 9 - Page 18
10. Re-execute the parallel query.
SQL> select count(*) from cust_info where occupation =
'Farming';
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

COUNT(*)
----------
13845

Elapsed: 00:00:02.91
SQL>
11. Re-execute the following query (or execute the SQL script /home/oracle/labs/lab09-
02-09.sql) to again display the cell wait events across the entire system. Compare the
a
the query at step 10. ) has
output with the output from step 9. The differences are the cell wait events associated with

ฺ c om ฺ
rco uide
SQL> select event, total_waits,
i
2 time_waited/100 wait_secs, average_wait/100 avg_wait_secs
3 from v$system_event where event like 'cell%';
a l li@ nt G
a d av tude
EVENT
r ฺ y
a this S
----------------------------------------------------------------
TOTAL_WAITS
-----------
WAIT_SECS AVG_WAIT_SECS m
ku use
---------- ------------- n u
e e to
cell smart table scani (v
a l l ens 9404
556.14
d a v lic
.0591

Y ablock bphysical
le read
a r
cell single
e r a 6099

um ans
216.74 f .0355
u k
n cell r
tmultiblock
e n
V no 64.57 - physical read 1826
.0354

cell list of blocks physical read 37


12.37 .3342

Elapsed: 00:00:00.00
SQL>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9: Using Smart Scan


Chapter 9 - Page 19
Using system-level wait event statistics is a simple way to monitor parallel query wait events as
long as you are the only user of the system and you do not wish to monitor concurrent
operations. Often this is not the case. The final part of this practice shows another method
which can be used to isolate the wait events associated with a specific parallel query operation
regardless of concurrency.
12. Execute the following query to determine the default trace file for the current session. Take
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

note of the directory path since that location will also be the default location for other trace
files.
SQL> select value from v$diag_info
2 where name = 'Default Trace File';

VALUE
----------------------------------------------------------------
/u01/app/oracle/diag/rdbms/dbm/dbm1/trace/dbm1_ora_5387.trc a
) has
Elapsed: 00:00:00.40
ฺ c om ฺ
SQL>
i r co uide
13. Use the dbms_session.set_identifier procedure to set ali@ Gassociated
client identifier (PQ1) for
a l
v work
the current session. The client identifier will help to locate trace n
informationt with
d aperform d e
the current session and any parallel query sessions a
r ฺ y that
S tu in behalf of the
current session.
m a this
u
k use
SQL> exec dbms_session.set_identifier(client_id=>'PQ1')
u
v n
e completed.
to
i (
ll ens
PL/SQL procedure successfully e
v a
a da le lic
Elapsed: 00:00:00.17
SQL> r Y ab
a f e r
mdbms_session.client_id_trace_enable
14. Useuthe
k a n s procedure to start recording trace
u r
-tinformation
n information for the PQ1 client identifier. Notice that waits=>true is specified to ensure
Ve thatn o n
wait is recorded in the trace.
SQL> exec dbms_monitor.client_id_trace_enable(client_id=>'PQ1', waits=>true,
binds=>false)

PL/SQL procedure successfully completed.

Elapsed: 00:00:00.20
SQL>

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9: Using Smart Scan


Chapter 9 - Page 20
15. Re-execute the parallel query.
SQL> select count(*) from cust_info where occupation =
'Farming';

COUNT(*)
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

----------
13845

Elapsed: 00:00:03.20
SQL>
16. Stop the trace gathering started in step 14 and exit SQL*Plus.
SQL> exec dbms_monitor.client_id_trace_disable(client_id=>'PQ1')

a
PL/SQL procedure successfully completed.
) has
Elapsed: 00:00:00.00
ฺ c om ฺ
SQL> exit
i r co uide
Disconnected from Oracle Database 11g Enterprise Edition
a l li@Release
n t G11.2.0.3.0...
[oracle@qr01db01 ~]$
a d avin step
t u e
d12.
rฺy his S
17. Change directories to the location of the trace file observed
a
um se t
[oracle@qr01db01 ~]$ cd /u01/app/oracle/diag/rdbms/dbm/dbm1/trace

u k
o u The resulting output will include the
[oracle@qr01db01 trace]$

18. Search for trace files containing ( v en e ID:(PQ1).


CLIENT t
a
trace file for the client SQL i
llsession n s was listed in the query output from step 12. It will
that
also include trace d v
a associated c e
li with any parallel query servers that performed work for
the same client.Y a files b l e
a r e r atrace]$
u m s f
[oracle@qr01db01 grep "CLIENT ID:(PQ1)" *

- t an
nuk dbm1_ora_5387.trc:***
r CLIENT ID:(PQ1) 2013-07-18 02:40:33.367
e n
V nodbm1_p001_28413.trc:***
dbm1_p000_28409.trc:*** CLIENT ID:(PQ1) 2013-07-18 02:40:45.726
CLIENT ID:(PQ1) 2013-07-18 02:40:45.727
[oracle@qr01db01 trace]$

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9: Using Smart Scan


Chapter 9 - Page 21
19. Examine the trace files listed in step 18. The parallel query server trace files will display the
cell smart table scan events associated with the parallel query.
[oracle@qr01db01 trace]$ grep cell dbm1_p001_28413.trc
...
WAIT #140046319890584: nam='cell smart table scan' ela= 60022
cellhash#=1662637845 p2=0 p3=0 obj#=77120 tim=1374129647458319
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

WAIT #140046319890584: nam='cell smart table scan' ela= 330


cellhash#=3713325327 p2=0 p3=0 obj#=77120 tim=1374129647459253
WAIT #140046319890584: nam='cell smart table scan' ela= 171120
cellhash#=3713325327 p2=0 p3=0 obj#=77120 tim=1374129647630414
WAIT #140046319890584: nam='cell smart table scan' ela= 1004
cellhash#=1662637845 p2=0 p3=0 obj#=77120 tim=1374129647632049
WAIT #140046319890584: nam='cell smart table scan' ela= 3 cellhash#=2749642338
p2=0 p3=0 obj#=77120 tim=1374129647632089
WAIT #140046319890584: nam='cell smart table scan' ela= 131068
cellhash#=2749642338 p2=0 p3=0 obj#=77120 tim=1374129647763208
a
has
WAIT #140046319890584: nam='cell smart table scan' ela= 15
)
cellhash#=1662637845 p2=0 p3=0 obj#=77120 tim=1374129647763363

ฺ c om ฺ
WAIT #140046319890584: nam='cell smart table scan' ela= 98818

rco uide
cellhash#=1662637845 p2=0 p3=0 obj#=77120 tim=1374129647862204
i
WAIT #140046319890584: nam='cell smart table scan' ela= 288
l li@ nt G
cellhash#=2749642338 p2=0 p3=0 obj#=77120 tim=1374129647863147
a
a d av tude
WAIT #140046319890584: nam='cell smart table scan' ela= 246864
cellhash#=2749642338 p2=0 p3=0 obj#=77120 tim=1374129648110052

a rฺy his S
WAIT #140046319890584: nam='cell smart table scan' ela= 349

u k um se t
cellhash#=3713325327 p2=0 p3=0 obj#=77120 tim=1374129648111076

en e to u
WAIT #140046319890584: nam='cell smart table scan' ela= 164544
v
cellhash#=3713325327 p2=0 p3=0 obj#=77120 tim=1374129648275729
(
v a lli ens
WAIT #140046319890584: nam='cell smart table scan' ela= 395

da le lic
cellhash#=1662637845 p2=0 p3=0 obj#=77120 tim=1374129648276811
a
WAIT #140046319890584: nam='cell smart table scan' ela= 3 cellhash#=2749642338

a r Y erab
p2=0 p3=0 obj#=77120 tim=1374129648276841

k u m nsf
WAIT #140046319890584: nam='cell smart table scan' ela= 301395

nu n-tra
cellhash#=2749642338 p2=0 p3=0 obj#=77120 tim=1374129648578285
e
V no WAIT #140046319890584: nam='cell smart table scan' ela= 29
cellhash#=2749642338 p2=0 p3=0 obj#=77120 tim=1374129648578539
WAIT #140046319890584: nam='cell smart table scan' ela= 25091
cellhash#=2749642338 p2=0 p3=0 obj#=77120 tim=1374129648603655
WAIT #140046319890584: nam='cell smart table scan' ela= 332
cellhash#=3713325327 p2=0 p3=0 obj#=77120 tim=1374129648604616
WAIT #140046319890584: nam='cell smart table scan' ela= 86345
cellhash#=3713325327 p2=0 p3=0 obj#=77120 tim=1374129648691003
WAIT #0: nam='cell smart table scan' ela= 1030 cellhash#=2749642338 p2=0 p3=0
obj#=77120 tim=1374129648770459
WAIT #0: nam='cell smart table scan' ela= 459 cellhash#=3713325327 p2=0 p3=0
obj#=77120 tim=1374129648770946
WAIT #0: nam='cell smart table scan' ela= 550 cellhash#=1662637845 p2=0 p3=0
obj#=77120 tim=1374129648771519
[oracle@qr01db01 trace]$
20. Exit your terminal session.

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9: Using Smart Scan


Chapter 9 - Page 22
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a
) has
ฺ c om ฺ
i rco uide
Practices for a l i@ t G10:
lLesson
d a v den
Consolidation
r ฺ y a S tuOptions and
a this
Recommendations
m
u u
k use
v n
e e Chapter
to 10
i (
ll ens
v a
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10: Consolidation Options and Recommendations


Chapter 10 - Page 1
Practices for Lesson 10
Practices Overview
There is no practice for Lesson 10.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

a
) has
ฺ c om ฺ
i rco uide
a l li@ nt G
a d av tude
a rฺy his S
u k um se t
( v en e to u
v a lli ens
a da le lic
a r Y erab
k u m nsf
e nu n-tra
V no

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 10: Consolidation Options and Recommendations


Chapter 10 - Page 2

Вам также может понравиться