Welcome to Oracle Database 12c Release 2 New Features blog, covering Oracle’s latest release. I’ve done my best to provide as much coverage of the many new features in Oracle Database 12c Release 2 as fits in a blog of this size. Oracle Database 12c Release 1 was a big release with a number of new and changed features. Oracle Database 12c Release 2 adds many more features and enhances all of the new ones introduced in Release 1!
This first my blog article describes everything you need to know to get started with Oracle Database 12c Release 2. This includes the following topics:
- Downloading Oracle Database 12c Release 2
- Preparing the OS to install Oracle Database 12c Release 2
- Installing Oracle Database 12c Release 2 (software-only install)
- Preparing to install Oracle Database 12c Release 2 Grid Infrastructure
- Staging Oracle Database 12c Release 2 Grid Infrastructure (preinstall)
Even on a single-instance, nonclustered database, we want to use Grid Infrastructure (GI) to leverage Automatic Storage Management (ASM). As the preceding list indicates, we’re doing a software-only install of Oracle Database, so it doesn’t matter whether we set up GI before or after that. The GI setup is “preinstalled” and as such the staging of GI is much easier than in past releases. In any case, you will need to create a GI instance, with storage, before creating your first database. Let’s start looking at Oracle Database 12c Release 2!
Downloading Oracle Database 12c Release 2 Components
The initial release of Oracle Database 12c Release 2 is available on both OTN and via Oracle’s eDelivery service. Oracle Database 12c Release 2 is considered a “base release” even though it builds on the features introduced in Oracle Database 12c Release 1. Some Oracle documentation calls Oracle Database 12c Release 2 a “patch set,” but since you can do a clean install with no existing databases on your server, I’m calling it a “base release.” When patch sets come out every quarter, they will only be available via Oracle Support.
If you want to experiment with the new features of Oracle Database 12c Release 2 in a preinstalled environment, you can get prebuilt virtual machines (VMs) for use with Oracle Virtual Box or Oracle VM here. These VMs are not intended for use in a production environment.
If you get the files via the Oracle eDelivery service, here are the packages and descriptions:
- V839960-01 Database
- V840012-01 Grid Infrastructure
- V840019-01 Global Service Manager
- V839967-01 64-bit Linux client
- V839968-01 32-bit Linux client
- V266898-01 Fusion Middleware
Via OTN, here are the filenames:
- zip Database
- zip Grid Infrastructure
- zip Global Service Manager
- zip 64-bit Linux client
- zip 32-bit Linux client
- zip Sample schemas and code
- zip Oracle Gateways
For your initial installation of Oracle Database 12c Release 2 and Grid Infrastructure, you will need only the database and grid packages.
Preparing the Operating System for Oracle Database 12c Release 2
In the examples that follow, I’ll be using V839960-01-database.zip and V840012-01-grid.zip to perform the installations. I’ll also be using Oracle Linux 7.3, although most of these guidelines will apply to all hardware and software platforms. Table 1 lists the relevant file systems, directories, and raw disk devices in addition to the OS default locations used for all of the examples in this chapter and throughout the book.
|Device or File System||Contents|
|/media/zipfiles||Installation source files|
|/install||Staging area for database installer files|
|/u01/app/oracle||Oracle "base" for all products and configuration information: $ORACLE_BASE|
|/dev/sdc1-/dev/sdf1||ASM disks for DATA disk group|
|/dev/sdh1-/dev/sdi1||ASM disks for RECO disk group|
At the OS level, there are a number of steps that you need to complete before you start your Oracle Database software installations). If the server on which you are going to install Oracle Database 12c Release 2 is already running some other release of Oracle Database, then you might have already performed many of these steps. Regardless, it’s a best practice to review all of the requirements associated with a new release of Oracle Database and ensure that your current hardware and software meet those requirements.
The following list highlights the most important tasks that you should complete before you install Oracle Database 12c Release 2. This list isn’t exhaustive (but covers the most important things to check), and it’s certainly not hardware specific, so you need to consult the installation guide for your specific hardware and OS combination for a more detailed list of things to do. Many of the tasks will seem very familiar to those who have been working with Oracle Database for a long time.
- Review the Oracle Database Installation Guides (hereafter generically referred to as the install guides) and Readme files. In many cases, Oracle makes the Readme files accessible online so that you don’t even need to extract the database software to read them.
- Make sure your OS platform has all required updates installed.
- Make sure your platform meets the minimum hardware and software requirements. In particular, if you’re moving from a much earlier release of Oracle, make sure that the OS version is one supported by Oracle Database 12c Release 2. You can find which OS versions are supported (down to individual package versions) either from the My Oracle Support portal (using the Certification Search function on the Certifications tab) or by reviewing the install guide for your particular OS platform.
- Create the required OS groups and users. Note that a new administrative role, SYSRAC, is available to provide more granularity with respect to management of Oracle Real Application Clusters (RAC)-related components. You may wish to create a new OS group to support this new role.
- Check and configure the required kernel parameters for your OS platform. This information is platform specific and is contained in the install guide for your OS platform.
- Check whether any patches to Oracle Database 12c Release 2 are required prior to the install.
- Finish the preinstall steps.
Let’s look at each of these tasks in some additional detail next.
Review the Installation Guide and Readme Files
It’s always a good practice to review the install guide a few times before you install Oracle Database, especially if you’re dealing with a new release. The install guide provides you with a concise list of steps that you should perform as you prepare to install Oracle Database 12c Release 2.
For Oracle Database 12c Release 2, the installation guides are at here.
Additionally, you will find a Readme text file available online that you can review before you download the install media. It’s a good idea to read the online version of the Readme file because it contains the most current list of the various files in the install package and what the purpose of each is. That way, you don’t end up downloading files you don’t need. Readme files are also available in each file of the install media with specific instructions on how to install the files that are on that image. You will also often find other Readme files in other locations within the media that address specific products that you might be installing.
Finally, My Oracle Support usually provides additional documentation online that supplies the most current information with respect to any issues you might encounter when installing Oracle Database 12c Release 2. You will find a link to this My Oracle Support documentation in the Readme files both online and on the install media. It’s a really good idea to read this supplementary documentation before you start installing and upgrading databases to Oracle Database 12c Release 2.
Make Sure Your OS Platform Has All Required Updates Installed
Review the install guide for your specific OS platform to ensure that you are running on a version of that OS that supports Oracle Database 12c Release 2. Additionally, check that guide, the associated Readme files, and the My Oracle Support portal to make sure that you have installed all the OS patches and fixes that are required before installing Oracle Database 12c Release 2. On Oracle Linux, this is as easy as running yum update from a user logged in as root.
Make Sure Your Platform Meets the Minimum Requirements
Before you begin your install, make sure the platform on which you will be installing Oracle Database 12c Release 2 meets the minimum hardware and software requirements. Of course, minimum requirements are just that —minimum requirements—and don’t ensure peak performance of your databases. Total requirements of the platform with respect to disk space, memory, and CPU usage are impacted by other factors such as plans to add databases in the future, the nature of the processing that occurs in the databases, and so on.
Oracle Database 12c Release 2 is fully supported on Oracle Linux (OL) 6.x and 7.x as well as on the equivalent Red Hat Enterprise Linux (RHEL) releases. Otherwise, the general minimum server requirements vary by platform. To give you an example, the following sections outline some of the stated requirements for a Linux x86-64 (64 bit) install on Oracle Linux.
Oracle Database 12c Release 2 Software Storage Requirements
A Linux x86-64 install has the following software storage requirements for the two Oracle Database 12c Release 2 editions and Grid Infrastructure:
- Я Oracle Database Enterprise or Standard Edition: 7.5 GB
- Я Oracle Grid Infrastructure: 8.6 GB
The space requirements for GI seem a bit steep, but keep in mind that at the heart of GI is another very specialized Oracle Database plus the software required to manage high availability (HA) configurations such as RAC and ASM. The benefits of ASM alone justify the disk space required for the software itself! Also keep in mind that the disk space requirements for the database itself, backups, redo log files, and so forth depend on your application, but to create an empty database with all of the options, it will occupy about 2 GB. Each additional database will be about the same size unless you are using Oracle’s Multitenant Architecture (container databases)—which you should also be using, but those enhancements are a topic for another chapter!
The /tmp directory requires a minimum of 1 GB of space. If you do not have enough space in /tmp, then either increase the amount of space in that file system or set the TMP or TMPDIR environment variable in the Oracle environment.
Oracle Database 12c Release 2 Memory Requirements
The Oracle Database 12c Release 2 memory requirements for a Linux x86-64 install are as follows:
- Oracle Database: minimum of 1 GB (recommend 2 GB of RAM or more).
- Swap space:
- If you have between 1 GB and 2 GB of memory on your system, then
you should allocate 1.5 times the amount of RAM for swap space.
- If you have more than 2 GB of memory on your system, then you should allocate an amount of swap space equal to the amount of memory available on the system, up to 16 GB.
- Oracle Grid Infrastructure (GI): at least 8 GB.
To reiterate, these are minimum, bare-bones requirements for database memory. Typically, you will want a great deal more memory on your system. The amount of memory that you will need is very dependent on the nature and number of the databases that you intend to run on the system.
Operating System Requirements
As of this writing, Oracle Database 12c Release 2 supports the following Linux distributions:
- Oracle Linux 7.x and Red Hat Linux 7.x distributions for x86-64
- Oracle Linux 6.4 and Red Hat Linux 6.4 distributions for x86-64
- SUSE Linux Enterprise Server 12 SP1
You can use a command such as
cat /etc/redhat-release, or
lsb_release -id to determine the distribution and version of Linux that is installed. Here is an example of checking both the Oracle and Red Hat versions of the OS (the version number should be the same with minor differences in the details):
[root@ol7base ~] # cat /etc/oracle-release
Oracle Linux Server release 7.3
[root@ol7base -]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7,3 (Maipo)
You will also want to determine whether the required kernel errata is installed by using the uname -r command, as shown here:
[root@ol7base -]# uname -r
The installation guide indicates that I need to be on the Linux kernel 2.6.x (version 6.4) or later, or kernel 3.8.x (version 7.3) or later, therefore I have the correct server release installed. The current install guide (or updated Readme file) will contain the latest minimum release level required. The Linux distributions from Oracle and Red Hat differ mainly in the availability of the Unbreakable Enterprise Kernel (UEK), which as you might expect has many additional HA features. Unless you are in a 100 percent Red Hat shop or have other licensing issues, Oracle Linux is by far the best choice given that the vast majority of Oracle Database’s development and testing is performed on that platform.
For Linux distributions, a number of packages must be installed. Check the current install guide for a list of these required packages. Use the rpm command to query the system to determine if the correct packages are installed. For example, I might want to check that the correct release for binutils (binutils- 184.108.40.206.6 or later as of this writing) is installed. I can use the following command to check this information:
[root@ol7base ~] # rpm -q binutils
But there is a much easier way to go about this! If you are using Oracle Linux and are signed up with the Unbreakable Linux Network, you can take advantage of the Oracle preinstallation RPM. Simply subscribe to the relevant preinstallation channel and then use yum to install the correct preinstall RPM, as shown here (note that the name of the package might well change over time, so make sure you check the documentation for the correct name):
[root@Ol7base ~]$ yum install oracle-rdbms-server-12cR2-preinstall
--> Running transaction check
> Package oracle-database-server-12cR2-preinstall.x86_64 0:1.0-2.el7 will be
--> Finished Dependency Resolution Installing:
oracle-database-server-12cR2-preinstall x86_64 1.0-2.el7
ol7_latest 18 к
Total download size: 18 к Installed size: 52 к Is this ok (y/d/N):
oracle-database-server-12cR2-preinstall.x86_64 0:1.0-2.el7 Complete!
When you run this package, it creates the OS groups and users that are required, sets various kernel parameters, and performs other required preinstall actions. The installation guides provide a great deal more information on how to use this feature.
Create the Required OS Groups and Users
If this is the first install on the system you are using, then you need to create the Oracle environment. The process to do this has not changed in Oracle Database 12c Release 2. You still create (default names given in parentheses) the Oracle inventory group (oinstall), the OSDBA group (dba), the Oracle software owner (the oracle OS account), and the OSOPER group (oper). A new OS group called the RAC Administrative Group is available in Oracle Database 12c Release 2 and you may want to consider adding a new group to support the functionality of the RAC administrator. Otherwise, for a smaller infrastructure with a single DBA, the only roles you’ll probably need are the oinstall and dba groups. To further divide responsibilities, you can create the grid user to own the GI software directory.
If you use the Oracle preinstall package, these users and groups are created for you automatically.
Configure the Kernel Parameters
On a new system, you need to set the OS kernel parameters if you have not used the Oracle RDBMS preinstall RPM referenced earlier in the chapter. Refer to the Oracle Database 12c Release 2 install guide for your specific OS for recommended minimum values. The Oracle install guide for your OS also provides you with the recommended minimums and methods to determine the current settings and reset those settings if required.
I often find that the minimum values for the parameters recommended by Oracle quickly become insufficient for larger database installations. If you are not familiar with the operating system you are working with, you should discuss the recommended settings with an experienced OS administrator and determine if higher values are advisable.
I often find that one of the places that I run into problems is with the resource limits defined for the account that owns the Oracle database software and runs the background processes upon database startup (typically this is the oracle user). Make sure that the limits for the oracle account are set to at least the minimum values listed in the install guide.
Check for Patches
Something else to consider when installing Oracle Database 12c Release 2 is that there may be a patch set that you should apply. In fact, I’m a strong believer in keeping all production databases up to date with each quarterly Oracle Database proactive bundle patch (BP), Patch Set Update (PSU), or at a minimum, the Oracle Security Patch Update (SPU) after performing the appropriate regression testing in a QA environment. By the time you read this, there will likely be at least one quarterly BP, PSU, or SPU available for Oracle Database 12c Release 2, so consider applying the most recent version to the base database software install.
All BPs, PSUs, and SPUs can only be found on the My Oracle Support website. If applicable, you would install the BP, PSU, or SPU after you have installed the base Oracle Database software. Figure 1 shows the hierarchical content of Oracle quarterly patch sets.
A quarterly SPU is included in each PSU, and a BP includes everything in the PSU. Bundle patches will have additional fixes that are generally not critical but include things like optimizer fixes or enhancements. As a result, BPs may require a higher level of regression testing before deploying them in your production environment.
Future patch sets will not have stand-alone SPUpatch sets—you will be required to install a PSU or BP to get the security fixes. The SPU+PSU gives you the minimum set of patches to ensure a secure database environment with the most important database fixes that affect the vast majority of database users.
Finish the Preinstall Steps
You are almost ready to install the software for Oracle Database 12c Release 2 (database and GI). Before you can begin the install, you need to complete the following steps:
- Determine the location of the ORACLE_BASE directory. If you already have a previous release of Oracle Database installed on the system, then you should use the same ORACLE_BASE directory that is already defined. This is not required but highly recommended. For the examples throughout this book, this will be
[oracl9@ol7base ~]$ Is -l /uOl/app/oracle total 8
drwxr-xr-x. 2 oracle oinstall 6 Aug 31 2016 12.1.0
drwxr-xr-x. 69 oracle oinstall 4096 Mar 3 17:32 12.2.0
drwxr-xr-x. 2 oracle oinstall 6 Mar 3 21:32 checkpoints
drwxrwxr-x. 21 oracle oinstall 4096 Mar 3 21:27 diag
drwxr-xr-x. 3 oracle oinstall 19 Mar 3 21:25 product
- Ensure that you can start an X terminal session (if installing on Linux) so that you can run the Oracle Universal Installer (OUI). Alternatively, if you are using a Linux desktop on the same server where the software will be installed, you will not need a remote X Windows server.
- Unset parameters such as ORACLE_HOME, TNS_ADMIN, and the like.
- Make sure that the PATH environment variable does not include an existing
$ORACLE_HOME/binfrom a previous release.
In earlier Oracle Database releases, it was common to set ORACLE_HOME to the location of the new ORACLE_HOME before starting a new software install. It is now recommended that you set the ORACLE_BASE parameter instead.
When ORACLE_BASE is set, the OUI creates an ORACLE_HOME path that is compliant with Oracle’s Optimal Flexible Architecture (OFA). It is recommended that you accept the ORACLE_HOME path that the OUI recommends.