How to install Oracle Database 19c on FlashArray (Windows Server)
In this article, we will go over the steps to install Oracle Database 19c on a Windows Server. This objective is to provide an overview of the installation process with a focus on the steps needed to be carried out on the FlashArray.
Oracle provides two storage options for the database
- File System
- Automatic Storage Management (ASM in short)
This document will go through the installation process for ASM. If installing the database on the file system, then installation of the Grid Infrastructure is not required.
For detailed configuration options and instructions for installing the Oracle Database 19c on the Windows Server, please refer to the Oracle Database 19c Installation Guide for Microsoft Windows.
Oracle Database 19c is supported on a wide range of Windows versions, starting from Windows 8.1 x64 (Pro and Enterprise Editions) all the way to the latest release - Windows Server 2019 x64. To illustrate the installation process in this article, we are using Windows Server 2019 Standard, but the process is the same for all Windows versions.
Before beginning the installation, please go through the Oracle Database Installation Checklist and make sure all the prerequisites have been met.
The installation tasks can be performed intuitively using the GUI interface. We'll also show how various operations can be scripted and automated using PowerShell - Microsoft's powerful cross-platform task automation and configuration management framework. Pure Storage provides Pure Storage FlashArray PowerShell SDK that can be used to script and automate operations on the FlashArray.
Prepare the FlashArray
Create Volumes on the FlashArray
As the FlashArray is built using solid-state technology, the design considerations that were very important for spinning disk-based storage are no longer valid. We do not have to worry about distributing I/O over multiple disks, therefore no need of making sure that tables and its indexes are on different disks. We can place our entire database on a single volume without any performance implication. One thing to keep in mind when deciding on the number of volumes to create is that performance and data reduction statistics are captured and stored at the volume level.
In this installation, we will create six volumes for the database. Two for data/temp files, one for redo log files, one for Oracle software and two for the Flash Recovery Area.
Go to Storage -> Volumes, and click on the plus icon at the top right corner on the Volumes panel. Provide the Volume name and size and click on the Create button. Repeat this step for each volume.
Using Pure Storage PowerShell SDK, a volume can be created as follows.
Before we run any PowerShell commands on the FlashArray, we need to first connect to it. To connect to a Pure Storage FlashArray the New-PfaArray cmdlet is used to create a secure connection from the Windows Server to the specified FlashArray. A connection to the FlashArray is established over HTTPS using TLS 1.1/1.2.
PS C:\ > $FlashArray = New-PfaArray -EndPoint 10.0.x.x -ApiToken fbbb3xyz-b2da-0000-3d7d-xxxxxxxxxxxx
Once the session has been established,$FlashArray
variable contains a reference to the FlashArray connection and can be used in the subsequent commands.
Now we can execute the New-PfaVolume cmdlet to create a volume.
PS C:\ > New-PfaVolume -Array $FlashArray -VolumeName 'ora-rt-win03a-data-01' -Unit T -Size 2
Create a Host on the FlashArray
Go to Storage->Hosts and click on the plus icon at the top right corner on the Hosts panel. The Create Host dialog will popup. Enter the name of the host that we are going to add. Note that this can be any name you think would best identify your host in the array, and does not have to be the operating system hostname. Click on Create to create a host object.
Using Pure Storage PowerShell SDK, a host can be created by executing the following command.
The host will now appear in the Hosts section. Click on the host name to go to the Host details page.
Click on the Menu icon at the top right corner of the Host Ports section. A drop-down menu with a list of options will appear. This is where we set up the connectivity between the FlashArray and the Host. You need to choose the configuration option depending on the type of network we are using to connect.
In this case, we are connecting a Fibre Channel network, so we select the option to Configure WWNs.
For an iSCSI network, one would select the option to Configure IQNs.
For a NVME over Fabrics network, one would select the option to Configure NQNs.
On selecting Configure WWNs... from the menu, a dialog will be displayed with a list of available WWNs in the left pane.
Once the WWNs corresponding to the host are selected, they will appear in the Host Ports panel.
We are using FC, therefore we create a host and configure WWNs using the Pure Storage PowerShell SDK.
PS C:\ > $wwn = @('21:00:00:0E:1E:1B:E8:40','21:00:00:0E:1E:1B:E8:41') PS C:\ > $wwn 21:00:00:0E:1E:1B:E8:40 21:00:00:0E:1E:1B:E8:41 PS C:\ > New-PfaHost -Array $FlashArray -WwnList $wwn -Name sn1-r720-e03-17
If using iSCSI, the example shown below can be followed for creating a host and configuring IQNs using the Pure Storage PowerShell SDK.
PS C:\ > $iqn = @('iqn.1998-01.com.sample1.iscsi','iqn.1998-01.com.sample2.iscsi') PS C:\ > $iqn iqn.1998-01.com.sample1.iscsi iqn.1998-01.com.sample2.iscsi PS C:\ > New-PfaHost -Array $FlashArray -Name 'sn1-r720-e03-17' -IqnList $iqn
Connect Volumes to the Host
Click on the Menu icon on the Connected Volumes panel. From the drop-down menu, select Connect....
A dialog will appear that will list volumes available for connection. Select the volumes and click Connect.
They will now show up in the Connected Volumes panel on the host details page as shown below.
PS C:\ > New-PfaHostVolumeConnection -Array $FlashArray -VolumeName 'ora-rt-win03a-data-01' -HostName 'sn1-r720-e03-17'
Prepare database host
Now that the FlashArray volumes have been created and connected to the host,
Create OS Users
Create the oracle user.
PS C:\> New-LocalUser -Name oracle -NoPassword -Description "Oracle Database Software Owner"
If using ASM, we create the grid user as well.
PS C:\> New-LocalUser -Name grid -NoPassword -Description "Oracle Grid Software Owner"
Create OS Groups
PS C:\> New-LocalGroup -Name ORA_DBA
If using ASM, create the following groups
PS C:\> New-LocalGroup -Name ORA_ASMDBA PS C:\> New-LocalGroup -Name ORA_ASMADMIN PS C:\> New-LocalGroup -Name ORA_ASMOPER
Assign users to groups
Assign oracle user to the ORA_DBA group
PS C:\> Add-LocalGroupMember -Group ORA_DBA -Member Oracle
If using ASM, assign grid user to the following groups
PS C:\> Add-LocalGroupMember -Group ORA_ASMDBA -Member grid PS C:\> Add-LocalGroupMember -Group ORA_ASMADMIN -Member grid PS C:\> Add-LocalGroupMember -Group ORA_ASMOPER -Member grid
Setup Multipath I/O
Multipathing solutions use redundant physical path components to create multiple logical paths between the host and the FlashArray and its use is highly recommended on production systems. To setup Multipath I/O on Windows server, we need to do the following:
Install the Multipath-IO feature
Open Server Manager, click on Manage at the top right corner and then choose Add Roles and Features to bring up the wizard. If the checkbox is not checked, Multipath I/O is not installed. Check the box to install this feature. The server will be restart to complete installation.
Alternatively, open a Windows PowerShell session as an Administrator and run the following command to determine if Multipath-IO feature is installed.
PS C:\> Get-WindowsFeature -Name 'Multipath-IO' Display Name Name Install State ------------ ---- ------------- [X] Multipath I/O Multipath-IO Available
If the Install State is not Installed, go ahead and install it using the following command.
PS C:\> Add-WindowsFeature -Name 'Multipath-IO' Success Restart Needed Exit Code Feature Result ------- -------------- --------- -------------- True Yes SuccessRest... {Multipath I/O} WARNING: You must restart this server to finish the installation process.
Setup an MPIO Device
The FlashArray needs to be setup as an MPIO Device in order to support multipathing.
Open the Control Panel, and search for the MPIO app. You can also execute the command mpiocpl directly to bring up the MPIO applet.
Click Add to bring up the Add MPIO Support dialog box. Add Pure FlashArray to the device list. As these are fixed length character fields, there should eb 4 spaces after PURE and 6 spaces after FlashArray as shown below.
Click OK, and the server will reboot again.
This can be done using PowerShell as shown below.
PS C:\> New-MSDSMSupportedHw -VendorId PURE -ProductId FlashArray VendorId ProductId -------- --------- PURE FlashArray
We can list available MPIO Devices as follows.
PS C:\> Get-MSDSMSupportedHw VendorId ProductId -------- --------- Vendor 8 Product 16 PURE FlashArray
Remove default device default Vendor 8 Product 16 as it does not do anything.
PS C:\> Remove-MSDSMSupportedHw -VendorId 'Vendor*' -ProductId 'Product*' PS C:\> Get-MSDSMSupportedHw VendorId ProductId -------- --------- PURE FlashArray
Configuring MPIO Timers
There are 6 MPIO Timer values that are the recommended for use with a Pure Storage FlashArray for optimal performance. See MPIO Timers for full details.
Using Windows PowerShell is the preferred method for setting the MPIO Timer values. We use the Set-MPIOSetting cmdlet which is part of the MPIO module.
To check the current MPIO timer values, we use the Get-MIOPSetting cmdlet.
PS C:\> Get-MPIOSetting PathVerificationState : Disabled PathVerificationPeriod : 30 PDORemovePeriod : 20 RetryCount : 3 RetryInterval : 1 UseCustomPathRecoveryTime : Disabled CustomPathRecoveryTime : 40 DiskTimeoutValue : 60
For PathVerificationPeriod, the default value of 30 is the recommended setting so we do not need to set that. To set the recommended values for the remaining parameters, we use the following PowerShell commands.
PS C:\> Set-MPIOSetting -NewPathRecoveryInterval 20 PS C:\> Set-MPIOSetting -CustomPathRecovery Enabled PS C:\> Set-MPIOSetting -NewPDORemovePeriod 30 PS C:\> Set-MPIOSetting -NewDiskTimeout 60 PS C:\> Set-MPIOSetting -NewPathVerificationState Enabled
Configure MPIO Policy
The Multipath-IO (MPIO) Policy defines how the host distributes IOs across the available paths to the storage. There are various MPIO policies like Fail Over Only (FOO), Round Robin (RR), Least Queue Depth (LQD) and Least Blocks (LB). By default MPIO policy is set to None.
The recommended policy for the FlashArray is either Round Robin (RR) or Least Queue Depth (LQD).
The Round Robin (RR) policy distributes IOs evenly across all Active/Optimized paths and is the best practice for most environments.
LQD is similar to RR in that IOs are distributed across all available Active/Optimized paths, however it provides some additional benefits. LQD will bias IOs towards paths that are servicing IO quicker (paths with lesser queues). In the event that one path becomes intermittently disruptive or is experiencing higher latency, LQD will prevent the utilization of that path reducing the effect of the problem path. In some situations, usually involving complex storage topologies using multiple hops between server and storage, LQD can cause some paths to be almost entirely avoided. This reduces maximum throughput and in those environments, RR may perform better. When attempting to maximize throughput, both RR and LQD should be tested to see which MPIO policy performs best.
Right-click on the Disk represented by the newly connected LUNs and select Properties from the menu. In the Hardware tab, it'll display all PURE FlashArray devices. Right-click on them to open the PURE PlashArray Multi-Path Disk Device properties dialog. Next, click on the MPIO tab to view and update the MPIO policy.
The below PowerShell shows running the Load Balance Policy cmdlet to retrieving the current Multipath-IO Policy. On a newly installed Windows Server running Get-MSDSMLocalDefaultLoadBalancePolicy results in None because no policy has been set as Multipath-IO has just been installed.
PS C:\Users\Administrator> Get-MSDSMGlobalDefaultLoadBalancePolicy None
Next, we set it to the recommended value, which is RR (or LQD).
PS C:\> Set-MSDSMGlobalDefaultLoadBalancePolicy -Policy RR PS C:\> Get-MSDSMGlobalDefaultLoadBalancePolicy RR
With this, the MPIO setup is complete.
If you are running an older version of the Windows Server, or would like detailed instructions, please refer to Installing Multipath I/O on Windows Server.
Prepare the Disks
Disk Policy a.k.a. SAN Policy
The new Disk Policy (previously known as the SAN Policy) is the policy Windows Server uses to determine whether or not disks should automatically mount that are detected as new on the host.
Run diskpart at the command prompt to enter the DISKPART utility. Use the san command as shown below to view as well as update the SAN policy.
C:\> diskpart DISKPART> san SAN Policy : Offline Shared DISKPART> san policy=onlineAll DiskPart successfully changed the SAN policy for the current operating system. DISKPART> san SAN Policy : Online All DISKPART> automount enable Automatic mounting of new volumes enabled.
Using PowerShell, this can be done like so.
PS C:\> Get-StorageSetting | Select-Object NewDiskPolicy NewDiskPolicy ------------- OfflineShared PS C:\> Set-StorageSetting -NewDiskPolicy OnlineAll
Next, we create the primary partition for all the disks.
DISKPART> select disk 19 Disk 19 is now the selected disk. DISKPART> create partition primary DiskPart succeeded in creating the specified partition. DISKPART> select disk 20 Disk 20 is now the selected disk. DISKPART> create partition primary DiskPart succeeded in creating the specified partition. DISKPART> select disk 21 Disk 21 is now the selected disk. DISKPART> create partition primary DiskPart succeeded in creating the specified partition.
Initialize Disks
On the Windows Server, open Disk Management utility (Server Manager -> Tools -> Computer Management)
The newly added disks would show up as Offline. Right-click and select Online from the popup menu.
Next, with the disk selected, right-click to bring up the popup menu once again. Now it should show the Initialize Disk option. Select it to initialize the disk.
We can also select multiple disks and initialize them at the same time as shown below. Select the GPT (GUID Partition Table) radio button.
After all newly added disks are initialized, this is how it'll look like. For ASM disks, we do not need to create a file system.
Note that we have created NTFS filesystem on the volume designated for the Grid and Database Oracle Homes and assigned it the drive letter D.
If the database is going to be on file system, then we would also create a file system on all the database disks, instead of leaving them RAW.
Download software and unzip the files
Download the software media files
- WINDOWS.X64_193000_db_home.zip
- WINDOWS.X64_193000_grid_home.zip
As the grid user, unzip the grid software zip file.
PS D:\> mkdir D:\app\oracle\product\19.0.0\grid PS D:\> Expand-Archive -LiteralPath C:\Zipfiles\WINDOWS.X64_193000_grid_home.zip -DestinationPath D:\appx\oracle\product\19.0.0\grid
As the oracle user, unzip the grid software zip file.
PS D:\> mkdir D:\app\oracle\product\19.0.0\dbhome_1 PS D:\> Expand-Archive -LiteralPath C:\Zipfiles\WINDOWS.X64_193000_db_home.zip -DestinationPath D:\appx\oracle\product\19.0.0\dbhome_1
Install Grid Infrastructure
Run the grid installer.
PS D:\> cd \app\oracle\product\19.0.0\grid PS D:\> setup.exe
As we are installing a single instance database, select Configure Oracle Grid Infrastructure for a Standalone Server (Oracle Restart)
Enter the name of the Disk Group for database files.
Before we continue to the next wizard step, we need to stamp the Disk with ASM label. Click on Stamp Disk... button.
That brings up the asmtool wizard.
Select Disk and specify prefix.
Multiple Disks can also be selected as shown below.
Edit automatically numbered labels to make the name more descriptive.
After editing all the names, click on Finish.
Specify a Disk Group and select the disks that will make up this disk group. Select Redundancy as External as FlashArray already has redundancy built-in.
ASM Filter Driver is not supported on Windows so leave the checkbox unchecked.
Specify SYSASM password
Choose to register EM Cloud Control
Specify ORACLE_BASE directory
Click Install to begin installation.
We can verify the Oracle ASM services are installed and Running.
Create additional Disk Groups
Use ASM Configuration utility (asmca) to create additional disk groups.
PS D:\> cd \app\oracle\product\19.0.0\grid\bin PS D:\app\oracle\product\19.0.0\grid\bin> asmca.exe
The following screen shows the asmca Create Disk Group user interface. Here we are creating the WIN03A_FRA disk group from two ASM disks. Note that we have selected the Redundancy as External(None). The rest of the settings are default.
Test the Grid Infrastructure installation by connecting to the ASM instance and checking the status of the disk groups.
set ORACLE_HOME=D:\app\oracle\product\19.0.0\grid set ORACLE_SID=+ASM set PATH=%PATH%;%ORACLE_HOME%\bin D:\> sqlplus / as sysasm SQL> SELECT NAME, TYPE, TOTAL_MB, FREE_MB, STATE FROM V$ASM_DISKGROUP; NAME TYPE TOTAL_MB FREE_MB STATE ------------------------------ ------ ---------- ---------- ----------- WIN03A_DATA EXTERN 4194264 4194136 MOUNTED WIN03A_FRA EXTERN 4194264 4194148 MOUNTED WIN03A_REDO EXTERN 204780 204692 MOUNTED
Install Database Software
Run the database installer.
PS D:\> cd \app\oracle\product\19.0.0\dbhome_1 PS D:\> setup.exe
Select "Single instance database installation" as we are installing a single-instance database.
Select Server class.
Select Advanced install.
Select the database edition you would like to install.
Choose the appropriate Windows account, Oracle recommends Virtual Account.
Specify the directory for ORACLE_BASE.
Select the applicable database type you would like to create
Specify database name and SID. Also, you can select if you would like to create this database as a Container database.
Select configuration options
Select the database storage option. For this installation, we decided to use ASM.
Register with EM Cloud Control, if desired.
Select if Recovery needs to be enabled and the storage option for the Fast Recovery Area.
Select Disk Group for database
Specify SYS and SYSTEM passwords
Various checks are performed
Click on Install to start the database installation.
Once the installer completes, log into sqlplus to verify that the database has been successfully installed.
set ORACLE_HOME=D:\app\oracle\product\19.0.0\dbhome_1 set ORACLE_SID=PRD03A set PATH=%PATH%;%ORACLE_HOME%\bin D:\> sqlplus / as sysdba SQL*Plus: Release 19.0.0.0.0 - Production on Fri Oct 30 01:52:41 2020 Version 19.3.0.0.0 Copyright (c) 1982, 2019, Oracle. All rights reserved. Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.3.0.0.0 SQL> select name,open_mode from v$database; NAME OPEN_MODE --------- -------------------- PRD03A READ WRITE