Deploying Oracle Database 12c with the Oracle ZFS Storage Appliance Paul Johnson Principal Software Engineer Bryce Cracco Senior Product Manager Nagendran J Principal Software Engineer Wendy Chen Principal Systems Engineer John Baton Associate Quality Assurance Engineer
Table of Contents Introduction 1 Provisioning the Oracle ZFS Storage Appliance 2 Log in to the Browser User Interface 2 Creating a Project 3 Creating Shares 5 Enable SNMP to activate OISP and HCC 8 Provisioning Oracle Linux 7 10 Create a Directory Structure 10 Edit /etc/fstab for the New Shares 10 Mount the Shares 10 Enable dnfs 10 Create an Oracle 12c Database 12 Use DBCA to Create a Database 12 Contents of the DBCA Configuration File 12 Contents of the DB Creation Script 14 Execute the DB Creation Script 14 Create a Tablespace 14 Monitor Progress and Performance Using ZFS Storage Analytics 15 Navigate to the Analytics section 15 Add a Statistic 15 Additional Links 18 HOL9715 - DEPLOYING ORACLE DATABASE 12C WITH THE ORACLE ZFS STORAGE APPLIANCE
Introduction This in-depth hands-on lab demonstrates how to install and manage Oracle Database 12c with the Oracle ZFS Storage Appliance. You ll learn how to apply Oracle Hybrid Columnar Compression, the Oracle Intelligent Storage Protocol feature of Oracle ZFS Storage Appliance, the Direct NFS Client feature of Oracle Database, and more. In addition, you ll learn how easy it is to use the Oracle ZFS Storage Appliance software to configure services, create and use storage shares, and monitor database performance with Oracle ZFS Storage Appliance analytics. 1 HOL9715 - DEPLOYING ORACLE DATABASE 12C WITH THE ORACLE ZFS STORAGE APPLIANCE
Provisioning the Oracle ZFS Storage Appliance Log in to the Browser User Interface 1. Open a web browser by double-clicking on the Firefox icon on the desktop. 2. Enter https://192.168.56.3:215 into web browser window. 3. In web browser, enter oow as Username and oow as Password, then press the LOGIN button. 2 HOL9715 - DEPLOYING ORACLE DATABASE 12C WITH THE ORACLE ZFS STORAGE APPLIANCE
4. The Oracle ZFS Storage Appliance Status Dashboard will be displayed. Creating a Project A project is a collection of file-systems and LUNs that share the same common settings. By grouping all shares into the same project, the management of the storage becomes simplified. 1. Begin by clicking on Shares on the top toolbar. 2. Click on PROJECTS on the right side then click on + on the left side to create a new project. 3 HOL9715 - DEPLOYING ORACLE DATABASE 12C WITH THE ORACLE ZFS STORAGE APPLIANCE
3. Name the project HOL9715. 4. Once the project has been created, edit the HOL9715 project by selecting the pencil icon on the left side of the screen. 5. With the HOL9715 project opened, select General at the top to view the project settings. 6. The following changes will need to be made: a. Mountpoint should be /export/hol9715 b. Update access time on read should be deselected c. User should be 54321 d. Group should be 54321 e. Select RWX permissions for Group and Other to turn the icons orange 4 HOL9715 - DEPLOYING ORACLE DATABASE 12C WITH THE ORACLE ZFS STORAGE APPLIANCE
7. Click Apply at the top right. Creating Shares The 12c database will be stored on the Oracle ZFS Storage Appliance Simulator. There will need to be three shares setup to store the data files, logs, and flash recovery area. 5 HOL9715 - DEPLOYING ORACLE DATABASE 12C WITH THE ORACLE ZFS STORAGE APPLIANCE
1. Click on Shares next to General to begin creation. Do not click Shares on the top toolbar as this will deselect the current project. 2. Click the + button to create a new file-system. 3. Create a share called datafiles and click Apply. 6 HOL9715 - DEPLOYING ORACLE DATABASE 12C WITH THE ORACLE ZFS STORAGE APPLIANCE
4. Create a share called fra and click Apply. 5. Create a share called logs and click Apply. 7 HOL9715 - DEPLOYING ORACLE DATABASE 12C WITH THE ORACLE ZFS STORAGE APPLIANCE
You should now have three shares created: datafiles, fra, and logs. Enable SNMP to activate OISP and HCC 1. Navigate to Configuration Services and click on SNMP near the bottom. 2. Click on SNMP underneath System Settings (near the bottom): 3. The following settings should be set: a. Version: v1/2c b. Community name: public c. Authorized network/mask: 0.0.0.0 / 0 d. Appliance contact: HOL e. Trap destinations: 127.0.0.1 8 HOL9715 - DEPLOYING ORACLE DATABASE 12C WITH THE ORACLE ZFS STORAGE APPLIANCE
4. Click the power-on button to enable the SNMP service. 5. Verify the SNMP LED turns on (green). 9 HOL9715 - DEPLOYING ORACLE DATABASE 12C WITH THE ORACLE ZFS STORAGE APPLIANCE
Provisioning Oracle Linux 7 The binaries for the 12c database have already been preinstalled on the Oracle Linux VM. They are held in the /u01/app/oracle directory. The password for this VM is oow. Terminal Open a new terminal session by double-clicking on the Terminal icon on the desktop: Create a Directory Structure Each of the shares created on the storage will need a local directory to contain the mounts on the Oracle Linux VM. Please use the following locations: $ sudo mkdir -p /zfssa/hol9715/datafiles $ sudo mkdir -p /zfssa/hol9715/fra $ sudo mkdir -p /zfssa/hol9715/logs Edit /etc/fstab for the New Shares The entries have already been populated inside of /etc/fstab: $ cat /etc/fstab # Oracle DB 12c HOL 192.168.56.3:/export/HOL9715/datafiles /zfssa/hol9715/datafiles nfs rw,bg,hard,nointr,rsize=1048576,wsize=1048576,tcp,vers=4,timeo=600,noac 0 0 192.168.56.3:/export/HOL9715/fra /zfssa/hol9715/fra nfs rw,bg,hard,nointr,rsize=1048576,wsize=1048576,tcp,vers=4,timeo=600,noac 0 0 192.168.56.3:/export/HOL9715/logs /zfssa/hol9715/logs nfs rw,bg,hard,nointr,rsize=1048576,wsize=1048576,tcp,vers=4,timeo=600,noac 0 0 Mount the Shares $ sudo mount -a Enable dnfs The entries have already been populated inside of $ORACLE_HOME/dbs/oranfstab: $ su oracle $ cat $ORACLE_HOME/dbs/oranfstab server: 192.168.56.3 path: 192.168.56.3 nfs_version: nfsv4 export: /zfssa/hol9715/datafiles mount: /zfssa/hol9715/datafiles export: /zfssa/hol9715/fra mount: /zfssa/hol9715/fra export: /zfssa/hol9715/logs mount: /zfssa/hol9715/logs Direct NFS, also known as dnfs, is the preferred method for database communication with the Oracle ZFS Storage Appliance. This feature optimizes I/O traffic by replacing the kernel NFS with an NFS client that is tailored specifically for Oracle software. It is only available in Oracle Database 11g and 12c. 10 HOL9715 - DEPLOYING ORACLE DATABASE 12C WITH THE ORACLE ZFS STORAGE APPLIANCE
$ cd $ORACLE_HOME/rdbms/lib $ make f ins_rdbms.mk dnfs_on rm -f /u01/app/oracle/product/12.1.0/dbhome_1/lib/libodm12.so; cp /u01/app/oracle/product/12.1.0/dbhome_1/lib/libnfsodm12.so /u01/app/oracle/product/12.1.0/dbhome_1/lib/libodm12.so 11 HOL9715 - DEPLOYING ORACLE DATABASE 12C WITH THE ORACLE ZFS STORAGE APPLIANCE
Create an Oracle 12c Database Use DBCA to Create a Database DBCA, the Database Configuration Assistant, is a tool to create, configure, or destroy an Oracle database. It will be utilized in this lab in order to automate a database install. Contents of the DBCA Configuration File To simply the creation of the database with DBCA, a configuration file has already been pre-generated for this lab. This is an XML file that aligns the NFS shares and settings already configured with the ZFS storage appliance. $ cd /home/oow/oracle $ cat setup/hol9715.dbc <?xml version = '1.0'?> <DatabaseTemplate name="hol9715" description=" " version="12.1.0.2.0"> <CommonAttributes> <option name="oms" value="true"/> <option name="jserver" value="true"/> <option name="spatial" value="true"/> <option name="imedia" value="true"/> <option name="xdb_protocols" value="true"> <tablespace id="sysaux"/> </option> <option name="oracle_text" value="true"> <tablespace id="sysaux"/> </option> <option name="sample_schema" value="false"/> <option name="cwmlite" value="true"> <tablespace id="sysaux"/> </option> <option name="apex" value="true"/> <option name="dv" value="true"/> </CommonAttributes> <Variables/> <CustomScripts Execute="false"/> <InitParamAttributes> <InitParams> <initparam name="db_name" value=""/> <initparam name="dispatchers" value="(protocol=tcp) (SERVICE={SID}XDB)"/> <initparam name="audit_file_dest" value="{oracle_base}/admin/{db_unique_name}/adump"/> <initparam name="compatible" value="12.1.0.2.0"/> <initparam name="remote_login_passwordfile" value="exclusive"/> <initparam name="processes" value="300"/> <initparam name="undo_tablespace" value="undotbs1"/> <initparam name="control_files" value="("/zfssa/hol9715/logs/{db_unique_name}/control01.ctl", "/zfssa/hol9715/fra/{db_unique_name}/control02.ctl")"/> <initparam name="diagnostic_dest" value="{oracle_base}"/> <initparam name="db_recovery_file_dest" value="/zfssa/hol9715/fra"/> <initparam name="audit_trail" value="db"/> <initparam name="memory_target" value="250" unit="mb"/> <initparam name="db_block_size" value="8" unit="kb"/> <initparam name="open_cursors" value="300"/> <initparam name="db_recovery_file_dest_size" value="" unit="mb"/> </InitParams> <MiscParams> <databasetype>multipurpose</databasetype> <maxuserconn>20</maxuserconn> <percentagememtosga>40</percentagememtosga> <customsga>false</customsga> 12 HOL9715 - DEPLOYING ORACLE DATABASE 12C WITH THE ORACLE ZFS STORAGE APPLIANCE
<archivelogmode>false</archivelogmode> <initparamfilename>{oracle_base}/admin/{db_unique_name}/pfile/init.ora</initparam FileName> </MiscParams> <SPfile usespfile="true">{oracle_home}/dbs/spfile{sid}.ora</spfile> </InitParamAttributes> <StorageAttributes> <DataFiles> <Location>{ORACLE_HOME}/assistants/dbca/templates/Seed_Database.dfb</Location> <SourceDBName cdb="true">seeddata</sourcedbname> <Name id="3" Tablespace="SYSAUX" Contents="PERMANENT" Size="560" autoextend="true" blocksize="8192" con_id="1">/zfssa/hol9715/datafiles/{db_unique_name}/sysaux01.dbf</name> <Name id="1" Tablespace="SYSTEM" Contents="PERMANENT" Size="780" autoextend="true" blocksize="8192" con_id="1">/zfssa/hol9715/datafiles/{db_unique_name}/system01.dbf</name> <Name id="4" Tablespace="UNDOTBS1" Contents="UNDO" Size="25" autoextend="true" blocksize="8192" con_id="1">/zfssa/hol9715/datafiles/{db_unique_name}/undotbs01.dbf</name> <Name id="6" Tablespace="USERS" Contents="PERMANENT" Size="5" autoextend="true" blocksize="8192" con_id="1">/zfssa/hol9715/datafiles/{db_unique_name}/users01.dbf</name> </DataFiles> <TempFiles> <Name id="1" Tablespace="TEMP" Contents="TEMPORARY" Size="60" con_id="1">/zfssa/hol9715/datafiles/{db_unique_name}/temp01.dbf</name> </TempFiles> <ControlfileAttributes id="controlfile"> <maxdatafiles>100</maxdatafiles> <maxlogfiles>16</maxlogfiles> <maxlogmembers>3</maxlogmembers> <maxloghistory>1</maxloghistory> <maxinstances>8</maxinstances> <image name="control01.ctl" filepath="/zfssa/hol9715/logs/{db_unique_name}/"/> <image name="control02.ctl" filepath="/zfssa/hol9715/fra/{db_unique_name}/"/> </ControlfileAttributes> <RedoLogGroupAttributes id="1"> <reuse>false</reuse> <filesize unit="kb">51200</filesize> <Thread>1</Thread> <member ordinal="0" membername="redo01.log" filepath="/zfssa/hol9715/logs/{db_unique_name}/"/> </RedoLogGroupAttributes> <RedoLogGroupAttributes id="2"> <reuse>false</reuse> <filesize unit="kb">51200</filesize> <Thread>1</Thread> <member ordinal="0" membername="redo02.log" filepath="/zfssa/hol9715/logs/{db_unique_name}/"/> </RedoLogGroupAttributes> <RedoLogGroupAttributes id="3"> <reuse>false</reuse> <filesize unit="kb">51200</filesize> <Thread>1</Thread> <member ordinal="0" membername="redo03.log" filepath="/zfssa/hol9715/logs/{db_unique_name}/"/> </RedoLogGroupAttributes> </StorageAttributes> 13 HOL9715 - DEPLOYING ORACLE DATABASE 12C WITH THE ORACLE ZFS STORAGE APPLIANCE
Contents of the DB Creation Script A DB creation script has already been pre-generated to create the database. It uses the template file written in the previous section. It also auto-populates the database name and password. $ cat createdb.sh #!/bin/sh dbca -silent -createdatabase -templatename setup/hol9715.dbc -gdbname HOL9715 - sid HOL9715 -syspassword HOL9715 -systempassword HOL9715 Execute the DB Creation Script 1. Run the script createdb.sh inside the home directory. $./createdb.sh Copying database files 1% complete 3% complete 37% complete Creating and starting Oracle instance 40% complete 45% complete 50% complete 55% complete 56% complete 60% complete 62% complete Completing Database Creation 66% complete 70% complete 73% complete 85% complete 96% complete 100% complete Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/hol9715/hol9715.log" for further details. Create a Tablespace 1. Change the 'ORACLE_SID' to 'HOL9715', then use SQL*PLUS to interface with the Oracle 12c Database. $ export ORACLE_SID=HOL9715 $ sqlplus / as sysdba SQL*Plus: Release 12.1.0.1.0 Production on Tue Aug 13 10:47:37 2013 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.1.0-64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options 2. Create a tablespace for 'HOL9715' to be contained on the Oracle ZFS Storage Appliance. SQL> create bigfile tablespace HOL9715 datafile '/zfssa/hol9715/datafiles/hol9715.dbf' size 100M; Tablespace created. 14 HOL9715 - DEPLOYING ORACLE DATABASE 12C WITH THE ORACLE ZFS STORAGE APPLIANCE
Monitor Progress and Performance Using ZFS Storage Analytics Analytics is an advanced facility that you can use to graph a variety of statistics in real-time and record this data for later viewing. It has been designed for both long term monitoring and short term analysis. When needed, it makes use of DTrace to dynamically create custom statistics, which allows different layers of the operating system stack to be analyzed in detail. Navigate to the Analytics section While the database is installing, click on the Analytics tab on the right side of the upper taskbar. Add a Statistic On the left side of the browser, click on the + icon next to Add statistic to bring up the statistic menu. The most relevant statistics for database performance analysis can be found in the NFSv4 category. 15 HOL9715 - DEPLOYING ORACLE DATABASE 12C WITH THE ORACLE ZFS STORAGE APPLIANCE
Analytics has been designed around an effective performance analysis technique called drill-down analysis. This involves checking high level statistics first, and to focus on finer details based on findings so far. This allows you to quickly narrow the focus to the most likely areas. 16 HOL9715 - DEPLOYING ORACLE DATABASE 12C WITH THE ORACLE ZFS STORAGE APPLIANCE
17 HOL9715 - DEPLOYING ORACLE DATABASE 12C WITH THE ORACLE ZFS STORAGE APPLIANCE
Additional Links 1. VirtualBox http://www.virtualbox.org/ 2. Oracle ZFS Storage Simulator http://www.oracle.com/technetwork/server-storage/sun-unified-storage/downloads/sun-simulator- 1368816.html 3. Oracle Linux 7 http://edelivery.oracle.com/linux 4. HOL9715 Lab Information http://blogs.oracle.com/paulie 18 HOL9715 - DEPLOYING ORACLE DATABASE 12C WITH THE ORACLE ZFS STORAGE APPLIANCE
Oracle Corporation, World Headquarters Worldwide Inquiries 500 Oracle Parkway Phone: +1.650.506.7000 Redwood Shores, CA 94065, USA Fax: +1.650.506.7200 C O N N E C T W I T H U S blogs.oracle.com/oracle facebook.com/oracle twitter.com/oracle oracle.com Copyright 2014, Oracle and/or its affiliates. All rights reserved. This document is provided for information purposes only, and the contents hereof are subject to change without notice. This document is not warranted to be error-free, nor subject to any other warranties or conditions, whether expressed orally or implied in law, including implied warranties and conditions of merchantability or fitness for a particular purpose. We specifically disclaim any liability with respect to this document, and no contractual obligations are formed either directly or indirectly by this document. This document may not be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without our prior written permission. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group. 0914