---PDB$SEED READ ONLY
PDB1 READ WRITE
7.5 Location of Data files of PDBs & CDB
The following section shows how to identify tablespace names, data files associated with the CDB and PDBs, including their temporary files.
1. Connect to the CDB database as a SYSDBA using sqlplus. The steps are the same as shown in Section 7.1 Connect to a CDB steps one through three.
2. To identify the tablespaces associated with the CDB or any of the PDBs installed, use the following syntax where the con_id varies upon the database chosen. The example below uses the con_id of 1 to show the CDB tablespaces.
SQL > select tablespace_name, con_id from cdb_tablespaces where con_id = 1;
TABLESPACE_NAME CON_ID
3. To locate the data files from the CDB or PDBs installed, use the following syntax where the con_id varies upon the database chosen. The example below uses the con_id of 1 to show the CDB data file locations.
SQL> select file_name, con_id from cdb_data_files where con_id=1;
FILE_NAME CON_ID
---
---+DATADG/CDB/DATAFILE/system.270.836232071 1
+DATADG/CDB/DATAFILE/sysaux.273.836232077 1
+DATADG/CDB/DATAFILE/undotbs1.262.836232081 1
FILE_NAME CON_ID ---
---+DATADG/CDB/DATAFILE/users.275.836232097 1
4. To locate the temporary files from the CDB or PDBs installed, use the following syntax where the con_id varies upon the database chosen. The example below uses the con_id of 1 to show the CDB data file locations.
SQL> select file_name, con_id from cdb_temp_files where con_id =1 ;
FILE_NAME CON_ID
---
---+DATADG/CDB/TEMPFILE/temp.278.836232081 1
8 Conclusion
Red Hat Enterprise Linux 7 provides an excellent foundation for database deployments with demonstrated stability, scalability, and performance. With the support for Oracle RAC
Database 12c Release 1 (12.1) on Red Hat Enterprise Linux 7, customers can increasingly look to deploy Oracle RAC Databases in advanced configurations.
The steps and procedures described in this reference architecture should provide system, database, and storage administrators the blueprint required to create a robust and performing solution based on Oracle RAC Databases. Administrators can reference this document to simplify and optimize the deployment process and employ the latest best practices for configuring Red Hat technologies while implementing the following tasks:
• Deploying Oracle Grid Infrastructure 12c Release 1 (12.1.0.2.0)
• Deploying Oracle Database Software 12c Release 1 (12.1.0.2.0)
• Deploying an Oracle RAC Database 12c Release 1 (12.1.0.2.0) with shared SAN disks
• Using Oracle ASM disks with udev rules
• Securing the Oracle Database 12c environment with SELinux
• Securing the public network using firewalld
For any questions or concerns, please email [email protected] and ensure to visit the Red Hat Reference Architecture page at http://red.ht/1Nd64ha to find out about all of our Red Hat solution offerings.
Appendix A: Revision History
Revision 1.1 Friday March 05, 2015 Roger Lopez
- Within the Conclusion, fixed hyperlink of Reference Architectures to point to http://red.ht/1Nd64ha
- Fixed some missing dependencies within the .tar.gz file that were already correctly reflexed in the scripts within the Appendix sections. Details within the CHANGELOG of the .tar.gz Revision 1.0 Friday February 20, 2015 Roger Lopez
Initial Release
Appendix B: Contributors
1. Tom Tracy, content reviewer 2. David Wilson, content reviewer 3. John Boero, content reviewer 4. Yan Fisher, content reviewer 5. Scott McBrien, content reviewer
Appendix C: DM Multipath Configuration File
# This is a basic configuration file with some examples, for device mapper
# multipath.
# For a complete list of the default configuration values, see
# /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf.defaults
# For a list of configuration options with descriptions, see
# /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf.annotated
#
# REMEMBER: After updating multipath.conf, you must run
#
# service multipathd reload
#
# for the changes to take effect in multipathd
## By default, devices with vendor = "IBM" and product = "S/390.*" are
## blacklisted. To enable mulitpathing on these devies, uncomment the
## following lines.
## Here is an example of how to configure some standard options.
##
## The wwid line in the following blacklist section is shown as an example
## of how to blacklist devices by wwid. The 2 devnode lines are the
## compiled in default blacklist. If you want to blacklist entire types
## of devices, such as all scsi devices, you should use a devnode line.
## However, if you want to blacklist specific devices, you should use
## a wwid line. Since there is no guarantee that a specific device will
## not change names on reboot (from /dev/sda to /dev/sdb for example)
## devnode lines are not recommended for blacklisting specific devices.
##blacklist {
wwid 3600508b1001030353434363646301200
devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
devnode "^hd[a-z]"
Appendix D: Firewalld Configuration File
/etc/firewalld/zones/public.xml
<?xml version="1.0" encoding="utf-8"?>
<zone>
<short>Public</short>
<description>For use in public areas. You do not trust the other computers on networks to not harm your computer. Only selected incoming connections are accepted.</description>
<service name="dhcpv6-client"/>
<service name="ssh"/>
<rule family="ipv4">
<source address="10.19.142.54"/>
<port protocol="tcp" port="1521"/>
<accept/>
</rule>
<rule family="ipv4">
<source address="10.19.142.54"/>
<port protocol="tcp" port="5500"/>
<accept/>
</rule>
</zone>
/etc/firewalld/zones/trusted.xml
<?xml version="1.0" encoding="utf-8"?>
<zone target="ACCEPT">
<short>Trusted</short>
<description>All network connections are accepted.</description>
<interface name="<enter-private-interface-name2>"/>
<interface name="<enter-private-interface-name2>"/>
</zone>
Appendix E: Huge Pages Script
The following huge pages script is from Tuning Red Hat Enterprise Linux For Oracle & Oracle RAC by Scott Crot, Sr. Consultant, Red Hat31 and modified to include the values Oracle's soft memlock, hard memlock, and work with kernel 3.10
#!/bin/bash
KERN=`uname -r | awk -F. '{ printf("%d.%d\n",$1,$2); }'`
# Find out the HugePage size
HPG_SZ=`grep Hugepagesize /proc/meminfo | awk '{print $2}'`
# Start from 1 pages to be on the safe side and guarantee 1 free HugePage NUM_PG=1
# Cumulative number of pages required to handle the running shared memory segments
for SEG_BYTES in `ipcs -m | awk '{print $5}' | grep "[0-9][0-9]*"`
do
MIN_PG=`echo "$SEG_BYTES/($HPG_SZ*1024)" | bc -q`
if [ $MIN_PG -gt 0 ]; then
NUM_PG=`echo "$NUM_PG+$MIN_PG+1" | bc -q`
fi done
# Finish with results case $KERN in
'2.4') HUGETLB_POOL=`echo "$NUM_PG*$HPG_SZ/1024" | bc -q`;
echo "Recommended setting: vm.hugetlb_pool = $HUGETLB_POOL" ;;
'2.6') MEM_LOCK=`echo "$NUM_PG*$HPG_SZ" | bc -q`;
echo "Recommended setting within the kernel boot command line: hugepages =
$NUM_PG"
echo "Recommended setting within /etc/security/limits.d/99-grid-oracle-limits.conf: oracle soft memlock $MEM_LOCK"
echo "Recommended setting within /etc/security/limits.d/99-grid-oracle-limits.conf: oracle hard memlock $MEM_LOCK" ;;
'3.10') MEM_LOCK=`echo "$NUM_PG*$HPG_SZ" | bc -q`;
echo "Recommended setting within the kernel boot command line: hugepages =
$NUM_PG"
echo "Recommended setting within /etc/security/limits.d/99-grid-oracle-limits.conf: oracle soft memlock $MEM_LOCK"
echo "Recommended setting within /etc/security/limits.d/99-grid-oracle-limits.conf: oracle hard memlock $MEM_LOCK" ;;
*) echo "Unrecognized kernel version $KERN. Exiting." ;;
esac
31 Tuning Red Hat Enterprise Linux For Oracle & Oracle RAC by Scott Crot, Sr. Consultant, Red Hat,
http://www.redhat.com/promo/summit/2010/presentations/summit/decoding-the-code/fri/scott-945-Appendix F: Oracle Database Package Requirements Text File
binutils
compat-libcap1 compat-libstdc++-33 gcc
gcc-c++
glibc
glibc-devel kshlibgcc libstdc++
libstdc++-devel libaio
libaio-devel libXext libXtst libX11 libXau libxcb libXi make sysstat libXmu libXt libXv
libXxf86dgak libXxf86misc libXxf86vm xorg-x11-utils xorg-x11-xauth nfs-utils
Appendix G: Kernel Parameters
vm.swappiness = 1
vm.dirty_background_ratio = 3 vm.dirty_ratio = 80
vm.dirty_expire_centisecs = 500 vm.dirty_writeback_centisecs = 100 kernel.shmmax = 4398046511104 kernel.shmall = 1073741824 kernel.shmmni = 4096
kernel.sem = 250 32000 100 128 fs.file-max = 6815744
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 262144
net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048576
net.ipv4.conf.<priv-interface-name1>.rp_filter = 2 net.ipv4.conf.<priv-interface-name2>.rp_filter = 2 kernel.panic_on_oops = 1
Appendix H: 98-oracle.conf
# 98-oracle.conf resides in the /etc/sysctl.d directory
# Replace <priv-interface-name{1-2}> with the appropriate Ethernet device name
net.ipv4.conf.<priv-interface-name1>.rp_filter = 2 net.ipv4.conf.<priv-interface-name2>.rp_filter = 2
# If not using the custom oracle tuned profile
# please uncomment the following kernel parameters.
# vm.swappiness = 1
# vm.dirty_background_ratio = 3
# vm.dirty_ratio = 80
# vm.dirty_expire_centisecs = 500
# vm.dirty_writeback_centisecs = 100
# kernel.shmmax = 4398046511104
# kernel.shmall = 1073741824
# kernel.shmmni = 4096
# kernel.sem = 250 32000 100 128
# fs.file-max = 6815744
# fs.aio-max-nr = 1048576
# net.ipv4.ip_local_port_range = 9000 65500
# net.core.rmem_default = 262144
# net.core.rmem_max = 4194304
# net.core.wmem_default = 262144
# net.core.wmem_max = 1048576
# kernel.panic_on_oops = 1