Академический Документы
Профессиональный Документы
Культура Документы
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.
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:
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
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
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:
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
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
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
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 ~]$
are connected to the DBM database and exit your SQL*Plus session.
[oracle@qr01db01 ~]$ sqlplus / as sysdba
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
[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.
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
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
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
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
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.
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 -
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
CellCLI> exit
quitting
[celladmin@qr01cel01 ~]$
9. Exit all of your terminal sessions.
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
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 ~]#
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>
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;
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>
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.
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
/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
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
/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>
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
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
CellCLI>
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ
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>
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
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>
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>
...
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
cachedKeepSize: 0
cachedSize: 8192
dbID: 2080757153
dbUniqueName: DBM
hitCount: 0
missCount: 0
objectNumber: 461
tableSpaceNumber: 0
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
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
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
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
m ar reads f e ra bytes
---------------------------------------------------------------- ----------
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>
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
a d total
l e l 559.054688
physicalY b bytes
r write rtotal
cellaphysicaleIO
a 0
n u r a
cell physical
t
0
10 rows selected.
SQL>
6. Reconnect to your database in order to reset the session level statistics.
SQL> connect sales/sales
Connected.
SQL>
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>
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.
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
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%';
SQL>
Session altered.
Session altered.
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>
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).
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.
Table dropped.
SQL>
11. Exit your SQL*Plus session.
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>
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>
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
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>
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.
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
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.
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
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
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
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>
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.
ฺ 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>
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.
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-
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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>
> 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
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.
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
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;
SQL>
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;
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>
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
o/192.168.1.103/RECO_QR01_CD_04_qr01cel01
PATH
------------------------------------------------------------------------------
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ
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.
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>
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
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
------------------------------------------------------------------------------
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>
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.
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
k u m nsf DBFS_DG_CD_05_qr01cel02
DBFS_DG_CD_06_qr01cel02
160M
160M
ONLINE
ONLINE
CellCLI>
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
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 ~]$
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>
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
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
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>
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>
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>
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
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
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 ~]$
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
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
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
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.
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
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>
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>
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
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.
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ฺ
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.
SQL>
9. Drop the disk group you created in step 7.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ
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
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.
[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 ~]$
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
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.
[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>
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
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.
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>
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'
...
...
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]#
[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 ~]$
( 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.
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
COUNT(*)
----------
1500000
SQL> exit
[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 ~]$
[celladmin@qr01cel01 ~]$
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.
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
CellCLI>
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.
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
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 ~]$
ฺ 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 ~]$
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 ~]$
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
v a
qr01cel03: CD_IO_RQ_W_SM
c
13,663 IO requests
a da le li
[oracle@qr01db01 ~]$
[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 ~]$
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
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
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
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
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.
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 ~]$
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]#
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'
[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 ~]$
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.
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
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"
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;
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.
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.
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;
Elapsed: 00:00:07.62
SQL> commit;
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>
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;
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;
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;
Elapsed: 00:00:05.71
SQL> commit;
Commit complete.
Elapsed: 00:00:00.03
SQL>
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
10 rows selected.
Elapsed: 00:00:00.14
SQL>
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>
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>
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>
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
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.
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
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
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>
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
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.
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
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
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
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
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
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>
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
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
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>
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
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.
Commit complete.
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>
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.
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
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
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
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>
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
no rows selected
Elapsed: 00:00:00.06
SQL>
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>
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
Elapsed: 00:00:00.00
SQL>
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)
Elapsed: 00:00:00.20
SQL>
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]$
- 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]$
ฺ 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.
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
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